From b1bb2c8ee22629521db97ed0f15690be29976dcb Mon Sep 17 00:00:00 2001 From: fde-capu Date: Mon, 3 Mar 2025 19:18:57 -0300 Subject: [PATCH 1/2] Shift+Alt+Left: previous profile; Shift+Alt+Right: next profile. --- app/qml/ApplicationSettings.qml | 2 ++ app/qml/main.qml | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml index 424f0bd..f170d2f 100644 --- a/app/qml/ApplicationSettings.qml +++ b/app/qml/ApplicationSettings.qml @@ -57,6 +57,8 @@ QtObject { property real burnInQuality: 0.5 property bool blinkingCursor: false + property bool useKeybinds: false + property real currentProfileIndex: 0 onWindowScalingChanged: handleFontChanged() diff --git a/app/qml/main.qml b/app/qml/main.qml index 8ae0774..40b7e55 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -128,6 +128,32 @@ ApplicationWindow { shortcut: "Ctrl+-" onTriggered: appSettings.decrementScaling() } + Action { + id: previousProfie + text: qsTr("Previous profile.") + enabled: appSettings.useKeybinds + shortcut: "Shift+Alt+Left" + onTriggered: { + var current = appSettings.currentProfileIndex + current -= 1 + current = current < 0 ? appSettings.profilesList.count - 1 : current + appSettings.currentProfileIndex = current + appSettings.loadProfile(current) + } + } + Action { + id: nextProfile + text: qsTr("Next profile.") + enabled: appSettings.useKeybinds + shortcut: "Shift+Alt+Right" + onTriggered: { + var current = appSettings.currentProfileIndex + current += 1 + current = current < appSettings.profilesList.count ? current : 0 + appSettings.currentProfileIndex = current + appSettings.loadProfile(current) + } + } Action { id: showAboutAction text: qsTr("About") From 24a93c8bb46727b8f38797b458b5cf7359f5bf3a Mon Sep 17 00:00:00 2001 From: fde-capu Date: Tue, 4 Mar 2025 18:25:18 -0300 Subject: [PATCH 2/2] Profile change does not affect brightess, contrast or windowOpacity. --- app/qml/main.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/qml/main.qml b/app/qml/main.qml index 40b7e55..4bc188b 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -138,7 +138,9 @@ ApplicationWindow { current -= 1 current = current < 0 ? appSettings.profilesList.count - 1 : current appSettings.currentProfileIndex = current + var unload = (appSettings.brightness, appSettings.contrast, appSettings.windowOpacity) appSettings.loadProfile(current) + appSettings.brightness, appSettings.contrast, appSettings.windowOpacity = unload } } Action { @@ -151,7 +153,9 @@ ApplicationWindow { current += 1 current = current < appSettings.profilesList.count ? current : 0 appSettings.currentProfileIndex = current + var unload = (appSettings.brightness, appSettings.contrast, appSettings.windowOpacity) appSettings.loadProfile(current) + appSettings.brightness, appSettings.contrast, appSettings.windowOpacity = unload } } Action {