Merge 24a93c8bb46727b8f38797b458b5cf7359f5bf3a into f157648d1e51878a10e02a8836c1e15aa8c59cc9

This commit is contained in:
fde-capu 2025-03-04 21:26:07 +00:00 committed by GitHub
commit acffb65590
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View File

@ -57,6 +57,8 @@ QtObject {
property real burnInQuality: 0.5
property bool blinkingCursor: false
property bool useKeybinds: false
property real currentProfileIndex: 0
onWindowScalingChanged: handleFontChanged()

View File

@ -128,6 +128,36 @@ 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
var unload = (appSettings.brightness, appSettings.contrast, appSettings.windowOpacity)
appSettings.loadProfile(current)
appSettings.brightness, appSettings.contrast, appSettings.windowOpacity = unload
}
}
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
var unload = (appSettings.brightness, appSettings.contrast, appSettings.windowOpacity)
appSettings.loadProfile(current)
appSettings.brightness, appSettings.contrast, appSettings.windowOpacity = unload
}
}
Action {
id: showAboutAction
text: qsTr("About")