mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 12:52:06 -04:00
(frameInMotion): Initial Unified Frame Connected Mode
This commit is contained in:
@@ -7,6 +7,9 @@ import qs.Modules.Settings.Widgets
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property bool connectedFrameModeActive: SettingsData.frameEnabled
|
||||
&& SettingsData.motionEffect === 1
|
||||
&& SettingsData.directionalAnimationMode === 3
|
||||
|
||||
FileBrowserModal {
|
||||
id: dockLogoFileBrowser
|
||||
@@ -544,6 +547,8 @@ Item {
|
||||
|
||||
SettingsSliderRow {
|
||||
text: I18n.tr("Exclusive Zone Offset")
|
||||
enabled: !root.connectedFrameModeActive
|
||||
opacity: root.connectedFrameModeActive ? 0.5 : 1.0
|
||||
value: SettingsData.dockBottomGap
|
||||
minimum: -100
|
||||
maximum: 100
|
||||
@@ -553,6 +558,8 @@ Item {
|
||||
|
||||
SettingsSliderRow {
|
||||
text: I18n.tr("Margin")
|
||||
enabled: !root.connectedFrameModeActive
|
||||
opacity: root.connectedFrameModeActive ? 0.5 : 1.0
|
||||
value: SettingsData.dockMargin
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
@@ -561,11 +568,42 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
visible: root.connectedFrameModeActive
|
||||
width: parent.width
|
||||
implicitHeight: dockConnectedNote.implicitHeight + Theme.spacingS * 2
|
||||
|
||||
Row {
|
||||
id: dockConnectedNote
|
||||
x: Theme.spacingM
|
||||
width: parent.width - Theme.spacingM * 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingS
|
||||
|
||||
DankIcon {
|
||||
name: "frame_source"
|
||||
size: Theme.fontSizeMedium
|
||||
color: Theme.primary
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: I18n.tr("Connected Frame mode manages dock edge offset, transparency, blur, and border styling")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width - Theme.fontSizeMedium - Theme.spacingS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
width: parent.width
|
||||
iconName: "opacity"
|
||||
title: I18n.tr("Transparency")
|
||||
settingKey: "dockTransparency"
|
||||
enabled: !root.connectedFrameModeActive
|
||||
opacity: root.connectedFrameModeActive ? 0.5 : 1.0
|
||||
|
||||
SettingsSliderRow {
|
||||
text: I18n.tr("Dock Transparency")
|
||||
@@ -585,6 +623,8 @@ Item {
|
||||
settingKey: "dockBorder"
|
||||
collapsible: true
|
||||
expanded: false
|
||||
enabled: !root.connectedFrameModeActive
|
||||
opacity: root.connectedFrameModeActive ? 0.5 : 1.0
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Border")
|
||||
|
||||
@@ -261,7 +261,7 @@ Item {
|
||||
title: I18n.tr("Bar Integration")
|
||||
settingKey: "frameBarIntegration"
|
||||
collapsible: true
|
||||
expanded: false
|
||||
expanded: true
|
||||
visible: SettingsData.frameEnabled
|
||||
|
||||
SettingsToggleRow {
|
||||
@@ -273,6 +273,31 @@ Item {
|
||||
checked: SettingsData.frameShowOnOverview
|
||||
onToggled: checked => SettingsData.set("frameShowOnOverview", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
visible: SettingsData.frameEnabled
|
||||
settingKey: "directionalAnimationMode"
|
||||
tags: ["frame", "connected", "popout", "corner", "animation"]
|
||||
text: I18n.tr("Connected Mode")
|
||||
description: I18n.tr("Popouts emerge flush from the bar edge as one continuous piece (based on Slide)")
|
||||
checked: SettingsData.motionEffect === 1 && SettingsData.directionalAnimationMode === 3
|
||||
onToggled: checked => {
|
||||
if (checked) {
|
||||
if (SettingsData.directionalAnimationMode !== 3)
|
||||
SettingsData.set("previousDirectionalMode", SettingsData.directionalAnimationMode);
|
||||
SettingsData.set("motionEffect", 1);
|
||||
SettingsData.set("directionalAnimationMode", 3);
|
||||
} else {
|
||||
SettingsData.set("directionalAnimationMode", SettingsData.previousDirectionalMode);
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SettingsData
|
||||
function onDirectionalAnimationModeChanged() {}
|
||||
function onMotionEffectChanged() {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Display Assignment ────────────────────────────────────────────
|
||||
|
||||
@@ -11,6 +11,9 @@ import qs.Modules.Settings.Widgets
|
||||
Item {
|
||||
id: themeColorsTab
|
||||
|
||||
readonly property bool connectedFrameModeActive: SettingsData.frameEnabled
|
||||
&& SettingsData.motionEffect === 1
|
||||
&& SettingsData.directionalAnimationMode === 3
|
||||
property var cachedIconThemes: SettingsData.availableIconThemes
|
||||
property var cachedCursorThemes: SettingsData.availableCursorThemes
|
||||
property var cachedMatugenSchemes: Theme.availableMatugenSchemes.map(option => option.label)
|
||||
@@ -1618,7 +1621,11 @@ Item {
|
||||
tags: ["popup", "transparency", "opacity", "modal"]
|
||||
settingKey: "popupTransparency"
|
||||
text: I18n.tr("Popup Transparency")
|
||||
description: I18n.tr("Controls opacity of all popouts, modals, and their content layers")
|
||||
description: themeColorsTab.connectedFrameModeActive
|
||||
? I18n.tr("Connected Frame mode follows Frame Opacity for connected popouts, docks, and modal surfaces")
|
||||
: I18n.tr("Controls opacity of all popouts, modals, and their content layers")
|
||||
enabled: !themeColorsTab.connectedFrameModeActive
|
||||
opacity: themeColorsTab.connectedFrameModeActive ? 0.5 : 1.0
|
||||
value: Math.round(SettingsData.popupTransparency * 100)
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
@@ -1837,7 +1844,11 @@ Item {
|
||||
tags: ["blur", "background", "transparency", "glass", "frosted"]
|
||||
settingKey: "blurEnabled"
|
||||
text: I18n.tr("Background Blur")
|
||||
description: BlurService.available ? I18n.tr("Blur the background behind bars, popouts, modals, and notifications. Requires compositor support and configuration.") : I18n.tr("Requires a newer version of Quickshell")
|
||||
description: !BlurService.available
|
||||
? I18n.tr("Requires a newer version of Quickshell")
|
||||
: (themeColorsTab.connectedFrameModeActive
|
||||
? I18n.tr("Connected Frame mode follows Frame Blur for connected surfaces while this remains the master blur availability toggle")
|
||||
: I18n.tr("Blur the background behind bars, popouts, modals, and notifications. Requires compositor support and configuration."))
|
||||
checked: SettingsData.blurEnabled ?? false
|
||||
enabled: BlurService.available
|
||||
onToggled: checked => SettingsData.set("blurEnabled", checked)
|
||||
|
||||
@@ -203,17 +203,25 @@ Item {
|
||||
SettingsDropdownRow {
|
||||
visible: SettingsData.motionEffect === 1
|
||||
tab: "typography"
|
||||
tags: ["animation", "directional", "behavior", "overlap", "sticky", "roll"]
|
||||
tags: ["animation", "directional", "behavior", "overlap", "sticky", "roll", "connected"]
|
||||
settingKey: "directionalAnimationMode"
|
||||
text: I18n.tr("Directional Behavior")
|
||||
description: I18n.tr("How the popout emerges from the DankBar")
|
||||
options: [I18n.tr("Overlap"), I18n.tr("Slide"), I18n.tr("Roll")]
|
||||
description: {
|
||||
if (SettingsData.directionalAnimationMode === 3 && SettingsData.frameEnabled)
|
||||
return I18n.tr("Popouts emerge flush from the bar edge as a single continuous piece, with corner connectors bridging the junction");
|
||||
return I18n.tr("How the popout emerges from the DankBar");
|
||||
}
|
||||
options: SettingsData.frameEnabled
|
||||
? [I18n.tr("Overlap"), I18n.tr("Slide"), I18n.tr("Roll"), I18n.tr("Connected")]
|
||||
: [I18n.tr("Overlap"), I18n.tr("Slide"), I18n.tr("Roll")]
|
||||
currentValue: {
|
||||
switch (SettingsData.directionalAnimationMode) {
|
||||
case 1:
|
||||
return I18n.tr("Slide");
|
||||
case 2:
|
||||
return I18n.tr("Roll");
|
||||
case 3:
|
||||
return SettingsData.frameEnabled ? I18n.tr("Connected") : I18n.tr("Slide");
|
||||
default:
|
||||
return I18n.tr("Overlap");
|
||||
}
|
||||
@@ -223,7 +231,11 @@ Item {
|
||||
SettingsData.set("directionalAnimationMode", 1);
|
||||
else if (value === I18n.tr("Roll"))
|
||||
SettingsData.set("directionalAnimationMode", 2);
|
||||
else
|
||||
else if (value === I18n.tr("Connected") && SettingsData.frameEnabled) {
|
||||
if (SettingsData.directionalAnimationMode !== 3)
|
||||
SettingsData.set("previousDirectionalMode", SettingsData.directionalAnimationMode);
|
||||
SettingsData.set("directionalAnimationMode", 3);
|
||||
} else
|
||||
SettingsData.set("directionalAnimationMode", 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user