author | harlekin <harlekin> | 2002-05-02 14:11:21 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-05-02 14:11:21 (UTC) |
commit | b4f04de71fea42fa32a048f42d27e4f5be6804f9 (patch) (side-by-side diff) | |
tree | 465ddbd7f33b5da06ed1ec7d2060281cbd9f3c50 | |
parent | 3e4ce540942b6342a00c272dac171e729ae2b08b (diff) | |
download | opie-b4f04de71fea42fa32a048f42d27e4f5be6804f9.zip opie-b4f04de71fea42fa32a048f42d27e4f5be6804f9.tar.gz opie-b4f04de71fea42fa32a048f42d27e4f5be6804f9.tar.bz2 |
refixed buttons
-rw-r--r-- | core/pim/today/todaybase.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index c6ea11f..3d0bfb3 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp @@ -48,24 +48,33 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) QWidget *d = QApplication::desktop(); int w=d->width(); int h=d->height(); resize( w , h ); // hehe, qt is ... getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" ); getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); QVBoxLayout * layout = new QVBoxLayout(this); + + 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); + // --- logo Section --- QPalette pal2; QColorGroup cg; cg.setColor( QColorGroup::Text, white ); cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); pal2.setActive( cg ); // today logo Frame = new QLabel( this, "Frame" ); Frame->setPalette( pal2 ); Frame->setFrameShape( QFrame::StyledPanel ); Frame->setFrameShadow( QFrame::Raised ); Frame->setLineWidth( 0 ); @@ -112,82 +121,82 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) 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->setFrameShape(QFrame::NoFrame); DatesButton = new QPushButton (Frame4, "DatesButton" ); DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); -// DatesButton->setPalette( pal ); + DatesButton->setPalette( pal ); 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->setFrameStyle( QFrame::NoFrame ); QFrame* Line1 = new QFrame( MailFrame); Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); MailButton = new QPushButton (MailFrame, "MailButton" ); MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); -// MailButton->setPalette( pal ); + MailButton->setPalette( pal ); MailButton->setPixmap( mail ); MailButton->setFlat( TRUE ); MailField = new QLabel( MailFrame, "MailField" ); MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); MailField->setText( tr( "Opiemail not installed" ) ); MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); MailField->setMaximumHeight(40); MailField->setMinimumHeight(15); // --- todo section -- Frame15 = new QFrame( this, "Frame15" ); Frame15->setFrameStyle( QFrame::NoFrame ); Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); QFrame* Line2 = new QFrame( Frame15); Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); TodoButton = new QPushButton (Frame15, "TodoButton" ); TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); -// TodoButton->setPalette( pal ); + TodoButton->setPalette( pal ); TodoButton->setPixmap( todo ); TodoButton->setFlat( TRUE ); QScrollView* sv2 = new QScrollView( Frame15 ); sv2->setResizePolicy(QScrollView::AutoOneFit); sv2->setHScrollBarMode( QScrollView::AlwaysOff ); sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) ); sv2->setFrameShape(QFrame::NoFrame); TodoField = new QLabel( sv2->viewport(), "TodoField" ); sv2->addChild(TodoField); TodoField->setFrameShadow( QLabel::Plain ); //TodoField->setText( tr( "No current todos" ) ); TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); PushButton1 = new QPushButton (Frame15, "PushButton1" ); PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); PushButton1->setPixmap( config ); -// PushButton1->setPalette( pal ); + PushButton1->setPalette( pal ); PushButton1->setAutoDefault( TRUE ); PushButton1->setFlat( TRUE ); // -- layout -- layout->addWidget(Frame); layout->addWidget(OwnerField); layout->addWidget(Frame4); layout->addWidget(MailFrame); layout->addWidget(Frame15); layout->setStretchFactor(Frame4,5); layout->setStretchFactor(MailFrame,1); |