summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-04-28 11:00:32 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-04-28 11:03:37 (GMT)
commit97d3f5aaccf3a9efa40682fc4958b388b8be99d1 (patch)
treebcf7efb2ac86e46bfd8699eb89499e7c0fcc874a /src/gui/styles
parent6c0ec6051464196fdc45c1b74cb380a9659fc6f4 (diff)
downloadQt-97d3f5aaccf3a9efa40682fc4958b388b8be99d1.zip
Qt-97d3f5aaccf3a9efa40682fc4958b388b8be99d1.tar.gz
Qt-97d3f5aaccf3a9efa40682fc4958b388b8be99d1.tar.bz2
Made tabbar tab icons set the On state for selected tabs
This makes it possible to make a custom icon for the selected tab. We cannot use the Selected state because that has a blue tint on many platforms which is not what you typically want int a tab. The On state will only affect icons where these states are explicitly set. Task-number: 202063 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qcommonstyle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index be80d37..f8ae1a6 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -2019,7 +2019,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
: QIcon::Disabled);
QPixmap tabIcon = tabV2.icon.pixmap(iconSize,
(tabV2.state & State_Enabled) ? QIcon::Normal
- : QIcon::Disabled);
+ : QIcon::Disabled,
+ (tabV2.state & State_Selected) ? QIcon::On
+ : QIcon::Off);
int offset = 6;
int left = opt->rect.left();