summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/phase/phasestyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/styles/phase/phasestyle.cpp b/noncore/styles/phase/phasestyle.cpp
index 906ccee..746354e 100644
--- a/noncore/styles/phase/phasestyle.cpp
+++ b/noncore/styles/phase/phasestyle.cpp
@@ -155,49 +155,49 @@ void PhaseStyle::drawArrow(QPainter *painter, Qt::ArrowType type, bool down,
155 else painter->setPen(group.mid()); 155 else painter->setPen(group.mid());
156 painter->drawPixmap(x+w/2-3, y+h/2-3, larrow); 156 painter->drawPixmap(x+w/2-3, y+h/2-3, larrow);
157 break; 157 break;
158 case RightArrow: 158 case RightArrow:
159 if (enabled) painter->setPen(down ? group.midlight() : group.dark()); 159 if (enabled) painter->setPen(down ? group.midlight() : group.dark());
160 else painter->setPen(group.mid()); 160 else painter->setPen(group.mid());
161 painter->drawPixmap(x+w/2-3, y+h/2-3, rarrow); 161 painter->drawPixmap(x+w/2-3, y+h/2-3, rarrow);
162 break; 162 break;
163 } 163 }
164} 164}
165 165
166void PhaseStyle::drawPushButton(QPushButton *btn, QPainter *painter) { 166void PhaseStyle::drawPushButton(QPushButton *btn, QPainter *painter) {
167 QRect r = btn->rect(); 167 QRect r = btn->rect();
168 int x = r.x(); 168 int x = r.x();
169 int y = r.y(); 169 int y = r.y();
170 int h = r.height(); 170 int h = r.height();
171 int w = r.width(); 171 int w = r.width();
172 bool depress = btn->isOn() || btn->isDown(); 172 bool depress = btn->isOn() || btn->isDown();
173 QColorGroup group = btn->colorGroup(); 173 QColorGroup group = btn->colorGroup();
174 QBrush brush(group.button() ); 174 QBrush brush(group.button() );
175// int bd = pixelMetric(PM_ButtonDefaultIndicator, widget) + 1; 175// int bd = pixelMetric(PM_ButtonDefaultIndicator, widget) + 1;
176 static int bd = 2; 176 static int bd = 2;
177 177
178 if (btn->isDefault() && !depress) { 178 if (btn->isDefault() && !depress) {
179 drawPanel(painter, x, y, h, w, group, 179 drawPanel(painter, x, y, w, h, group,
180 &group.brush(QColorGroup::Mid), true); 180 &group.brush(QColorGroup::Mid), true);
181 drawBevelButton(painter, x+bd, y+bd, w-bd*2, h-bd*2, group, 181 drawBevelButton(painter, x+bd, y+bd, w-bd*2, h-bd*2, group,
182 false, &brush ); 182 false, &brush );
183 } else { 183 } else {
184 drawButton(painter, x, y, w, h, group, depress, 184 drawButton(painter, x, y, w, h, group, depress,
185 &brush ); 185 &brush );
186 } 186 }
187 187
188 if (btn->hasFocus() ) { // draw focus 188 if (btn->hasFocus() ) { // draw focus
189 QColor col; 189 QColor col;
190 drawFocusRect(painter, r, group, 190 drawFocusRect(painter, r, group,
191 &col, false ); 191 &col, false );
192 } 192 }
193} 193}
194 194
195 195
196void PhaseStyle::drawPanel(QPainter* painter, int x, int y, int w, int h, 196void PhaseStyle::drawPanel(QPainter* painter, int x, int y, int w, int h,
197 const QColorGroup& group, bool sunken, 197 const QColorGroup& group, bool sunken,
198 int , const QBrush* fill) { 198 int , const QBrush* fill) {
199 int x2 = x + w - 1; 199 int x2 = x + w - 1;
200 int y2 = y + h - 1; 200 int y2 = y + h - 1;
201 painter->save(); 201 painter->save();
202 202
203 if (sunken) { 203 if (sunken) {