summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@digia.com>2014-05-21 13:57:09 +0200
committerJørgen Lind <jorgen.lind@digia.com>2014-09-16 12:03:20 +0200
commit0ed68f3f58c63bd1496cb268bd83881da180051f (patch)
tree2a9ced3368fd2904e1bf52333f11ae48c4c70964 /src/widgets/styles/qmacstyle_mac.mm
parentfb44d3838a0a35cbc0d23323c614deaac986507f (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/qmacstyle_mac.mm')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 242a1c1c9e..8b61ca40d7 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -2547,6 +2547,19 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_Menu_SubMenuPopupDelay:
ret = 100;
break;
+ case SH_Menu_SubMenuUniDirection:
+ ret = true;
+ break;
+ case SH_Menu_SubMenuSloppySelectOtherActions:
+ ret = false;
+ break;
+ case SH_Menu_SubMenuResetWhenReenteringParent:
+ ret = true;
+ break;
+ case SH_Menu_SubMenuDontStartSloppyOnLeave:
+ ret = true;
+ break;
+
case SH_ScrollBar_LeftClickAbsolutePosition: {
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
bool result = [defaults boolForKey:@"AppleScrollerPagingBehavior"];