Add screenshot button to power menu (#329)
Add screenshot button to power menu for devices where both volume keys cannot be pressed simultaneously.
commit01fed9a06f3387e46ac86dc6a2802fe7566a58f8
authorKevin Keijzer <40460031+kkeijzer@users.noreply.github.com>
dateFri 25 Sep 2020, 18:56 (6 years ago)
parente2c28d6
qml/Components/Dialogs.qml+8
@@ -271,6 +271,14 @@ MouseArea {
271271 topLevelSurfaceList.closeAllWindows();
272272 }
273273 }
274+ Button {
275+ width: parent.width
276+ text: i18n.tr("Screenshot")
277+ onClicked: {
278+ powerDialog.hide();
279+ itemGrabber.capture(shell);
280+ }
281+ }
274282 Button {
275283 width: parent.width
276284 text: i18n.tr("Cancel")
tests/qmltests/tst_OrientedShell.qml+3
@@ -1585,6 +1585,9 @@ Rectangle {
15851585 keyClick(data.key);
15861586 tryCompare(buttons[2], "activeFocus", true);
15871587
1588+ keyClick(data.key);
1589+ tryCompare(buttons[3], "activeFocus", true);
1590+
15881591 keyClick(data.key);
15891592 tryCompare(buttons[0], "activeFocus", true);
15901593