Changeset 846 for trunk/src/gui/styles/qstylesheetstyle.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/styles/qstylesheetstyle.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 1066 1066 } 1067 1067 } 1068 if ( !hasNativeBorder() && (flags & Border)) {1068 if (hasBorder() && (flags & Border)) { 1069 1069 const int *b = border()->borders; 1070 1070 r.adjust(-b[LeftEdge], -b[TopEdge], b[RightEdge], b[BottomEdge]); … … 1353 1353 p->setBrush(br, bg->brush); 1354 1354 p->setBrush(QPalette::Window, bg->brush); 1355 if (bg->brush.style() == Qt::SolidPattern) { 1356 p->setBrush(QPalette::Light, bg->brush.color().lighter(115)); 1357 p->setBrush(QPalette::Midlight, bg->brush.color().lighter(107)); 1358 p->setBrush(QPalette::Dark, bg->brush.color().darker(150)); 1359 p->setBrush(QPalette::Shadow, bg->brush.color().darker(300)); 1360 } 1355 1361 } 1356 1362 … … 2538 2544 QPalette::ColorGroup group; 2539 2545 } map[3] = { 2540 { PseudoClass_Active | PseudoClass_Enabled, QPalette::Active },2546 { int(PseudoClass_Active | PseudoClass_Enabled), QPalette::Active }, 2541 2547 { PseudoClass_Disabled, QPalette::Disabled }, 2542 2548 { PseudoClass_Enabled, QPalette::Inactive } … … 3171 3177 QRect r(gr.topLeft(), 3172 3178 slider->orientation == Qt::Horizontal 3173 ? QPoint(hr.x()+hr.width()/2, gr.y()+gr.height() )3174 : QPoint(gr.x()+gr.width() , hr.y()+hr.height()/2));3179 ? QPoint(hr.x()+hr.width()/2, gr.y()+gr.height() - 1) 3180 : QPoint(gr.x()+gr.width() - 1, hr.y()+hr.height()/2)); 3175 3181 subRule1.drawRule(p, r); 3176 3182 } … … 3185 3191 } 3186 3192 3187 handleSubRule.drawRule(p, grooveSubRule.boxRect(hr, Margin));3193 handleSubRule.drawRule(p, handleSubRule.boxRect(hr, Margin)); 3188 3194 } 3189 3195 … … 3459 3465 case CE_RadioButton: 3460 3466 case CE_CheckBox: 3461 rule.drawRule(p, opt->rect); 3462 ParentStyle::drawControl(ce, opt, p, w); 3463 return; 3464 3467 if (rule.hasBox() || !rule.hasNativeBorder() || rule.hasDrawable() || hasStyleRule(w, PseudoElement_Indicator)) { 3468 rule.drawRule(p, opt->rect); 3469 ParentStyle::drawControl(ce, opt, p, w); 3470 return; 3471 } else if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) { 3472 QStyleOptionButton butOpt(*btn); 3473 rule.configurePalette(&butOpt.palette, QPalette::ButtonText, QPalette::Button); 3474 baseStyle()->drawControl(ce, &butOpt, p, w); 3475 return; 3476 } 3477 break; 3465 3478 case CE_RadioButtonLabel: 3466 3479 case CE_CheckBoxLabel: … … 4082 4095 QRenderRule subRule = renderRule(w, opt, pe1); 4083 4096 if (subRule.bg != 0 || subRule.hasDrawable()) { 4084 //We test subRule.bg dir rectly because hasBackground() would return false for background:none.4097 //We test subRule.bg directly because hasBackground() would return false for background:none. 4085 4098 //But we still don't want the default drawning in that case (example for QScrollBar::add-page) (task 198926) 4086 4099 subRule.drawRule(p, opt->rect); … … 4270 4283 } 4271 4284 break; 4285 4286 case PE_FrameMenu: 4287 if (rule.hasDrawable()) { 4288 // Drawn by PE_PanelMenu 4289 return; 4290 } 4291 break; 4272 4292 4273 4293 case PE_PanelMenuBar:
Note:
See TracChangeset
for help on using the changeset viewer.