diff options
author | Timothy Pearson <[email protected]> | 2012-10-16 15:40:54 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-10-16 15:40:54 -0500 |
commit | 0e044c1a92745f8508f5813efc9709a280583d11 (patch) | |
tree | 67963c1b752b6fa680f9123b73fca2c703b7c61b /src/kernel/qapplication.cpp | |
parent | ff2caed1b8e1bea513172d48d07b13f53b73a9de (diff) | |
download | tqt3-0e044c1a92745f8508f5813efc9709a280583d11.tar.gz tqt3-0e044c1a92745f8508f5813efc9709a280583d11.zip |
Automated update from Qt3
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r-- | src/kernel/qapplication.cpp | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 3dc3db748..71b87ffe0 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -2557,6 +2557,21 @@ bool TQApplication::event( TQEvent *e ) return TQObject::event(e); } +#define HOVER_SENSITIVE_WIDGET_SELECT if ( widget->inherits("TQPushButton") \ + || widget->inherits("TQComboBox") \ + || widget->inherits("TQSpinWidget") \ + || widget->inherits("TQCheckBox") \ + || widget->inherits("TQRadioButton") \ + || widget->inherits("TQToolButton") \ + || widget->inherits("TQSlider") \ + || widget->inherits("TQScrollBar") \ + || widget->inherits("TQTabBar") \ + || widget->inherits("TQDockWindowHandle") \ + || widget->inherits("TQSplitterHandle") ) + +#define FOCUS_SENSITIVE_WIDGET_SELECT if ( widget->inherits("TQLineEdit") ) +#define FOCUS_SENSITIVE_PARENT_WIDGET_SELECT if ( widget->parentWidget() && widget->parentWidget()->inherits("TQSpinWidget") ) + /*!\internal Helper function called by notify() @@ -2579,10 +2594,28 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e) TQWidget *widget = (TQWidget*)receiver; // toggle HasMouse widget state on enter and leave - if ( e->type() == TQEvent::Enter || e->type() == TQEvent::DragEnter ) + if ( e->type() == TQEvent::Enter || e->type() == TQEvent::DragEnter ) { widget->setWState( WState_HasMouse ); - else if ( e->type() == TQEvent::Leave || e->type() == TQEvent::DragLeave ) + HOVER_SENSITIVE_WIDGET_SELECT { + widget->repaint(false); + } + } + else if ( e->type() == TQEvent::Leave || e->type() == TQEvent::DragLeave ) { widget->clearWState( WState_HasMouse ); + HOVER_SENSITIVE_WIDGET_SELECT { + widget->repaint(false); + } + } + + // repaint information entry widgets on focus set/unset + if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) { + FOCUS_SENSITIVE_WIDGET_SELECT { + widget->repaint(false); + } + FOCUS_SENSITIVE_PARENT_WIDGET_SELECT { + widget->parentWidget()->repaint(false); + } + } // throw away any mouse-tracking-only mouse events if ( e->type() == TQEvent::MouseMove && |