author | harlekin <harlekin> | 2002-02-17 23:48:36 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-02-17 23:48:36 (UTC) |
commit | 0640b30f13beb9d6480d8042ec5397a68e6247fc (patch) (unidiff) | |
tree | b632bdf355ed17bbce94470cadeb31570b5186c8 /core | |
parent | 39c6f8a9e734f200de4b67f55e159a6ccce38940 (diff) | |
download | opie-0640b30f13beb9d6480d8042ec5397a68e6247fc.zip opie-0640b30f13beb9d6480d8042ec5397a68e6247fc.tar.gz opie-0640b30f13beb9d6480d8042ec5397a68e6247fc.tar.bz2 |
fixes boxes arround icons
-rw-r--r-- | core/pim/today/todaybase.cpp | 48 | ||||
-rw-r--r-- | core/pim/today/todaybase.h | 2 |
2 files changed, 32 insertions, 18 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index 9331ee3..b0de1bf 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -51,10 +51,19 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
51 | 51 | ||
52 | 52 | ||
53 | //if ( !name ) | 53 | QPalette pal2; |
54 | // setName( "TodayBase" ); | 54 | QColorGroup cg; |
55 | //resize( 223, 307 ); | 55 | cg.setColor( QColorGroup::Text, white ); |
56 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); | ||
57 | pal2.setActive( cg ); | ||
58 | |||
59 | |||
60 | QPalette pal = this->palette(); | ||
61 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); | ||
62 | pal.setColor(QPalette::Active, QColorGroup::Button, col); | ||
63 | this->setPalette(pal); | ||
56 | 64 | ||
57 | QVBoxLayout * layout = new QVBoxLayout(this); | 65 | QVBoxLayout * layout = new QVBoxLayout(this); |
58 | 66 | ||
67 | |||
59 | Frame4 = new QFrame( this, "Frame4" ); | 68 | Frame4 = new QFrame( this, "Frame4" ); |
60 | Frame4->setFrameShape( QScrollView::StyledPanel ); | 69 | Frame4->setFrameShape( QScrollView::StyledPanel ); |
@@ -69,4 +78,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
69 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 78 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
70 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 79 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
80 | DatesButton->setPalette( pal ); | ||
71 | DatesButton->setPixmap( datebook ); | 81 | DatesButton->setPixmap( datebook ); |
72 | DatesButton->setFlat( TRUE ); | 82 | DatesButton->setFlat( TRUE ); |
@@ -79,11 +89,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
79 | // today logo | 89 | // today logo |
80 | Frame = new QLabel( this, "Frame" ); | 90 | Frame = new QLabel( this, "Frame" ); |
81 | QPalette pal; | 91 | Frame->setPalette( pal2 ); |
82 | QColorGroup cg; | ||
83 | cg.setColor( QColorGroup::Text, white ); | ||
84 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); | ||
85 | pal.setActive( cg ); | ||
86 | |||
87 | Frame->setPalette( pal ); | ||
88 | Frame->setFrameShape( QFrame::StyledPanel ); | 92 | Frame->setFrameShape( QFrame::StyledPanel ); |
89 | Frame->setFrameShadow( QFrame::Raised ); | 93 | Frame->setFrameShadow( QFrame::Raised ); |
@@ -91,7 +95,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
91 | Frame->setMaximumHeight(50); | 95 | Frame->setMaximumHeight(50); |
92 | Frame->setMinimumHeight(50); | 96 | Frame->setMinimumHeight(50); |
97 | |||
93 | // date | 98 | // date |
94 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); | 99 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); |
95 | TextLabel1->setPalette( pal ); | ||
96 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); | 100 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); |
97 | QFont TextLabel1_font( TextLabel1->font() ); | 101 | QFont TextLabel1_font( TextLabel1->font() ); |
@@ -108,5 +112,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
108 | TodoButton = new QPushButton (Frame15, "TodoButton" ); | 112 | TodoButton = new QPushButton (Frame15, "TodoButton" ); |
109 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 113 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
110 | TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 114 | //TodoButton->setBackgroundMode(NoBackground); |
115 | TodoButton->setPalette( pal ); | ||
116 | //TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | ||
111 | TodoButton->setPixmap( todo ); | 117 | TodoButton->setPixmap( todo ); |
112 | TodoButton->setFlat( TRUE ); | 118 | TodoButton->setFlat( TRUE ); |
@@ -120,18 +126,20 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
120 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); | 126 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); |
121 | PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); | 127 | PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); |
122 | PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 128 | //PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
123 | PushButton1->setPixmap( config ); | 129 | PushButton1->setPixmap( config ); |
130 | PushButton1->setPalette( pal ); | ||
124 | PushButton1->setAutoDefault( TRUE ); | 131 | PushButton1->setAutoDefault( TRUE ); |
125 | PushButton1->setFlat( TRUE ); | 132 | PushButton1->setFlat( TRUE ); |
126 | 133 | ||
127 | 134 | ||
128 | MailFrame = new QFrame( this, "MailFrame" ); | 135 | MailFrame = new QFrame( this ,"MailFrame" ); |
129 | MailFrame->setFrameShape( QScrollView::StyledPanel ); | 136 | MailFrame->setFrameShape( QScrollView::StyledPanel ); |
130 | MailFrame->setFrameShadow( QScrollView::Sunken ); | 137 | MailFrame->setFrameShadow( QScrollView::Sunken ); |
131 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | 138 | //MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); |
132 | 139 | ||
133 | MailButton = new QPushButton (MailFrame, "MailButton" ); | 140 | MailButton = new QPushButton (MailFrame, "MailButton" ); |
134 | MailButton->setGeometry( QRect( 2, 10, 36, 19 ) ); | 141 | MailButton->setGeometry( QRect( 2, 10, 36, 19 ) ); |
135 | MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 142 | //MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
143 | MailButton->setPalette( pal ); | ||
136 | MailButton->setPixmap( mail ); | 144 | MailButton->setPixmap( mail ); |
137 | MailButton->setFlat( TRUE ); | 145 | MailButton->setFlat( TRUE ); |
@@ -144,9 +152,13 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
144 | MailField->setMinimumHeight(10); | 152 | MailField->setMinimumHeight(10); |
145 | 153 | ||
154 | |||
155 | |||
156 | |||
146 | layout->addWidget(Frame); | 157 | layout->addWidget(Frame); |
147 | layout->addWidget(Frame4); | 158 | layout->addWidget(Frame4); |
148 | layout->addWidget(MailFrame); | 159 | layout->addWidget(MailFrame); |
149 | layout->addWidget(Frame15); | 160 | layout->addWidget(Frame15); |
150 | 161 | //layout->addWidget(split); | |
162 | |||
151 | layout->setStretchFactor(Frame4,4); | 163 | layout->setStretchFactor(Frame4,4); |
152 | layout->setStretchFactor(MailFrame,1); | 164 | layout->setStretchFactor(MailFrame,1); |
@@ -159,5 +171,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
159 | TodayBase::~TodayBase() | 171 | TodayBase::~TodayBase() |
160 | { | 172 | { |
161 | // no need to delete child widgets, Qt does it all for us | 173 | |
162 | } | 174 | } |
163 | 175 | ||
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h index 15f021a..c84cc67 100644 --- a/core/pim/today/todaybase.h +++ b/core/pim/today/todaybase.h | |||
@@ -13,4 +13,5 @@ | |||
13 | #include <qwidget.h> | 13 | #include <qwidget.h> |
14 | #include <qscrollview.h> | 14 | #include <qscrollview.h> |
15 | #include <qsplitter.h> | ||
15 | 16 | ||
16 | class QVBoxLayout; | 17 | class QVBoxLayout; |
@@ -45,4 +46,5 @@ public: | |||
45 | protected: | 46 | protected: |
46 | 47 | ||
48 | |||
47 | }; | 49 | }; |
48 | 50 | ||