diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-10-19 22:51:12 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-10-19 22:51:12 -0500 |
commit | f175db0cdb14fe5e62b3fbdc785cd3b09576ef1d (patch) | |
tree | 8b690a0a04d4143e087324a425621cd12b38d8f1 /src/kernel/qapplication.cpp | |
parent | 41e5b784ee48d2cb403bb551bcbe7cbd322c4336 (diff) | |
parent | 4037eb7e84eda2b72a456cf7ff19182c2d4a1f7a (diff) | |
download | qt3-f175db0cdb14fe5e62b3fbdc785cd3b09576ef1d.tar.gz qt3-f175db0cdb14fe5e62b3fbdc785cd3b09576ef1d.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/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 7296f4c..0478cf1 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -2557,6 +2557,21 @@ bool QApplication::event( QEvent *e ) return QObject::event(e); } +#define HOVER_SENSITIVE_WIDGET_SELECT if ( widget->inherits("QPushButton") \ + || widget->inherits("QComboBox") \ + || widget->inherits("QSpinWidget") \ + || widget->inherits("QCheckBox") \ + || widget->inherits("QRadioButton") \ + || widget->inherits("QToolButton") \ + || widget->inherits("QSlider") \ + || widget->inherits("QScrollBar") \ + || widget->inherits("QTabBar") \ + || widget->inherits("QDockWindowHandle") \ + || widget->inherits("QSplitterHandle") ) + +#define FOCUS_SENSITIVE_WIDGET_SELECT if ( widget->inherits("QLineEdit") ) +#define FOCUS_SENSITIVE_PARENT_WIDGET_SELECT if ( widget->parentWidget() && widget->parentWidget()->inherits("QSpinWidget") ) + /*!\internal Helper function called by notify() @@ -2579,10 +2594,28 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e) QWidget *widget = (QWidget*)receiver; // toggle HasMouse widget state on enter and leave - if ( e->type() == QEvent::Enter || e->type() == QEvent::DragEnter ) + if ( e->type() == QEvent::Enter || e->type() == QEvent::DragEnter ) { widget->setWState( WState_HasMouse ); - else if ( e->type() == QEvent::Leave || e->type() == QEvent::DragLeave ) + HOVER_SENSITIVE_WIDGET_SELECT { + widget->repaint(false); + } + } + else if ( e->type() == QEvent::Leave || e->type() == QEvent::DragLeave ) { widget->clearWState( WState_HasMouse ); + HOVER_SENSITIVE_WIDGET_SELECT { + widget->repaint(false); + } + } + + // repaint information entry widgets on focus set/unset + if ( e->type() == QEvent::FocusIn || e->type() == QEvent::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() == QEvent::MouseMove && |