summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorRohan Garg <rohan@kde.org>2013-08-08 10:45:22 +0530
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-20 20:09:20 +0200
commite2322c885f6dd67834c5110c6b7e2b63ea8b6186 (patch)
treef3d42b0f3060dbdf7b30f3acd44c39dc5a89332b /src/widgets/styles
parent692bee634e9add44ae38fe2e4dd140319687facd (diff)
Extend QStyle API with a SH_Splitter_OpaqueResize styleHint
Currently the default for QSplitter::opaqueResize is hard coded, which is less than ideal. Instead this should be provided as a style hint via QStyle so as to give a more uniform look to all applications. Change-Id: I5711811f7b672e36aafcd292ed320308570a0390 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp3
-rw-r--r--src/widgets/styles/qstyle.cpp3
-rw-r--r--src/widgets/styles/qstyle.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index f5b61ea6f3..0c1ae56349 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -5124,6 +5124,9 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
ret = true;
}
break;
+ case SH_Splitter_OpaqueResize:
+ ret = true;
+ break;
default:
ret = 0;
break;
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index 8d8eb3aa46..99bbf2f363 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1904,6 +1904,9 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
a transition between checked and unchecked statuses in a checkbox.
This enum value has been introduced in Qt 5.2.
+ \value SH_Splitter_OpaqueResize Determines if resizing is opaque
+ This enum value has been introduced in Qt 5.2
+
\sa styleHint()
*/
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index fffd423c8a..bbb216bf92 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -701,6 +701,7 @@ public:
SH_ToolTip_WakeUpDelay,
SH_ToolTip_FallAsleepDelay,
SH_Widget_Animate,
+ SH_Splitter_OpaqueResize,
// Add new style hint values here
SH_CustomBase = 0xf0000000