mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-10 15:52:58 -04:00
(frame): Update connected mode & opacity connection settings
This commit is contained in:
@@ -1591,8 +1591,8 @@ Singleton {
|
|||||||
const spacing = barSpacing !== undefined ? barSpacing : (defaultBar?.spacing ?? 4);
|
const spacing = barSpacing !== undefined ? barSpacing : (defaultBar?.spacing ?? 4);
|
||||||
const position = barPosition !== undefined ? barPosition : (defaultBar?.position ?? SettingsData.Position.Top);
|
const position = barPosition !== undefined ? barPosition : (defaultBar?.position ?? SettingsData.Position.Top);
|
||||||
const rawBottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : (defaultBar?.bottomGap ?? 0)) : (defaultBar?.bottomGap ?? 0);
|
const rawBottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : (defaultBar?.bottomGap ?? 0)) : (defaultBar?.bottomGap ?? 0);
|
||||||
const bottomGap = Math.max(0, rawBottomGap);
|
|
||||||
const isConnected = frameEnabled && motionEffect === 1 && directionalAnimationMode === 3;
|
const isConnected = frameEnabled && motionEffect === 1 && directionalAnimationMode === 3;
|
||||||
|
const bottomGap = isConnected ? 0 : Math.max(0, rawBottomGap);
|
||||||
|
|
||||||
const useAutoGaps = (barConfig && barConfig.popupGapsAuto !== undefined) ? barConfig.popupGapsAuto : (defaultBar?.popupGapsAuto ?? true);
|
const useAutoGaps = (barConfig && barConfig.popupGapsAuto !== undefined) ? barConfig.popupGapsAuto : (defaultBar?.popupGapsAuto ?? true);
|
||||||
const manualGapValue = (barConfig && barConfig.popupGapsManual !== undefined) ? barConfig.popupGapsManual : (defaultBar?.popupGapsManual ?? 4);
|
const manualGapValue = (barConfig && barConfig.popupGapsManual !== undefined) ? barConfig.popupGapsManual : (defaultBar?.popupGapsManual ?? 4);
|
||||||
@@ -1715,7 +1715,9 @@ Singleton {
|
|||||||
const screenWidth = screen.width;
|
const screenWidth = screen.width;
|
||||||
const screenHeight = screen.height;
|
const screenHeight = screen.height;
|
||||||
const position = barPosition !== undefined ? barPosition : (defaultBar?.position ?? SettingsData.Position.Top);
|
const position = barPosition !== undefined ? barPosition : (defaultBar?.position ?? SettingsData.Position.Top);
|
||||||
const bottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : (defaultBar?.bottomGap ?? 0)) : (defaultBar?.bottomGap ?? 0);
|
const isConnected = frameEnabled && motionEffect === 1 && directionalAnimationMode === 3;
|
||||||
|
const rawBottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : (defaultBar?.bottomGap ?? 0)) : (defaultBar?.bottomGap ?? 0);
|
||||||
|
const bottomGap = isConnected ? 0 : rawBottomGap;
|
||||||
|
|
||||||
let topOffset = 0;
|
let topOffset = 0;
|
||||||
let bottomOffset = 0;
|
let bottomOffset = 0;
|
||||||
@@ -1737,7 +1739,7 @@ Singleton {
|
|||||||
const otherSpacing = other.spacing !== undefined ? other.spacing : (defaultBar?.spacing ?? 4);
|
const otherSpacing = other.spacing !== undefined ? other.spacing : (defaultBar?.spacing ?? 4);
|
||||||
const otherPadding = other.innerPadding !== undefined ? other.innerPadding : (defaultBar?.innerPadding ?? 4);
|
const otherPadding = other.innerPadding !== undefined ? other.innerPadding : (defaultBar?.innerPadding ?? 4);
|
||||||
const otherThickness = Math.max(26 + otherPadding * 0.6, Theme.barHeight - 4 - (8 - otherPadding)) + otherSpacing + wingSize;
|
const otherThickness = Math.max(26 + otherPadding * 0.6, Theme.barHeight - 4 - (8 - otherPadding)) + otherSpacing + wingSize;
|
||||||
const otherBottomGap = other.bottomGap !== undefined ? other.bottomGap : (defaultBar?.bottomGap ?? 0);
|
const otherBottomGap = isConnected ? 0 : (other.bottomGap !== undefined ? other.bottomGap : (defaultBar?.bottomGap ?? 0));
|
||||||
|
|
||||||
switch (other.position) {
|
switch (other.position) {
|
||||||
case SettingsData.Position.Top:
|
case SettingsData.Position.Top:
|
||||||
|
|||||||
@@ -1162,6 +1162,8 @@ Singleton {
|
|||||||
property real popupTransparency: {
|
property real popupTransparency: {
|
||||||
if (typeof SettingsData === "undefined")
|
if (typeof SettingsData === "undefined")
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
if (isConnectedEffect)
|
||||||
|
return SettingsData.frameOpacity !== undefined ? SettingsData.frameOpacity : 1.0;
|
||||||
return SettingsData.popupTransparency !== undefined ? SettingsData.popupTransparency : 1.0;
|
return SettingsData.popupTransparency !== undefined ? SettingsData.popupTransparency : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -661,7 +661,7 @@ PanelWindow {
|
|||||||
anchors.left: !isVertical ? true : (barPos === SettingsData.Position.Left)
|
anchors.left: !isVertical ? true : (barPos === SettingsData.Position.Left)
|
||||||
anchors.right: !isVertical ? true : (barPos === SettingsData.Position.Right)
|
anchors.right: !isVertical ? true : (barPos === SettingsData.Position.Right)
|
||||||
|
|
||||||
exclusiveZone: (!(barConfig?.visible ?? true) || topBarCore.autoHide) ? -1 : (barWindow.effectiveBarThickness + effectiveSpacing + (barConfig?.bottomGap ?? 0))
|
exclusiveZone: (!(barConfig?.visible ?? true) || topBarCore.autoHide) ? -1 : (barWindow.effectiveBarThickness + effectiveSpacing + (Theme.isConnectedEffect ? 0 : (barConfig?.bottomGap ?? 0)))
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: inputMask
|
id: inputMask
|
||||||
|
|||||||
@@ -115,8 +115,9 @@ Item {
|
|||||||
SettingsSliderRow {
|
SettingsSliderRow {
|
||||||
id: opacitySlider
|
id: opacitySlider
|
||||||
settingKey: "frameOpacity"
|
settingKey: "frameOpacity"
|
||||||
tags: ["frame", "border", "opacity", "transparency"]
|
tags: ["frame", "border", "surface", "popup", "opacity", "transparency"]
|
||||||
text: I18n.tr("Frame Opacity")
|
text: I18n.tr("Surface Opacity")
|
||||||
|
description: I18n.tr("Frame border opacity. Controls all surface opacity globally when Connected Mode is active")
|
||||||
unit: "%"
|
unit: "%"
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 100
|
maximum: 100
|
||||||
|
|||||||
@@ -1618,11 +1618,11 @@ Item {
|
|||||||
|
|
||||||
SettingsSliderRow {
|
SettingsSliderRow {
|
||||||
tab: "theme"
|
tab: "theme"
|
||||||
tags: ["popup", "transparency", "opacity", "modal"]
|
tags: ["surface", "popup", "transparency", "opacity", "modal"]
|
||||||
settingKey: "popupTransparency"
|
settingKey: "popupTransparency"
|
||||||
text: I18n.tr("Popup Transparency")
|
text: I18n.tr("Surface Opacity")
|
||||||
description: themeColorsTab.connectedFrameModeActive
|
description: themeColorsTab.connectedFrameModeActive
|
||||||
? I18n.tr("Connected Frame mode follows Frame Opacity for connected popouts, docks, and modal surfaces")
|
? I18n.tr("Connected Frame mode follows Surface Opacity from the Frame tab for connected popouts, docks, and modal surfaces")
|
||||||
: I18n.tr("Controls opacity of all popouts, modals, and their content layers")
|
: I18n.tr("Controls opacity of all popouts, modals, and their content layers")
|
||||||
enabled: !themeColorsTab.connectedFrameModeActive
|
enabled: !themeColorsTab.connectedFrameModeActive
|
||||||
opacity: themeColorsTab.connectedFrameModeActive ? 0.5 : 1.0
|
opacity: themeColorsTab.connectedFrameModeActive ? 0.5 : 1.0
|
||||||
|
|||||||
@@ -3400,7 +3400,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"section": "popupTransparency",
|
"section": "popupTransparency",
|
||||||
"label": "Popup Transparency",
|
"label": "Surface Opacity",
|
||||||
"tabIndex": 10,
|
"tabIndex": 10,
|
||||||
"category": "Theme & Colors",
|
"category": "Theme & Colors",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -3418,6 +3418,7 @@
|
|||||||
"popup",
|
"popup",
|
||||||
"scheme",
|
"scheme",
|
||||||
"style",
|
"style",
|
||||||
|
"surface",
|
||||||
"their",
|
"their",
|
||||||
"theme",
|
"theme",
|
||||||
"translucent",
|
"translucent",
|
||||||
|
|||||||
Reference in New Issue
Block a user