on xenial help sign in
toggle fixing
5437420Nick Dedekind
qml/ApplicationMenus/MenuItem.qml+16−9
@@ -48,7 +48,7 @@ ActionItem {
48 action: Action {
48 action: Action {
49 text: menuData.label.replace("_", "&")
49 text: menuData.label.replace("_", "&")
50 checkable: menuData.isCheck || menuData.isRadio
50 checkable: menuData.isCheck || menuData.isRadio
51− // TODO - exclusive groups.
51+ checked: menuData.isToggled
52 }
52 }
53
53
54 width: {
54 width: {
@@ -59,14 +59,16 @@ ActionItem {
59
59
60 Keys.onRightPressed: {
60 Keys.onRightPressed: {
61 if (hasSubmenu) {
61 if (hasSubmenu) {
62− root.trigger(action && action.checkable ? !action.checked : undefined);
62+ root.trigger();
63 } else {
63 } else {
64 event.accepted = false;
64 event.accepted = false;
65 }
65 }
66 }
66 }
67+ Keys.onReturnPressed: {
68+ root.trigger();
69+ }
67 Keys.onEnterPressed: {
70 Keys.onEnterPressed: {
68− root.trigger(action && action.checkable ? !action.checked : undefined);
71+ root.trigger();
69− event.accepted = true;
70 }
72 }
71
73
72 RowLayout {
74 RowLayout {
@@ -78,12 +80,17 @@ ActionItem {
78 anchors.rightMargin: units.gu(1)
80 anchors.rightMargin: units.gu(1)
79 anchors.verticalCenter: parent.verticalCenter
81 anchors.verticalCenter: parent.verticalCenter
80
82
81− Icon {
83+ Item {
82− id: flagGutter
83− width: units.gu(1.5)
84+ Layout.minimumWidth: units.gu(1.5)
84− height: units.gu(1.5)
85+ Layout.minimumHeight: units.gu(1.5)
85
86
87+ Icon {
88+ id: flagGutter
89+ width: units.gu(1.5)
90+ height: units.gu(1.5)
91+ visible: _checked
86− name: _checked ? "tick" : ""
92+ name: "tick"
93+ }
87 }
94 }
88
95
89 Icon {
96 Icon {