on xenial help sign in
Add mouse navigation for Indicators
commit641ba730f2d359c87865379e65d5a76971fdbb7a authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 21 Dec 2016, 16:06 (10 years ago) parent1b6b921
2 files changed+14
qml/Panel/IndicatorsBar.qml+1 qml/Panel/IndicatorsMenu.qml+13
qml/Panel/IndicatorsBar.qml+1
@@ -43,6 +43,7 @@ Item {
4343 row.resetCurrentItem();
4444 }
4545 row.setCurrentItemIndex(index);
46+ d.alignIndicators();
4647 }
4748
4849 function addScrollOffset(scrollAmmout) {
qml/Panel/IndicatorsMenu.qml+13
@@ -131,6 +131,19 @@ Showable {
131131 color: panelColor
132132 }
133133
134+ Keys.onPressed: {
135+ if (event.key === Qt.Key_Left) {
136+ bar.setCurrentItemIndex(bar.currentItemIndex - 1);
137+ event.accepted = true;
138+ } else if (event.key === Qt.Key_Right) {
139+ bar.setCurrentItemIndex(bar.currentItemIndex + 1);
140+ event.accepted = true;
141+ } else if (event.key === Qt.Key_Escape) {
142+ root.hide();
143+ event.accepted = true;
144+ }
145+ }
146+
134147 IndicatorsBar {
135148 id: bar
136149 objectName: "indicatorsBar"