summaryrefslogtreecommitdiffstats
path: root/src/styles/qmotifplusstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/styles/qmotifplusstyle.cpp')
-rw-r--r--src/styles/qmotifplusstyle.cpp31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/styles/qmotifplusstyle.cpp b/src/styles/qmotifplusstyle.cpp
index 86a2558..72e28a8 100644
--- a/src/styles/qmotifplusstyle.cpp
+++ b/src/styles/qmotifplusstyle.cpp
@@ -65,13 +65,10 @@
struct QMotifPlusStylePrivate
{
QMotifPlusStylePrivate()
- : hoverWidget(0), hovering(FALSE), sliderActive(FALSE), mousePressed(FALSE),
+ : hovering(FALSE), sliderActive(FALSE), mousePressed(FALSE),
scrollbarElement(0), lastElement(0), ref(1)
{ ; }
- void* hoverWidget;
- QStyleControlElementData hoverWidgetData;
- QStyle::ControlElementFlags hoverWidgetFlags;
bool hovering, sliderActive, mousePressed;
int scrollbarElement, lastElement, ref;
QPoint mousePos;
@@ -660,9 +657,6 @@ void QMotifPlusStyle::drawControl( ControlElement element,
const QStyleOption& opt,
const QWidget *widget) const
{
- if (widget == singleton->hoverWidget)
- flags |= Style_MouseOver;
-
switch (element) {
case CE_PushButton:
{
@@ -1108,9 +1102,6 @@ void QMotifPlusStyle::drawComplexControl(ComplexControl control,
const QStyleOption& opt,
const QWidget *widget ) const
{
- if (widget == singleton->hoverWidget)
- flags |= Style_MouseOver;
-
switch (control) {
case CC_ScrollBar:
{
@@ -1516,30 +1507,22 @@ bool QMotifPlusStyle::objectEventHandler( QStyleControlElementData ceData, Contr
if (!ceData.widgetObjectTypes.contains("QWidget"))
break;
- singleton->hoverWidget = source;
- singleton->hoverWidgetData = ceData;
- singleton->hoverWidgetFlags = elementFlags;
- if (!(singleton->hoverWidgetFlags & CEF_IsEnabled)) {
- singleton->hoverWidget = 0;
- break;
- }
- widgetActionRequest(singleton->hoverWidgetData, singleton->hoverWidgetFlags, singleton->hoverWidget, WAR_Repaint);
+ widgetActionRequest(ceData, elementFlags, source, WAR_Repaint);
break;
}
case QEvent::Leave:
{
- if (source != singleton->hoverWidget)
+ if (!ceData.widgetObjectTypes.contains("QWidget"))
break;
- void *w = singleton->hoverWidget;
- singleton->hoverWidget = 0;
- widgetActionRequest(singleton->hoverWidgetData, singleton->hoverWidgetFlags, w, WAR_Repaint);
+
+ widgetActionRequest(ceData, elementFlags, source, WAR_Repaint);
break;
}
case QEvent::MouseMove:
{
- if ((!ceData.widgetObjectTypes.contains("QWidget")) || source != singleton->hoverWidget)
+ if ((!ceData.widgetObjectTypes.contains("QWidget")))
break;
if ((!ceData.widgetObjectTypes.contains("QScrollBar")) && (!ceData.widgetObjectTypes.contains("QSlider")))
@@ -1548,7 +1531,7 @@ bool QMotifPlusStyle::objectEventHandler( QStyleControlElementData ceData, Contr
singleton->mousePos = ((QMouseEvent *) event)->pos();
if (! singleton->mousePressed) {
singleton->hovering = TRUE;
- widgetActionRequest(singleton->hoverWidgetData, singleton->hoverWidgetFlags, singleton->hoverWidget, WAR_Repaint);
+ widgetActionRequest(ceData, elementFlags, source, WAR_Repaint);
singleton->hovering = FALSE;
}