diff --git a/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml b/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml index 5fc34a4e..030924bf 100644 --- a/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml +++ b/quickshell/Modules/ControlCenter/Components/DragDropGrid.qml @@ -265,6 +265,7 @@ Column { } Behavior on height { + enabled: SettingsData.connectedFrameModeActive NumberAnimation { duration: Theme.variantDuration(Theme.popoutAnimationDuration, detailHost.active) easing.type: Easing.BezierSpline diff --git a/quickshell/Modules/ControlCenter/ControlCenterPopout.qml b/quickshell/Modules/ControlCenter/ControlCenterPopout.qml index a4cb5f92..6e13bb12 100644 --- a/quickshell/Modules/ControlCenter/ControlCenterPopout.qml +++ b/quickshell/Modules/ControlCenter/ControlCenterPopout.qml @@ -86,7 +86,14 @@ DankPopout { } popupWidth: 550 - popupHeight: targetPopupHeight + popupHeight: { + if (SettingsData.connectedFrameModeActive) + return targetPopupHeight; + const screenHeight = (triggerScreen?.height ?? 1080); + const maxHeight = screenHeight - 100; + const contentHeight = contentLoader.item && contentLoader.item.implicitHeight > 0 ? contentLoader.item.implicitHeight + 20 : 400; + return Math.min(maxHeight, contentHeight); + } triggerWidth: 80 positioning: "" screen: triggerScreen diff --git a/quickshell/Modules/Notifications/Center/NotificationCard.qml b/quickshell/Modules/Notifications/Center/NotificationCard.qml index 53c120d7..7308cfb3 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCard.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCard.qml @@ -1,6 +1,5 @@ import QtQuick import QtQuick.Controls -import QtQuick.Effects import Quickshell import Quickshell.Services.Notifications import qs.Common @@ -115,7 +114,7 @@ Rectangle { } Behavior on expandedContentOpacity { - enabled: root.__initialized && root.userInitiatedExpansion && root.animateExpansion + enabled: root.connectedFrameMode && root.__initialized && root.userInitiatedExpansion && root.animateExpansion NumberAnimation { duration: root.expansionMotionDuration() easing.type: Easing.BezierSpline @@ -124,7 +123,7 @@ Rectangle { } Behavior on collapsedContentOpacity { - enabled: root.__initialized && root.userInitiatedExpansion && root.animateExpansion + enabled: root.connectedFrameMode && root.__initialized && root.userInitiatedExpansion && root.animateExpansion NumberAnimation { duration: root.expansionMotionDuration() easing.type: Easing.BezierSpline diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml index 521d930e..998c3e1e 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml @@ -10,19 +10,24 @@ import qs.Widgets PanelWindow { id: win - readonly property bool connectedFrameMode: SettingsData.frameEnabled - && Theme.isConnectedEffect - && SettingsData.isScreenInPreferences(win.screen, SettingsData.frameScreenPreferences) + readonly property bool connectedFrameMode: SettingsData.frameEnabled && Theme.isConnectedEffect && SettingsData.isScreenInPreferences(win.screen, SettingsData.frameScreenPreferences) readonly property string notifBarSide: { const pos = SettingsData.notificationPopupPosition; - if (pos === -1) return "top"; + if (pos === -1) + return "top"; switch (pos) { - case SettingsData.Position.Top: return "right"; - case SettingsData.Position.Left: return "left"; - case SettingsData.Position.BottomCenter: return "bottom"; - case SettingsData.Position.Right: return "right"; - case SettingsData.Position.Bottom: return "left"; - default: return "top"; + case SettingsData.Position.Top: + return "right"; + case SettingsData.Position.Left: + return "left"; + case SettingsData.Position.BottomCenter: + return "bottom"; + case SettingsData.Position.Right: + return "right"; + case SettingsData.Position.Bottom: + return "left"; + default: + return "top"; } } readonly property int inlineExpandDuration: Theme.notificationInlineExpandDuration @@ -190,9 +195,7 @@ PanelWindow { property real renderedAlignedHeight: targetAlignedHeight property real allocatedAlignedHeight: targetAlignedHeight readonly property bool inlineGeometryGrowing: targetAlignedHeight >= renderedAlignedHeight - readonly property bool contentAnchorsTop: isTopCenter - || SettingsData.notificationPopupPosition === SettingsData.Position.Top - || SettingsData.notificationPopupPosition === SettingsData.Position.Left + readonly property bool contentAnchorsTop: isTopCenter || SettingsData.notificationPopupPosition === SettingsData.Position.Top || SettingsData.notificationPopupPosition === SettingsData.Position.Left readonly property real renderedContentOffsetY: contentAnchorsTop ? 0 : Math.max(0, allocatedAlignedHeight - renderedAlignedHeight) implicitWidth: contentImplicitWidth + (windowShadowPad * 2) implicitHeight: allocatedAlignedHeight + (windowShadowPad * 2) @@ -252,7 +255,7 @@ PanelWindow { } Behavior on renderedAlignedHeight { - enabled: !exiting && !_isDestroying + enabled: win.connectedFrameMode && !exiting && !_isDestroying NumberAnimation { id: renderedHeightAnim duration: win.inlineMotionDuration(win.inlineGeometryGrowing) @@ -364,8 +367,7 @@ PanelWindow { return Math.max(0, Math.round(Theme.px(raw, dpr))); } - readonly property bool frameOnlyNoConnected: SettingsData.frameEnabled && !connectedFrameMode && !!screen - && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences) + readonly property bool frameOnlyNoConnected: SettingsData.frameEnabled && !connectedFrameMode && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences) // Frame ON + Connected OFF. frameEdgeInset is the full bar/frame inset function _frameGapMargin(side) { @@ -379,9 +381,7 @@ PanelWindow { return 0; if (connectedFrameMode) { - const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) - ? 0 - : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr)); + const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr)); return _frameEdgeInset("top") + cornerClear + screenY; } if (frameOnlyNoConnected) @@ -398,9 +398,7 @@ PanelWindow { return 0; if (connectedFrameMode) { - const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) - ? 0 - : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr)); + const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr)); return _frameEdgeInset("bottom") + cornerClear + screenY; } if (frameOnlyNoConnected)