diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 7d07360b3..6cfcd3637 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -361,6 +361,11 @@ Singleton { property bool pinnedOnStartup: false } + property JsonObject overlay: JsonObject { + property bool openingZoomAnimation: true + property bool darkenScreen: true + } + property JsonObject overview: JsonObject { property bool enable: true property real scale: 0.18 // Relative to screen size diff --git a/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml b/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml index 9322bd777..838267b80 100644 --- a/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml +++ b/dots/.config/quickshell/ii/modules/overlay/OverlayContent.qml @@ -20,7 +20,7 @@ Item { } } - property real initScale: 1.08 + property real initScale: Config.options.overlay.openingZoomAnimation ? 1.08 : 1.000001 scale: initScale Component.onCompleted: { scale = 1 @@ -33,6 +33,7 @@ Item { id: bg anchors.fill: parent color: Appearance.colors.colScrim + visible: Config.options.overlay.darkenScreen && opacity > 0 opacity: (GlobalStates.overlayOpen && root.scale !== initScale) ? 1 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) diff --git a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index a373e9959..c26cce455 100644 --- a/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -7,45 +7,6 @@ import qs.modules.common.widgets ContentPage { forceWidth: true - ContentSection { - icon: "point_scan" - title: Translation.tr("Crosshair overlay") - - MaterialTextArea { - Layout.fillWidth: true - placeholderText: Translation.tr("Crosshair code (in Valorant's format)") - text: Config.options.crosshair.code - wrapMode: TextEdit.Wrap - onTextChanged: { - Config.options.crosshair.code = text; - } - } - - RowLayout { - StyledText { - Layout.leftMargin: 10 - color: Appearance.colors.colSubtext - font.pixelSize: Appearance.font.pixelSize.smallie - text: Translation.tr("Press Super+G to open the overlay and pin the crosshair") - } - Item { - Layout.fillWidth: true - } - RippleButtonWithIcon { - id: editorButton - buttonRadius: Appearance.rounding.full - materialIcon: "open_in_new" - mainText: Translation.tr("Open editor") - onClicked: { - Qt.openUrlExternally(`https://www.vcrdb.net/builder?c=${Config.options.crosshair.code}`); - } - StyledToolTip { - text: "www.vcrdb.net" - } - } - } - } - ContentSection { icon: "call_to_action" title: Translation.tr("Dock") @@ -214,6 +175,67 @@ ContentPage { } } + ContentSection { + icon: "select_window" + title: Translation.tr("Overlay: General") + + ConfigSwitch { + buttonIcon: "high_density" + text: Translation.tr("Enable opening zoom animation") + checked: Config.options.overlay.openingZoomAnimation + onCheckedChanged: { + Config.options.overlay.openingZoomAnimation = checked; + } + } + ConfigSwitch { + buttonIcon: "texture" + text: Translation.tr("Darken screen") + checked: Config.options.overlay.darkenScreen + onCheckedChanged: { + Config.options.overlay.darkenScreen = checked; + } + } + } + + ContentSection { + icon: "point_scan" + title: Translation.tr("Overlay: Crosshair") + + MaterialTextArea { + Layout.fillWidth: true + placeholderText: Translation.tr("Crosshair code (in Valorant's format)") + text: Config.options.crosshair.code + wrapMode: TextEdit.Wrap + onTextChanged: { + Config.options.crosshair.code = text; + } + } + + RowLayout { + StyledText { + Layout.leftMargin: 10 + color: Appearance.colors.colSubtext + font.pixelSize: Appearance.font.pixelSize.smallie + text: Translation.tr("Press Super+G to open the overlay and pin the crosshair") + } + Item { + Layout.fillWidth: true + } + RippleButtonWithIcon { + id: editorButton + buttonRadius: Appearance.rounding.full + materialIcon: "open_in_new" + mainText: Translation.tr("Open editor") + onClicked: { + Qt.openUrlExternally(`https://www.vcrdb.net/builder?c=${Config.options.crosshair.code}`); + } + StyledToolTip { + text: "www.vcrdb.net" + } + } + } + } + ContentSection { icon: "screenshot_frame_2" title: Translation.tr("Region selector (screen snipping/Google Lens)")