From 0e044c1a92745f8508f5813efc9709a280583d11 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 16 Oct 2012 15:40:54 -0500 Subject: Automated update from Qt3 --- src/styles/qmotifplusstyle.cpp | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'src/styles/qmotifplusstyle.cpp') diff --git a/src/styles/qmotifplusstyle.cpp b/src/styles/qmotifplusstyle.cpp index 2ad7e7f5a..65fa0df91 100644 --- a/src/styles/qmotifplusstyle.cpp +++ b/src/styles/qmotifplusstyle.cpp @@ -65,13 +65,10 @@ struct TQMotifPlusStylePrivate { TQMotifPlusStylePrivate() - : hoverWidget(0), hovering(FALSE), sliderActive(FALSE), mousePressed(FALSE), + : hovering(FALSE), sliderActive(FALSE), mousePressed(FALSE), scrollbarElement(0), lastElement(0), ref(1) { ; } - void* hoverWidget; - TQStyleControlElementData hoverWidgetData; - TQStyle::ControlElementFlags hoverWidgetFlags; bool hovering, sliderActive, mousePressed; int scrollbarElement, lastElement, ref; TQPoint mousePos; @@ -660,9 +657,6 @@ void TQMotifPlusStyle::drawControl( ControlElement element, const TQStyleOption& opt, const TQWidget *widget) const { - if (widget == singleton->hoverWidget) - flags |= Style_MouseOver; - switch (element) { case CE_PushButton: { @@ -1108,9 +1102,6 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control, const TQStyleOption& opt, const TQWidget *widget ) const { - if (widget == singleton->hoverWidget) - flags |= Style_MouseOver; - switch (control) { case CC_ScrollBar: { @@ -1516,30 +1507,22 @@ bool TQMotifPlusStyle::objectEventHandler( TQStyleControlElementData ceData, Con if (!ceData.widgetObjectTypes.contains("TQWidget")) 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 TQEvent::Leave: { - if (source != singleton->hoverWidget) + if (!ceData.widgetObjectTypes.contains("TQWidget")) break; - void *w = singleton->hoverWidget; - singleton->hoverWidget = 0; - widgetActionRequest(singleton->hoverWidgetData, singleton->hoverWidgetFlags, w, WAR_Repaint); + + widgetActionRequest(ceData, elementFlags, source, WAR_Repaint); break; } case TQEvent::MouseMove: { - if ((!ceData.widgetObjectTypes.contains("TQWidget")) || source != singleton->hoverWidget) + if ((!ceData.widgetObjectTypes.contains("TQWidget"))) break; if ((!ceData.widgetObjectTypes.contains("TQScrollBar")) && (!ceData.widgetObjectTypes.contains("TQSlider"))) @@ -1548,7 +1531,7 @@ bool TQMotifPlusStyle::objectEventHandler( TQStyleControlElementData ceData, Con singleton->mousePos = ((TQMouseEvent *) 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; } -- cgit v1.2.1