summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog1
-rw-r--r--core/pim/today/todaybase.cpp51
2 files changed, 28 insertions, 24 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index 2270551..b3da1fb 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,4 +1,5 @@
0.3.1
+* fixed the wrong color of the buttons
* better translation (thanks carsten and others)
* fixes memory leaks
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index dfcc34e..755c860 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -33,7 +33,7 @@
#include <qpe/resource.h>
-/*
- * Constructs a TodayBase which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
+/*
+ * Constructs a TodayBase which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'
*/
TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
@@ -45,16 +45,19 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
QPixmap config = Resource::loadPixmap( "today/config" ); // config icon
QPixmap mail = Resource::loadPixmap( "today/mail" ); // mail icon
-
+
QPalette pal = this->palette();
QColor col = pal.color(QPalette::Active, QColorGroup::Background);
pal.setColor(QPalette::Active, QColorGroup::Button, col);
+ pal.setColor(QPalette::Inactive, QColorGroup::Button, col);
+ pal.setColor(QPalette::Normal, QColorGroup::Button, col);
+ pal.setColor(QPalette::Disabled, QColorGroup::Button, col);
this->setPalette(pal);
QWidget *d = QApplication::desktop();
- int w=d->width();
- int h=d->height();
- resize( w , h );
-
+ int w=d->width();
+ int h=d->height();
+ resize( w , h );
+
// hehe, qt is ...
getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" );
@@ -79,16 +82,16 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
// date
TextLabel1 = new QLabel( Frame, "TextLabel1" );
- TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
+ TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
QFont TextLabel1_font( TextLabel1->font() );
TextLabel1_font.setBold( TRUE );
- TextLabel1->setFont( TextLabel1_font );
+ TextLabel1->setFont( TextLabel1_font );
TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
TextLabel1->setTextFormat( RichText );
-
+
OwnerField = new QLabel(this , "Owner" );
OwnerField->setGeometry(QRect(0,0, this->width(), 12 ));
OwnerField->setAlignment(int (QLabel::AlignTop | QLabel::AlignLeft ) );
OwnerField->setMaximumHeight(12);
-
+
// --- dates section ---
Frame4 = new QFrame( this, "Frame4" );
@@ -98,13 +101,13 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
Frame4->setBackgroundOrigin( QScrollView::ParentOrigin );
Frame4->setFrameStyle( QFrame::NoFrame );
- Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) );
-
+ Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) );
+
sv1 = new QScrollView( Frame4 );
sv1->setResizePolicy(QScrollView::AutoOneFit);
sv1->setHScrollBarMode( QScrollView::AlwaysOff );
// need to find a better way!!!
- sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) );
+ sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) );
sv1->setFrameShape(QFrame::NoFrame);
-
+
DatesButton = new QPushButton (Frame4, "DatesButton" );
DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) );
@@ -113,11 +116,11 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
DatesButton->setPixmap( datebook );
DatesButton->setFlat( TRUE );
-
+
// --- mail section ---)
MailFrame = new QFrame( this ,"MailFrame" );
MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin );
- MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) );
+ MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) );
MailFrame->setFrameStyle( QFrame::NoFrame );
-
+
QFrame* Line1 = new QFrame( MailFrame);
Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) );
@@ -131,5 +134,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
MailField = new QLabel( MailFrame, "MailField" );
- MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) );
+ MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) );
MailField->setText( tr( "Opiemail not installed" ) );
MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
@@ -140,5 +143,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
Frame15 = new QFrame( this, "Frame15" );
Frame15->setFrameStyle( QFrame::NoFrame );
- Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) );
+ Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) );
QFrame* Line2 = new QFrame( Frame15);
@@ -155,5 +158,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
sv2->setResizePolicy(QScrollView::AutoOneFit);
sv2->setHScrollBarMode( QScrollView::AlwaysOff );
- sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) );
+ sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) );
sv2->setFrameShape(QFrame::NoFrame);
@@ -165,5 +168,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
PushButton1 = new QPushButton (Frame15, "PushButton1" );
- PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) );
+ PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) );
PushButton1->setPixmap( config );
PushButton1->setPalette( pal );
@@ -183,5 +186,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
}
-/*
+/*
* Destroys the object and frees any allocated resources
*/