diff options
author | Jørgen Lind <jorgen.lind@digia.com> | 2014-05-21 13:57:09 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@digia.com> | 2014-09-16 12:03:20 +0200 |
commit | 0ed68f3f58c63bd1496cb268bd83881da180051f (patch) | |
tree | 2a9ced3368fd2904e1bf52333f11ae48c4c70964 /src/widgets/styles/qstyle.cpp | |
parent | fb44d3838a0a35cbc0d23323c614deaac986507f (diff) |
Refactor the sloppy submenu logic
And enable the style to control the behavior of the sloppy submenus
[ChangeLog][QtWidgets][QMenu] QMenu now pick up how "sloppy" submenus
behave from the style
Task-number: QTBUG-20094
Change-Id: Ib1a9770d9b63028033cc360ae236471449d00267
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/widgets/styles/qstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstyle.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index fb5a5c9003..5c292ea85d 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1711,6 +1711,32 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, other items of the menu. This is supported on most modern desktop platforms. + \value SH_Menu_SubMenuUniDirection Since Qt 5.5. If the cursor has + to move towards the submenu (like it is on OS X), or if the + cursor can move in any direction as long as it reaches the + submenu before the sloppy timeout. + + \value SH_Menu_SubMenuUniDirectionFailCount Since Qt 5.5. When + SH_Menu_SubMenuUniDirection is defined this enum defines the + number of failed mouse moves before the sloppy submenu is + discarded. This can be used to control the "strictness" of the + uni direction algorithm. + + \value SH_Menu_SubMenuSloppySelectOtherActions Since Qt 5.5. Should + other action items be selected when the mouse moves towards a + sloppy submenu. + + \value SH_Menu_SubMenuSloppyCloseTimeout Since Qt 5.5. The timeout + used to close sloppy submenus. + + \value SH_Menu_SubMenuResetWhenReenteringParent Since Qt 5.5. When + entering parent from child submenu, should the sloppy state be + reset, effectively closing the child and making the current + submenu active. + + \value SH_Menu_SubMenuDontStartSloppyOnLeave Since Qt 5.5. Do not + start sloppy timers when the mouse leaves a sub-menu. + \value SH_ScrollView_FrameOnlyAroundContents Whether scrollviews draw their frame only around contents (like Motif), or around contents, scroll bars and corner widgets (like Windows). |