@@ -20,17 +20,17 @@ import ScreenGrabber 0.1
21Rectangle {
21Rectangle {
23− enabled: false
23+ enabled: true
24 visible: false
24 visible: false
25 color: "white"
25 color: "white"
26 anchors.fill: parent
26 anchors.fill: parent
27 opacity: 0.0
27 opacity: 0.0
29 QtObject {
30 QtObject {
30 id: keyState
31 id: keyState
31 property bool volumeUpPressed: false
32 property bool volumeUpPressed: false
32 property bool volumeDownPressed: false
33 property bool volumeDownPressed: false
33− property bool ignoreKeyPresses: false
34 property bool ignoreKeyRepeats: false
34 property bool ignoreKeyRepeats: false
@@ -46,7 +46,7 @@ Rectangle {
48 function onKeyPressed(key) {
48 function onKeyPressed(key) {
49− if (keyState.ignoreKeyPresses || keyState.ignoreKeyRepeats)
49+ if (!enabled || keyState.ignoreKeyRepeats)
52 if (key == Qt.Key_VolumeUp)
52 if (key == Qt.Key_VolumeUp)
@@ -57,7 +57,6 @@ Rectangle {
57 if (keyState.volumeDownPressed && keyState.volumeUpPressed) {
57 if (keyState.volumeDownPressed && keyState.volumeUpPressed) {
58 // Only take one screenshot if both keys are held
58 // Only take one screenshot if both keys are held
59 keyState.ignoreKeyRepeats = true;
59 keyState.ignoreKeyRepeats = true;
61 visible = true;
60 visible = true;
62 shutterSound.stop();
61 shutterSound.stop();
63 shutterSound.play();
62 shutterSound.play();
@@ -80,7 +79,7 @@ Rectangle {
82 onStopped: {
81 onStopped: {
83− if (enabled && visible) {
82+ if (visible) {
84 fadeOut.start();
83 fadeOut.start();
@@ -91,9 +90,8 @@ Rectangle {
93 onStopped: {
92 onStopped: {
94− if (enabled && visible) {
93+ if (visible) {
95 screenGrabber.captureAndSave();
94 screenGrabber.captureAndSave();
97 visible = false;
95 visible = false;