forked from Shinonome/dots-hyprland
overlay: add option for zoom anim and darkening surface
This commit is contained in:
@@ -361,6 +361,11 @@ Singleton {
|
|||||||
property bool pinnedOnStartup: false
|
property bool pinnedOnStartup: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property JsonObject overlay: JsonObject {
|
||||||
|
property bool openingZoomAnimation: true
|
||||||
|
property bool darkenScreen: true
|
||||||
|
}
|
||||||
|
|
||||||
property JsonObject overview: JsonObject {
|
property JsonObject overview: JsonObject {
|
||||||
property bool enable: true
|
property bool enable: true
|
||||||
property real scale: 0.18 // Relative to screen size
|
property real scale: 0.18 // Relative to screen size
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property real initScale: 1.08
|
property real initScale: Config.options.overlay.openingZoomAnimation ? 1.08 : 1.000001
|
||||||
scale: initScale
|
scale: initScale
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
scale = 1
|
scale = 1
|
||||||
@@ -33,6 +33,7 @@ Item {
|
|||||||
id: bg
|
id: bg
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Appearance.colors.colScrim
|
color: Appearance.colors.colScrim
|
||||||
|
visible: Config.options.overlay.darkenScreen && opacity > 0
|
||||||
opacity: (GlobalStates.overlayOpen && root.scale !== initScale) ? 1 : 0
|
opacity: (GlobalStates.overlayOpen && root.scale !== initScale) ? 1 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)
|
||||||
|
|||||||
@@ -7,45 +7,6 @@ import qs.modules.common.widgets
|
|||||||
ContentPage {
|
ContentPage {
|
||||||
forceWidth: true
|
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 {
|
ContentSection {
|
||||||
icon: "call_to_action"
|
icon: "call_to_action"
|
||||||
title: Translation.tr("Dock")
|
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 {
|
ContentSection {
|
||||||
icon: "screenshot_frame_2"
|
icon: "screenshot_frame_2"
|
||||||
title: Translation.tr("Region selector (screen snipping/Google Lens)")
|
title: Translation.tr("Region selector (screen snipping/Google Lens)")
|
||||||
|
|||||||
Reference in New Issue
Block a user