mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-11-27 15:54:09 +00:00
Added Use Keybinds on Options.
This commit is contained in:
parent
64f2b6a14a
commit
db9d899080
@ -57,6 +57,7 @@ QtObject {
|
||||
property real burnInQuality: 0.5
|
||||
|
||||
property bool blinkingCursor: false
|
||||
property bool useKeybinds: false
|
||||
|
||||
onWindowScalingChanged: handleFontChanged()
|
||||
|
||||
@ -271,6 +272,7 @@ QtObject {
|
||||
"fontWidth": fontWidth,
|
||||
"margin": _margin,
|
||||
"blinkingCursor": blinkingCursor,
|
||||
"useKeybinds": useKeybinds,
|
||||
"frameMargin": _frameMargin,
|
||||
}
|
||||
return settings
|
||||
@ -381,6 +383,7 @@ QtObject {
|
||||
_frameMargin = settings.frameMargin !== undefined ? settings.frameMargin : _frameMargin
|
||||
|
||||
blinkingCursor = settings.blinkingCursor !== undefined ? settings.blinkingCursor : blinkingCursor
|
||||
useKeybinds = settings.useKeybinds !== undefined ? settings.useKeybinds : useKeybinds
|
||||
|
||||
handleFontChanged()
|
||||
}
|
||||
|
||||
@ -114,9 +114,9 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
GroupBox {
|
||||
title: qsTr("Cursor")
|
||||
title: qsTr("Misc.")
|
||||
Layout.fillWidth: true
|
||||
ColumnLayout {
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
CheckBox {
|
||||
id: blinkingCursor
|
||||
@ -129,6 +129,12 @@ ColumnLayout {
|
||||
property: "checked"
|
||||
value: appSettings.blinkingCursor
|
||||
}
|
||||
CheckBox {
|
||||
id: useBindings
|
||||
text: qsTr("Use Keybinds")
|
||||
checked: appSettings.useKeybinds
|
||||
onCheckedChanged: appSettings.useKeybinds = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
GroupBox {
|
||||
|
||||
@ -130,9 +130,11 @@ ApplicationWindow {
|
||||
shortcut: "Ctrl+-"
|
||||
onTriggered: appSettings.decrementScaling()
|
||||
}
|
||||
|
||||
Action {
|
||||
id: lessOpaque
|
||||
text: qsTr("Make less opaque.")
|
||||
enabled: appSettings.useKeybinds
|
||||
shortcut: "Ctrl+Shift+Up"
|
||||
onTriggered: {
|
||||
appSettings.windowOpacity -= appSettings.windowOpacity > keybindStep ? keybindStep : 0
|
||||
@ -141,6 +143,7 @@ ApplicationWindow {
|
||||
Action {
|
||||
id: moreOpaque
|
||||
text: qsTr("Make more opaque.")
|
||||
enabled: appSettings.useKeybinds
|
||||
shortcut: "Ctrl+Shift+Down"
|
||||
onTriggered: {
|
||||
appSettings.windowOpacity += appSettings.windowOpacity < (1 - keybindStep) ? keybindStep : 0
|
||||
@ -149,6 +152,7 @@ ApplicationWindow {
|
||||
Action {
|
||||
id: moreContrast
|
||||
text: qsTr("More contrast.")
|
||||
enabled: appSettings.useKeybinds
|
||||
shortcut: "Ctrl+Up"
|
||||
onTriggered: {
|
||||
appSettings.contrast += appSettings.contrast < (1 - keybindStep) ? keybindStep : 0
|
||||
@ -157,6 +161,7 @@ ApplicationWindow {
|
||||
Action {
|
||||
id: lessContrast
|
||||
text: qsTr("Less contrast.")
|
||||
enabled: appSettings.useKeybinds
|
||||
shortcut: "Ctrl+Down"
|
||||
onTriggered: {
|
||||
appSettings.contrast -= appSettings.contrast > keybindStep ? keybindStep : 0
|
||||
@ -165,6 +170,7 @@ ApplicationWindow {
|
||||
Action {
|
||||
id: brighter
|
||||
text: qsTr("Brighter.")
|
||||
enabled: appSettings.useKeybinds
|
||||
shortcut: "Alt+Up"
|
||||
onTriggered: {
|
||||
appSettings.brightness += appSettings.brightness < (1 - keybindStep) ? keybindStep : 0
|
||||
@ -173,11 +179,13 @@ ApplicationWindow {
|
||||
Action {
|
||||
id: darker
|
||||
text: qsTr("Darker.")
|
||||
enabled: appSettings.useKeybinds
|
||||
shortcut: "Alt+Down"
|
||||
onTriggered: {
|
||||
appSettings.brightness -= appSettings.brightness > keybindStep ? keybindStep : 0
|
||||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
id: showAboutAction
|
||||
text: qsTr("About")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user