diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml index 424f0bd8..2c77ede8 100644 --- a/app/qml/ApplicationSettings.qml +++ b/app/qml/ApplicationSettings.qml @@ -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() } diff --git a/app/qml/SettingsTerminalTab.qml b/app/qml/SettingsTerminalTab.qml index 222ea781..7ea4142c 100644 --- a/app/qml/SettingsTerminalTab.qml +++ b/app/qml/SettingsTerminalTab.qml @@ -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 { diff --git a/app/qml/TerminalContainer.qml b/app/qml/TerminalContainer.qml index b6be4359..36cd898a 100644 --- a/app/qml/TerminalContainer.qml +++ b/app/qml/TerminalContainer.qml @@ -29,7 +29,8 @@ ShaderTerminal { property real devicePixelRatio: terminalWindow.screen.devicePixelRatio id: mainShader - opacity: appSettings.windowOpacity * 0.3 + 0.7 + + opacity: appSettings.windowOpacity + 0.001 source: terminal.mainSource burnInEffect: terminal.burnInEffect diff --git a/app/qml/main.qml b/app/qml/main.qml index 8ae07743..82073859 100644 --- a/app/qml/main.qml +++ b/app/qml/main.qml @@ -29,6 +29,8 @@ ApplicationWindow { width: 1024 height: 768 + property real keybindStep: 0.01 + // Save window properties automatically onXChanged: appSettings.x = x onYChanged: appSettings.y = y @@ -128,6 +130,62 @@ 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 + } + } + Action { + id: moreOpaque + text: qsTr("Make more opaque.") + enabled: appSettings.useKeybinds + shortcut: "Ctrl+Shift+Down" + onTriggered: { + appSettings.windowOpacity += appSettings.windowOpacity < (1 - keybindStep) ? keybindStep : 0 + } + } + Action { + id: moreContrast + text: qsTr("More contrast.") + enabled: appSettings.useKeybinds + shortcut: "Ctrl+Up" + onTriggered: { + appSettings.contrast += appSettings.contrast < (1 - keybindStep) ? keybindStep : 0 + } + } + Action { + id: lessContrast + text: qsTr("Less contrast.") + enabled: appSettings.useKeybinds + shortcut: "Ctrl+Down" + onTriggered: { + appSettings.contrast -= appSettings.contrast > keybindStep ? keybindStep : 0 + } + } + Action { + id: brighter + text: qsTr("Brighter.") + enabled: appSettings.useKeybinds + shortcut: "Alt+Up" + onTriggered: { + appSettings.brightness += appSettings.brightness < (1 - keybindStep) ? keybindStep : 0 + } + } + 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")