mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-02 03:28:28 -04:00
feat(Xray): Automatic Xray blur effects for Niri & Hyprland layouts
- Utilizes include layout within niri configs & hyprland's layout layer rules for lua configs
This commit is contained in:
@@ -310,6 +310,26 @@ Item {
|
||||
defaultValue: 2
|
||||
onSliderValueChanged: newValue => SettingsData.set("niriLayoutBorderSize", newValue)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
tags: ["niri", "xray", "blur", "background-effect", "performance"]
|
||||
settingKey: "niriLayoutXrayEnabled"
|
||||
text: I18n.tr("Xray Blur Effect")
|
||||
description: SettingsData.niriLayoutXrayEnabled ? I18n.tr("Xray on makes the windows background visible through to the wallpaper") : I18n.tr("Xray off shows the real background beneath the blurred surfaces")
|
||||
checked: SettingsData.niriLayoutXrayEnabled
|
||||
onToggled: checked => SettingsData.set("niriLayoutXrayEnabled", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
// Hidden in Frame Connected mode, where it has no target
|
||||
visible: !(SettingsData.frameEnabled && SettingsData.frameMode === "connected")
|
||||
tags: ["niri", "xray", "bar", "frame", "performance"]
|
||||
settingKey: "niriLayoutBarXrayEnabled"
|
||||
text: SettingsData.frameEnabled ? I18n.tr("Frame Xray") : I18n.tr("Dank Bar Xray")
|
||||
description: SettingsData.niriLayoutBarXrayEnabled ? (SettingsData.frameEnabled ? I18n.tr("Xray on makes the Frame's border visible through to the wallpaper; more efficient") : I18n.tr("Xray on makes the Dank Bar visible through to the wallpaper; more efficient")) : (SettingsData.frameEnabled ? I18n.tr("Xray off shows the real background beneath the Frame's border") : I18n.tr("Xray off shows the real background beneath the Dank Bar"))
|
||||
checked: SettingsData.niriLayoutBarXrayEnabled
|
||||
onToggled: checked => SettingsData.set("niriLayoutBarXrayEnabled", checked)
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
@@ -416,6 +436,26 @@ Item {
|
||||
checked: SettingsData.hyprlandResizeOnBorder
|
||||
onToggled: checked => SettingsData.set("hyprlandResizeOnBorder", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
tags: ["hyprland", "xray", "blur", "background-effect", "performance"]
|
||||
settingKey: "hyprlandLayoutXrayEnabled"
|
||||
text: I18n.tr("Xray Blur Effect")
|
||||
description: SettingsData.hyprlandLayoutXrayEnabled ? I18n.tr("Xray on makes the windows background visible through to the wallpaper") : I18n.tr("Xray off shows the real background beneath the blurred surfaces")
|
||||
checked: SettingsData.hyprlandLayoutXrayEnabled
|
||||
onToggled: checked => SettingsData.set("hyprlandLayoutXrayEnabled", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
// Hidden in Frame Connected mode, where it has no target
|
||||
visible: !(SettingsData.frameEnabled && SettingsData.frameMode === "connected")
|
||||
tags: ["hyprland", "xray", "bar", "frame", "performance"]
|
||||
settingKey: "hyprlandLayoutBarXrayEnabled"
|
||||
text: SettingsData.frameEnabled ? I18n.tr("Frame Xray") : I18n.tr("Dank Bar Xray")
|
||||
description: SettingsData.hyprlandLayoutBarXrayEnabled ? (SettingsData.frameEnabled ? I18n.tr("Xray on makes the Frame's border visible through to the wallpaper; more efficient") : I18n.tr("Xray on makes the Dank Bar visible through to the wallpaper; more efficient")) : (SettingsData.frameEnabled ? I18n.tr("Xray off shows the real background beneath the Frame's border") : I18n.tr("Xray off shows the real background beneath the Dank Bar"))
|
||||
checked: SettingsData.hyprlandLayoutBarXrayEnabled
|
||||
onToggled: checked => SettingsData.set("hyprlandLayoutBarXrayEnabled", checked)
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
@@ -1812,6 +1812,40 @@ Item {
|
||||
defaultValue: 35
|
||||
onSliderValueChanged: newValue => SettingsData.set("blurBorderOpacity", newValue / 100)
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: xrayHintRow.implicitHeight
|
||||
visible: CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isMango
|
||||
|
||||
Row {
|
||||
id: xrayHintRow
|
||||
width: parent.width
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankIcon {
|
||||
name: "info"
|
||||
size: Theme.iconSizeSmall
|
||||
color: Theme.primary
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.width - Theme.iconSizeSmall - Theme.spacingS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: I18n.tr("Xray specific options for blurred surfaces live in Compositor → Layout")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.primary
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: PopoutService.openSettingsWithTab("compositor_layout")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
Reference in New Issue
Block a user