on xenial help sign in
Fixed menu mnemonics
commit330fb96656c576c91929f0da576d1458d0f6b6bd authorNick Dedekind <nick.dedekind@canonical.com> dateTue 13 Dec 2016, 09:56 (10 years ago) parent81ac619
3 files changed+10−2
qml/ApplicationMenus/MenuBar.qml+2−1 qml/ApplicationMenus/MenuItem.qml+2−1 qml/OrientedShell.qml+6
qml/ApplicationMenus/MenuBar.qml+2−1
@@ -157,7 +157,8 @@ Item {
157157 height: _title.height
158158
159159 action: Action {
160− text: model.label.replace("_", "&")
160+ // FIXME - SDK Action:text modifies menu text with html underline for mnemonic
161+ text: model.label.replace("_", "&").replace("<u>", "&").replace("</u>", "")
161162
162163 onTriggered: {
163164 visualItem.show();
qml/ApplicationMenus/MenuItem.qml+2−1
@@ -46,7 +46,8 @@ ActionItem {
4646 enabled: menuData ? menuData.sensitive : false
4747
4848 action: Action {
49− text: menuData.label.replace("_", "&")
49+ // FIXME - SDK Action:text modifies menu text with html underline for mnemonic
50+ text: menuData.label.replace("_", "&").replace("<u>", "&").replace("</u>", "")
5051 checkable: menuData.isCheck || menuData.isRadio
5152 checked: menuData.isToggled
5253 }
qml/OrientedShell.qml+6
@@ -98,6 +98,12 @@ Item {
9898 deviceFilter: InputInfo.TouchScreen
9999 }
100100
101+ Binding {
102+ target: QuickUtils
103+ property: "keyboardAttached"
104+ value: keyboardsModel.count > 0
105+ }
106+
101107 readonly property int pointerInputDevices: miceModel.count + touchPadModel.count
102108 onPointerInputDevicesChanged: calculateUsageMode()
103109