diff --git a/virtscreen/qml/AppWindow.qml b/virtscreen/qml/AppWindow.qml index ae63d88..697b018 100644 --- a/virtscreen/qml/AppWindow.qml +++ b/virtscreen/qml/AppWindow.qml @@ -10,7 +10,7 @@ ApplicationWindow { id: window visible: false flags: Qt.FramelessWindowHint - title: "Basic layouts" + title: "VirtScreen" property int theme_color: settings.theme_color Material.theme: Material.Light diff --git a/virtscreen/qml/main.qml b/virtscreen/qml/main.qml index 99a4dbe..ffc6588 100644 --- a/virtscreen/qml/main.qml +++ b/virtscreen/qml/main.qml @@ -40,6 +40,9 @@ Item { Timer { id: timer function setTimeout(cb, delayTime) { + if (timer.running) { + console.log('Timer is already running!'); + } timer.interval = delayTime; timer.repeat = false; timer.triggered.connect(cb); @@ -97,9 +100,6 @@ Item { window.show(); window.raise(); window.requestActivate(); - timer.setTimeout (function() { - sysTrayIcon.clicked = false; - }, 200); } } @@ -111,7 +111,7 @@ Item { "../icon/icon.png" visible: true property bool clicked: false - onMessageClicked: console.log("Message clicked") + Component.onCompleted: { // without delay, the message appears in a wierd place timer.setTimeout (function() { @@ -127,6 +127,9 @@ Item { return; } sysTrayIcon.clicked = true; + timer.setTimeout (function() { + sysTrayIcon.clicked = false; + }, 200); mainLoader.active = true; }