diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-10-27 13:20:56 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-10-27 13:20:56 (GMT) |
commit | 5bc69a86b75c1e25e0859ee27714e54878193e2f (patch) | |
tree | d3fd32c9cd0b12c8b284c9c879aa8c58314cb2db /src/gui/styles | |
parent | 8dd9e9b5f3e794ecdb70a3b43c4a2e17a8d139a8 (diff) | |
download | Qt-5bc69a86b75c1e25e0859ee27714e54878193e2f.zip Qt-5bc69a86b75c1e25e0859ee27714e54878193e2f.tar.gz Qt-5bc69a86b75c1e25e0859ee27714e54878193e2f.tar.bz2 |
Draw QSplitter in QS60Style
Previously QS60Style did not draw CE_Splitter control at all.
With this change, the style draws it when user presses the splitter
down to make a drag. Since native side does not have splitter at all,
we are drawing splitter rect as partially transparent rounded rect
with QPalette::Light (which has been picked from active theme).
Task-number: QT-686
Reviewed-by: Shane Kearns
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 8ef0dd3..580f949 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1890,6 +1890,17 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, painter->restore(); } break; + case CE_Splitter: + if (option->state & State_Sunken && option->state & State_Enabled) { + painter->save(); + painter->setOpacity(0.5); + painter->setBrush(d->themePalette()->light()); + painter->setRenderHint(QPainter::Antialiasing); + const qreal roundRectRadius = 4 * goldenRatio; + painter->drawRoundedRect(option->rect, roundRectRadius, roundRectRadius); + painter->restore(); + } + break; default: QCommonStyle::drawControl(element, option, painter, widget); } |