mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-30 01:22:06 -04:00
restore CC and notification standalone behavior
This commit is contained in:
@@ -265,6 +265,7 @@ Column {
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
enabled: SettingsData.connectedFrameModeActive
|
||||
NumberAnimation {
|
||||
duration: Theme.variantDuration(Theme.popoutAnimationDuration, detailHost.active)
|
||||
easing.type: Easing.BezierSpline
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -114,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
|
||||
@@ -123,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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user