mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-03 19:12:11 -04:00
fix(Frame): Update all remaining known issues & align state modes
This commit is contained in:
@@ -87,7 +87,7 @@ Item {
|
|||||||
readonly property alias contentWindow: contentWindow
|
readonly property alias contentWindow: contentWindow
|
||||||
readonly property alias clickCatcher: clickCatcher
|
readonly property alias clickCatcher: clickCatcher
|
||||||
readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab
|
readonly property bool useHyprlandFocusGrab: CompositorService.useHyprlandFocusGrab
|
||||||
readonly property bool useBackground: showBackground && SettingsData.modalDarkenBackground
|
readonly property bool useBackground: false
|
||||||
readonly property bool useSingleWindow: CompositorService.isHyprland
|
readonly property bool useSingleWindow: CompositorService.isHyprland
|
||||||
|
|
||||||
signal opened
|
signal opened
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
enabled: SettingsData.connectedFrameModeActive
|
enabled: true
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.variantDuration(Theme.popoutAnimationDuration, detailHost.active)
|
duration: Theme.variantDuration(Theme.popoutAnimationDuration, detailHost.active)
|
||||||
easing.type: Easing.BezierSpline
|
easing.type: Easing.BezierSpline
|
||||||
|
|||||||
@@ -99,7 +99,9 @@ PanelWindow {
|
|||||||
case "background":
|
case "background":
|
||||||
return WlrLayer.background;
|
return WlrLayer.background;
|
||||||
default:
|
default:
|
||||||
return WlrLayer.Top;
|
// Elevate to Overlay when Frame is enabled so the bar stays above
|
||||||
|
// the FrameWindow (WlrLayer.Top) when it is re-mapped on mode switch.
|
||||||
|
return SettingsData.frameEnabled ? WlrLayer.Overlay : WlrLayer.Top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ Variants {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:dock"
|
WlrLayershell.namespace: "dms:dock"
|
||||||
|
WlrLayershell.layer: SettingsData.frameEnabled ? WlrLayer.Overlay : WlrLayer.Top
|
||||||
|
|
||||||
readonly property bool isVertical: SettingsData.dockPosition === SettingsData.Position.Left || SettingsData.dockPosition === SettingsData.Position.Right
|
readonly property bool isVertical: SettingsData.dockPosition === SettingsData.Position.Left || SettingsData.dockPosition === SettingsData.Position.Right
|
||||||
|
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ Rectangle {
|
|||||||
function expansionMotionDuration() {
|
function expansionMotionDuration() {
|
||||||
if (isDescriptionToggleAnimation)
|
if (isDescriptionToggleAnimation)
|
||||||
return descriptionExpanded ? Theme.notificationInlineExpandDuration : Theme.notificationInlineCollapseDuration;
|
return descriptionExpanded ? Theme.notificationInlineExpandDuration : Theme.notificationInlineCollapseDuration;
|
||||||
return root.connectedFrameMode ? Theme.variantDuration(Theme.popoutAnimationDuration, root.expanded) : (root.expanded ? Theme.notificationExpandDuration : Theme.notificationCollapseDuration);
|
return Theme.variantDuration(Theme.popoutAnimationDuration, root.expanded);
|
||||||
}
|
}
|
||||||
|
|
||||||
function expansionMotionCurve() {
|
function expansionMotionCurve() {
|
||||||
return root.connectedFrameMode ? (root.expanded ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : Theme.expressiveCurves.emphasized;
|
return root.expanded ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve;
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
@@ -114,7 +114,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on expandedContentOpacity {
|
Behavior on expandedContentOpacity {
|
||||||
enabled: root.connectedFrameMode && root.__initialized && root.userInitiatedExpansion && root.animateExpansion
|
enabled: root.__initialized && root.userInitiatedExpansion && root.animateExpansion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: root.expansionMotionDuration()
|
duration: root.expansionMotionDuration()
|
||||||
easing.type: Easing.BezierSpline
|
easing.type: Easing.BezierSpline
|
||||||
@@ -123,7 +123,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on collapsedContentOpacity {
|
Behavior on collapsedContentOpacity {
|
||||||
enabled: root.connectedFrameMode && root.__initialized && root.userInitiatedExpansion && root.animateExpansion
|
enabled: root.__initialized && root.userInitiatedExpansion && root.animateExpansion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: root.expansionMotionDuration()
|
duration: root.expansionMotionDuration()
|
||||||
easing.type: Easing.BezierSpline
|
easing.type: Easing.BezierSpline
|
||||||
@@ -138,9 +138,7 @@ Rectangle {
|
|||||||
if (keyboardNavigationActive && expanded && selectedNotificationIndex >= 0) {
|
if (keyboardNavigationActive && expanded && selectedNotificationIndex >= 0) {
|
||||||
return Theme.primaryHoverLight;
|
return Theme.primaryHoverLight;
|
||||||
}
|
}
|
||||||
if (connectedFrameMode)
|
return Theme.floatingSurfaceHigh;
|
||||||
return Theme.popupLayerColor(Theme.surfaceContainerHigh);
|
|
||||||
return Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency);
|
|
||||||
}
|
}
|
||||||
border.color: {
|
border.color: {
|
||||||
if (isGroupSelected && keyboardNavigationActive) {
|
if (isGroupSelected && keyboardNavigationActive) {
|
||||||
@@ -166,16 +164,16 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return Theme.layerOutlineWidth;
|
return Theme.layerOutlineWidth;
|
||||||
}
|
}
|
||||||
clip: connectedFrameMode && _clipAnimatedContent
|
clip: _clipAnimatedContent
|
||||||
|
|
||||||
onExpandedChanged: {
|
onExpandedChanged: {
|
||||||
if (connectedFrameMode && __initialized && userInitiatedExpansion && animateExpansion)
|
if (__initialized && userInitiatedExpansion && animateExpansion)
|
||||||
_clipAnimatedContent = true;
|
_clipAnimatedContent = true;
|
||||||
if (expanded) {
|
if (expanded) {
|
||||||
_retainedExpandedContent = false;
|
_retainedExpandedContent = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (connectedFrameMode && __initialized && userInitiatedExpansion && animateExpansion)
|
if (__initialized && userInitiatedExpansion && animateExpansion)
|
||||||
_retainedExpandedContent = true;
|
_retainedExpandedContent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on renderedAlignedHeight {
|
Behavior on renderedAlignedHeight {
|
||||||
enabled: win.connectedFrameMode && !exiting && !_isDestroying
|
enabled: !win.exiting && !win._isDestroying
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: renderedHeightAnim
|
id: renderedHeightAnim
|
||||||
duration: win.inlineMotionDuration(win.inlineGeometryGrowing)
|
duration: win.inlineMotionDuration(win.inlineGeometryGrowing)
|
||||||
@@ -666,7 +666,7 @@ PanelWindow {
|
|||||||
sourceRect.width: Math.max(0, content.width - (content.cardInset * 2))
|
sourceRect.width: Math.max(0, content.width - (content.cardInset * 2))
|
||||||
sourceRect.height: Math.max(0, content.height - (content.cardInset * 2))
|
sourceRect.height: Math.max(0, content.height - (content.cardInset * 2))
|
||||||
sourceRect.radius: win.connectedFrameMode ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
sourceRect.radius: win.connectedFrameMode ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
||||||
sourceRect.color: win.connectedFrameMode ? Theme.popupLayerColor(Theme.surfaceContainer) : Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
sourceRect.color: Theme.floatingSurface
|
||||||
sourceRect.antialiasing: true
|
sourceRect.antialiasing: true
|
||||||
sourceRect.layer.enabled: false
|
sourceRect.layer.enabled: false
|
||||||
sourceRect.layer.textureSize: Qt.size(0, 0)
|
sourceRect.layer.textureSize: Qt.size(0, 0)
|
||||||
|
|||||||
@@ -2250,12 +2250,20 @@ Item {
|
|||||||
settingKey: "modalBackground"
|
settingKey: "modalBackground"
|
||||||
iconName: "layers"
|
iconName: "layers"
|
||||||
|
|
||||||
|
SettingsControlledByFrame {
|
||||||
|
visible: themeColorsTab.connectedFrameModeActive
|
||||||
|
parentModal: themeColorsTab.parentModal
|
||||||
|
settingLabel: I18n.tr("Darken Modal Background")
|
||||||
|
reason: I18n.tr("Managed by Frame in Connected Mode")
|
||||||
|
}
|
||||||
|
|
||||||
SettingsToggleRow {
|
SettingsToggleRow {
|
||||||
tab: "theme"
|
tab: "theme"
|
||||||
tags: ["modal", "darken", "background", "overlay"]
|
tags: ["modal", "darken", "background", "overlay"]
|
||||||
settingKey: "modalDarkenBackground"
|
settingKey: "modalDarkenBackground"
|
||||||
text: I18n.tr("Darken Modal Background")
|
text: I18n.tr("Darken Modal Background")
|
||||||
description: I18n.tr("Show darkened overlay behind modal dialogs")
|
description: I18n.tr("Show darkened overlay behind modal dialogs")
|
||||||
|
visible: !themeColorsTab.connectedFrameModeActive
|
||||||
checked: SettingsData.modalDarkenBackground
|
checked: SettingsData.modalDarkenBackground
|
||||||
onToggled: checked => SettingsData.set("modalDarkenBackground", checked)
|
onToggled: checked => SettingsData.set("modalDarkenBackground", checked)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -771,17 +771,17 @@ Item {
|
|||||||
|
|
||||||
Region {
|
Region {
|
||||||
id: contentInputMask
|
id: contentInputMask
|
||||||
// Outside-click dismissal needs full-screen input only while interactive.
|
// Use bar-aware mask so bar widget clicks pass through when a popout is open.
|
||||||
item: (shouldBeVisible && backgroundInteractive) ? fullScreenMaskItem : contentMaskRect
|
item: (shouldBeVisible && backgroundInteractive) ? backgroundDismissalMask : contentMaskRect
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: fullScreenMaskItem
|
id: backgroundDismissalMask
|
||||||
visible: false
|
visible: false
|
||||||
x: 0
|
x: root.maskX
|
||||||
y: 0
|
y: root.maskY
|
||||||
width: 32767
|
width: root.maskWidth
|
||||||
height: 32767
|
height: root.maskHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ Item {
|
|||||||
function _setAnimatedSurfaceEnvelope() {
|
function _setAnimatedSurfaceEnvelope() {
|
||||||
if (!shouldBeVisible)
|
if (!shouldBeVisible)
|
||||||
return;
|
return;
|
||||||
if (_fullHeight || !fluidStandaloneActive) {
|
if (_fullHeight) {
|
||||||
_setSettledSurfaceGeometry();
|
_setSettledSurfaceGeometry();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -374,7 +374,7 @@ Item {
|
|||||||
readonly property bool renderedGeometryGrowing: alignedHeight >= renderedAlignedHeight
|
readonly property bool renderedGeometryGrowing: alignedHeight >= renderedAlignedHeight
|
||||||
|
|
||||||
Behavior on renderedAlignedY {
|
Behavior on renderedAlignedY {
|
||||||
enabled: root.animationsEnabled && fluidStandaloneActive && contentWindow.visible && root.shouldBeVisible
|
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
|
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
|
||||||
easing.type: Easing.BezierSpline
|
easing.type: Easing.BezierSpline
|
||||||
@@ -383,7 +383,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on renderedAlignedHeight {
|
Behavior on renderedAlignedHeight {
|
||||||
enabled: root.animationsEnabled && fluidStandaloneActive && contentWindow.visible && root.shouldBeVisible
|
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
|
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
|
||||||
easing.type: Easing.BezierSpline
|
easing.type: Easing.BezierSpline
|
||||||
@@ -633,15 +633,15 @@ Item {
|
|||||||
x: contentContainer.x
|
x: contentContainer.x
|
||||||
y: contentContainer.y
|
y: contentContainer.y
|
||||||
width: contentWindow.closeVisualActive ? root.alignedWidth : 0
|
width: contentWindow.closeVisualActive ? root.alignedWidth : 0
|
||||||
height: contentWindow.closeVisualActive ? (root.fluidStandaloneActive ? root.renderedAlignedHeight : root.alignedHeight) : 0
|
height: contentWindow.closeVisualActive ? root.renderedAlignedHeight : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: contentContainer
|
id: contentContainer
|
||||||
x: shadowBuffer + root.alignedX - root._surfaceBodyX
|
x: shadowBuffer + root.alignedX - root._surfaceBodyX
|
||||||
y: root._fullHeight ? (root.fluidStandaloneActive ? root.renderedAlignedY : root.alignedY) : shadowBuffer + (root.fluidStandaloneActive ? root.renderedAlignedY : root.alignedY) - root._surfaceBodyY
|
y: root._fullHeight ? root.renderedAlignedY : shadowBuffer + root.renderedAlignedY - root._surfaceBodyY
|
||||||
width: root.alignedWidth
|
width: root.alignedWidth
|
||||||
height: root.fluidStandaloneActive ? root.renderedAlignedHeight : root.alignedHeight
|
height: root.renderedAlignedHeight
|
||||||
|
|
||||||
readonly property bool barTop: effectiveBarPosition === SettingsData.Position.Top
|
readonly property bool barTop: effectiveBarPosition === SettingsData.Position.Top
|
||||||
readonly property bool barBottom: effectiveBarPosition === SettingsData.Position.Bottom
|
readonly property bool barBottom: effectiveBarPosition === SettingsData.Position.Bottom
|
||||||
|
|||||||
Reference in New Issue
Block a user