summaryrefslogtreecommitdiffstats
path: root/src/widgets/qsplitter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-16 15:39:47 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-16 15:39:47 -0500
commitf209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b (patch)
treeb046beab59eda48afdbdb4ee3e9ae60881114b87 /src/widgets/qsplitter.cpp
parent4f8eb0410d666d41ccbc39b2bf5dea336af5c26c (diff)
downloadqt3-f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b.tar.gz
qt3-f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b.zip
Move hover widget code into the Qt core instead of the styles
This more closely matches other widget toolkits such as GTK
Diffstat (limited to 'src/widgets/qsplitter.cpp')
-rw-r--r--src/widgets/qsplitter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/qsplitter.cpp b/src/widgets/qsplitter.cpp
index 407441f..f97393c 100644
--- a/src/widgets/qsplitter.cpp
+++ b/src/widgets/qsplitter.cpp
@@ -141,11 +141,15 @@ void QSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
void QSplitterHandle::paintEvent( QPaintEvent * )
{
+ QStyle::SFlags flags = (orientation() == Horizontal ? QStyle::Style_Horizontal : 0);
+ if (hasMouse()) {
+ flags |= QStyle::Style_MouseOver;
+ }
+
QPainter p( this );
parentWidget()->style().drawPrimitive( QStyle::PE_Splitter, &p, rect(),
colorGroup(),
- (orientation() == Horizontal ?
- QStyle::Style_Horizontal : 0) );
+ flags );
}
QCOORD QSplitterLayoutStruct::getSizer( Orientation orient )