mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-21 18:54:01 -04:00
settings: frame and island follow the bar
This commit is contained in:
+1
-1
Submodule dank-qml-common updated: 4e0ec3a1cf...ccab90ec90
Generated
+3
-3
@@ -3,11 +3,11 @@
|
||||
"dank-qml-common": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1789765673,
|
||||
"narHash": "sha256-+EyHDMnyAPP+7wOWfVbqz3PJl9H0QRWURYCKnxUhj/c=",
|
||||
"lastModified": 1789768710,
|
||||
"narHash": "sha256-bg5uT5R5rE00UsuM5zyvjJMi/y6HvhygYA2haYmjpvg=",
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "dank-qml-common",
|
||||
"rev": "4e0ec3a1cf91b6a33723ad5e3e59b437b1374316",
|
||||
"rev": "ccab90ec90e0cdd620eadc2e1ad8b4740363472c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -21,7 +21,7 @@ Singleton {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("SettingsData")
|
||||
|
||||
readonly property int settingsConfigVersion: 27
|
||||
readonly property int settingsConfigVersion: 28
|
||||
|
||||
readonly property bool isGreeterMode: Quickshell.env("DMS_RUN_GREETER") === "1" || Quickshell.env("DMS_RUN_GREETER") === "true"
|
||||
|
||||
@@ -342,10 +342,6 @@ Singleton {
|
||||
onFrameBarInsetPaddingChanged: saveSettings()
|
||||
property real frameRounding: Spec.SPEC.frameRounding.def
|
||||
onFrameRoundingChanged: saveSettings()
|
||||
property string frameColor: Spec.SPEC.frameColor.def
|
||||
onFrameColorChanged: saveSettings()
|
||||
property real frameOpacity: Spec.SPEC.frameOpacity.def
|
||||
onFrameOpacityChanged: saveSettings()
|
||||
property var frameScreenPreferences: Spec.SPEC.frameScreenPreferences.def
|
||||
onFrameScreenPreferencesChanged: saveSettings()
|
||||
property real frameBarSize: Spec.SPEC.frameBarSize.def
|
||||
@@ -378,15 +374,9 @@ Singleton {
|
||||
_reconcileConnectedFrameBarStyles();
|
||||
}
|
||||
|
||||
readonly property color effectiveFrameColor: {
|
||||
const fc = frameColor;
|
||||
if (!fc || fc === "default")
|
||||
return Theme.surfaceContainer;
|
||||
if (fc === "primary")
|
||||
return Theme.primary;
|
||||
if (fc === "surface")
|
||||
return Theme.surface;
|
||||
return fc;
|
||||
readonly property real frameSurfaceOpacity: {
|
||||
barConfigs;
|
||||
return barTransparency(barConfigs.find(bc => bc.enabled !== false && !isIslandBarConfig(bc)));
|
||||
}
|
||||
|
||||
property string systemTrayIconTintMode: Spec.SPEC.systemTrayIconTintMode.def
|
||||
@@ -834,8 +824,6 @@ Singleton {
|
||||
"islandHoverOpenDelay": 150,
|
||||
"islandHoverCloseDelay": 150,
|
||||
"islandPalette": "default",
|
||||
"islandTransparency": 1,
|
||||
"islandCornerRadius": 34,
|
||||
"islandHighContrast": false,
|
||||
"islandMediaClockVisible": true,
|
||||
"islandNotificationBadgeClearOnOpen": false,
|
||||
|
||||
@@ -1011,8 +1011,9 @@ Singleton {
|
||||
readonly property color connectedSurfaceColor: {
|
||||
if (typeof SettingsData === "undefined")
|
||||
return withAlpha(hostSurface, popupTransparency);
|
||||
return isConnectedEffect ? withAlpha(SettingsData.effectiveFrameColor, SettingsData.frameOpacity) : withAlpha(hostSurface, popupTransparency);
|
||||
return isConnectedEffect ? frameSurfaceColor : withAlpha(hostSurface, popupTransparency);
|
||||
}
|
||||
readonly property color frameSurfaceColor: withAlpha(hostSurface, typeof SettingsData === "undefined" ? popupTransparency : SettingsData.frameSurfaceOpacity)
|
||||
readonly property real connectedSurfaceRadius: isConnectedEffect ? connectedCornerRadius : windowRadius
|
||||
readonly property bool connectedSurfaceBlurEnabled: (typeof SettingsData === "undefined") ? true : (!isConnectedEffect || SettingsData.frameBlurEnabled)
|
||||
readonly property real effectScaleCollapsed: AnimVariants.effectScaleCollapsed
|
||||
@@ -1361,8 +1362,6 @@ Singleton {
|
||||
property real popupTransparency: {
|
||||
if (typeof SettingsData === "undefined")
|
||||
return 1.0;
|
||||
if (isConnectedEffect)
|
||||
return SettingsData.frameOpacity !== undefined ? SettingsData.frameOpacity : 1.0;
|
||||
return SettingsData.popupTransparency !== undefined ? SettingsData.popupTransparency : 1.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1372,12 +1372,6 @@ var LOCAL_SPEC = {
|
||||
frameRounding: {
|
||||
def: 23
|
||||
},
|
||||
frameColor: {
|
||||
def: ""
|
||||
},
|
||||
frameOpacity: {
|
||||
def: 1.0
|
||||
},
|
||||
frameScreenPreferences: {
|
||||
def: ["all"]
|
||||
},
|
||||
|
||||
@@ -220,7 +220,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (currentVersion < 2) {
|
||||
if (currentVersion < 2 && targetVersion >= 2) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 2");
|
||||
|
||||
if (settings.barConfigs === undefined) {
|
||||
@@ -279,13 +279,13 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 2;
|
||||
}
|
||||
|
||||
if (currentVersion < 3) {
|
||||
if (currentVersion < 3 && targetVersion >= 3) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 3");
|
||||
console.info("Per-widget controlCenterButton config now supported via widgetData properties");
|
||||
settings.configVersion = 3;
|
||||
}
|
||||
|
||||
if (currentVersion < 4) {
|
||||
if (currentVersion < 4 && targetVersion >= 4) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 4");
|
||||
console.info("Migrating desktop widgets to unified desktopWidgetInstances");
|
||||
|
||||
@@ -380,7 +380,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 4;
|
||||
}
|
||||
|
||||
if (currentVersion < 5) {
|
||||
if (currentVersion < 5 && targetVersion >= 5) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 5");
|
||||
console.info("Moving sensitive data (weather location, coordinates) to session.json");
|
||||
|
||||
@@ -390,7 +390,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 5;
|
||||
}
|
||||
|
||||
if (currentVersion < 6) {
|
||||
if (currentVersion < 6 && targetVersion >= 6) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 6");
|
||||
|
||||
if (settings.barElevationEnabled === undefined) {
|
||||
@@ -409,11 +409,11 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 6;
|
||||
}
|
||||
|
||||
if (currentVersion < 11) {
|
||||
if (currentVersion < 11 && targetVersion >= 11) {
|
||||
settings.configVersion = 11;
|
||||
}
|
||||
|
||||
if (currentVersion < 12) {
|
||||
if (currentVersion < 12 && targetVersion >= 12) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 12");
|
||||
if (settings.batteryNotificationType !== undefined) {
|
||||
settings.batteryChargeLimitNotificationType = settings.batteryNotificationType;
|
||||
@@ -424,7 +424,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 12;
|
||||
}
|
||||
|
||||
if (currentVersion < 13) {
|
||||
if (currentVersion < 13 && targetVersion >= 13) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 13");
|
||||
console.info("Moving device and network pins to cache.json");
|
||||
|
||||
@@ -435,7 +435,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 13;
|
||||
}
|
||||
|
||||
if (currentVersion < 14) {
|
||||
if (currentVersion < 14 && targetVersion >= 14) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 14");
|
||||
console.info("Dropping keys that match defaults; settings.json now stores only changed values");
|
||||
|
||||
@@ -443,7 +443,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 14;
|
||||
}
|
||||
|
||||
if (currentVersion < 15) {
|
||||
if (currentVersion < 15 && targetVersion >= 15) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 15");
|
||||
console.info("Moving machine-specific state to session.json and usage histories to cache.json");
|
||||
|
||||
@@ -462,7 +462,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 15;
|
||||
}
|
||||
|
||||
if (currentVersion < 16) {
|
||||
if (currentVersion < 16 && targetVersion >= 16) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 16");
|
||||
console.info("Moving Niri overview close behavior to the window focus setting");
|
||||
|
||||
@@ -474,7 +474,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 16;
|
||||
}
|
||||
|
||||
if (currentVersion < 17) {
|
||||
if (currentVersion < 17 && targetVersion >= 17) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 17");
|
||||
console.info("Converting batteryPillStyle to batteryStyle");
|
||||
|
||||
@@ -493,7 +493,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 17;
|
||||
}
|
||||
|
||||
if (currentVersion < 18) {
|
||||
if (currentVersion < 18 && targetVersion >= 18) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 18");
|
||||
console.info("Moving the shell-wide Dank Island onto its bar config as a per-instance mode");
|
||||
|
||||
@@ -516,14 +516,14 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 18;
|
||||
}
|
||||
|
||||
if (currentVersion < 19) {
|
||||
if (currentVersion < 19 && targetVersion >= 19) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 19");
|
||||
console.info("Moving global bar widget options onto each widget instance");
|
||||
migrateBarWidgetGlobals(settings);
|
||||
settings.configVersion = 19;
|
||||
}
|
||||
|
||||
if (currentVersion < 20) {
|
||||
if (currentVersion < 20 && targetVersion >= 20) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 20");
|
||||
console.info("Marking bars and dock that already match the surface opacity as following the interface style");
|
||||
var surfaceOpacity = settings.popupTransparency ?? 1.0;
|
||||
@@ -538,7 +538,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 20;
|
||||
}
|
||||
|
||||
if (currentVersion < 21) {
|
||||
if (currentVersion < 21 && targetVersion >= 21) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 21");
|
||||
console.info("Dropping settings keys that no longer have a consumer");
|
||||
for (var i21 = 0; i21 < REMOVED_KEYS_V21.length; i21++)
|
||||
@@ -546,7 +546,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 21;
|
||||
}
|
||||
|
||||
if (currentVersion < 22) {
|
||||
if (currentVersion < 22 && targetVersion >= 22) {
|
||||
const moves = [["waveProgressEnabled", "waveProgress", true], ["mediaWallpaperEnabled", "albumArtBackdrop", true], ["mediaUseAlbumArtAccent", "albumArtAccent", true], ["appleMusicAnimatedArtEnabled", "animatedArt", false]];
|
||||
const options = Object.assign({}, settings.dashOptions ?? {});
|
||||
const media = Object.assign({}, options.media ?? {});
|
||||
@@ -564,14 +564,14 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 22;
|
||||
}
|
||||
|
||||
if (currentVersion < 23) {
|
||||
if (currentVersion < 23 && targetVersion >= 23) {
|
||||
if (settings.radiusStrength === undefined)
|
||||
settings.radiusStrength = strengthFromWindowRadius(settings.cornerRadius);
|
||||
delete settings.cornerRadius;
|
||||
settings.configVersion = 23;
|
||||
}
|
||||
|
||||
if (currentVersion < 24) {
|
||||
if (currentVersion < 24 && targetVersion >= 24) {
|
||||
const removed = ["greeterFontFamily", "greeterLockDateFormat", "greeterWallpaperFillMode", "greeterWallpaperPath", "greeterShowWeather"];
|
||||
for (const key of removed)
|
||||
delete settings[key];
|
||||
@@ -587,7 +587,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 24;
|
||||
}
|
||||
|
||||
if (currentVersion < 25) {
|
||||
if (currentVersion < 25 && targetVersion >= 25) {
|
||||
const bars = Array.isArray(settings.barConfigs) ? settings.barConfigs : [];
|
||||
for (const bar of bars) {
|
||||
if (!bar)
|
||||
@@ -599,7 +599,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 25;
|
||||
}
|
||||
|
||||
if (currentVersion < 26) {
|
||||
if (currentVersion < 26 && targetVersion >= 26) {
|
||||
const customSpeed = 4;
|
||||
const speedMoves = [["animationSpeed", "customAnimationDuration", "animationDuration", [0, 250, 500, 750], 500], ["popoutAnimationSpeed", "popoutCustomAnimationDuration", "popoutAnimationDuration", [0, 150, 300, 500], 150], ["modalAnimationSpeed", "modalCustomAnimationDuration", "modalAnimationDuration", [0, 150, 300, 500], 150], ["notificationAnimationSpeed", "notificationCustomAnimationDuration", "notificationAnimationDuration", [0, 200, 400, 600], 400]];
|
||||
for (const [speedKey, customKey, durationKey, presets, customDefault] of speedMoves) {
|
||||
@@ -614,7 +614,7 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 26;
|
||||
}
|
||||
|
||||
if (currentVersion < 27) {
|
||||
if (currentVersion < 27 && targetVersion >= 27) {
|
||||
if (Array.isArray(settings.controlCenterWidgets)) {
|
||||
settings.controlCenterWidgets = settings.controlCenterWidgets.map(widget => {
|
||||
if (!widget || typeof widget !== "object")
|
||||
@@ -639,6 +639,31 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 27;
|
||||
}
|
||||
|
||||
if (currentVersion < 28 && targetVersion >= 28) {
|
||||
const surfaceOpacity = Number.isFinite(Number(settings.popupTransparency)) ? Number(settings.popupTransparency) : 1.0;
|
||||
const bars = Array.isArray(settings.barConfigs) ? settings.barConfigs : [];
|
||||
const frameOpacity = Number(settings.frameOpacity);
|
||||
const frameBar = bars.find(bc => bc && bc.enabled !== false && bc.island !== true);
|
||||
if (frameBar && Number.isFinite(frameOpacity) && frameOpacity !== surfaceOpacity && frameBar.followInterfaceStyle !== false) {
|
||||
frameBar.followInterfaceStyle = false;
|
||||
frameBar.transparency = frameOpacity;
|
||||
}
|
||||
for (const bc of bars) {
|
||||
if (!bc || bc.island !== true)
|
||||
continue;
|
||||
const islandOpacity = Number(bc.islandTransparency);
|
||||
if (Number.isFinite(islandOpacity)) {
|
||||
bc.transparency = islandOpacity;
|
||||
bc.followInterfaceStyle = islandOpacity === surfaceOpacity;
|
||||
}
|
||||
delete bc.islandTransparency;
|
||||
delete bc.islandCornerRadius;
|
||||
}
|
||||
delete settings.frameColor;
|
||||
delete settings.frameOpacity;
|
||||
settings.configVersion = 28;
|
||||
}
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ Item {
|
||||
readonly property color _hostSurface: Theme.hostSurface
|
||||
readonly property string _barId: barConfig?.id ?? "default"
|
||||
property real _backgroundAlpha: SettingsData.barTransparency(barConfig)
|
||||
readonly property color _bgColor: (FrameTransitionState.effectiveFrameEnabled && usesFrameBarChrome) ? Theme.withAlpha(SettingsData.effectiveFrameColor, SettingsData.frameOpacity) : Theme.withAlpha(_hostSurface, _backgroundAlpha)
|
||||
readonly property color _bgColor: (FrameTransitionState.effectiveFrameEnabled && usesFrameBarChrome) ? Theme.frameSurfaceColor : Theme.withAlpha(_hostSurface, _backgroundAlpha)
|
||||
|
||||
function _updateBackgroundAlpha() {
|
||||
const live = SettingsData.barConfigs.find(c => c.id === _barId);
|
||||
|
||||
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Modals.DankLauncherV2 as DankLauncher
|
||||
import qs.Modules.DankBar
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
import "../../Common/LayoutResolver.js" as Resolver
|
||||
@@ -68,7 +69,6 @@ Item {
|
||||
readonly property int screenMargin: 200
|
||||
readonly property int referenceScreenWidth: 1920
|
||||
readonly property int referenceScreenHeight: 1080
|
||||
readonly property int maxCornerRadius: 64
|
||||
readonly property int maxHoverDelay: 1000
|
||||
readonly property var springStiffnessRange: [100, 1200]
|
||||
readonly property var springDampingRange: [10, 100]
|
||||
@@ -183,7 +183,8 @@ Item {
|
||||
alongOffset: Math.max(-root.maximumAlongOffset, Math.min(root.maximumAlongOffset, root.setting("islandAlongOffset")))
|
||||
outerGap: root.outerGap
|
||||
compactThickness: root.compactThickness
|
||||
cornerRadius: Math.max(0, Math.min(root.maxCornerRadius, root.setting("islandCornerRadius")))
|
||||
cornerRadius: Theme.windowRadius
|
||||
pillRadius: BarMetrics.pillRadius(root.compactThickness, root.barConfig?.widgetStyle ?? "pills")
|
||||
homeCompactTight: root.setting("islandHomeCompactTight")
|
||||
homeStatusContent: SettingsData.islandHomeStatusContent(root.barConfig)
|
||||
homeClockDisplay: SettingsData.islandClockDisplay(root.barConfig)
|
||||
@@ -252,7 +253,7 @@ Item {
|
||||
springMass: Math.max(root.springMassRange[0], Math.min(root.springMassRange[1], root.setting("islandSpringMass")))
|
||||
palette: root.setting("islandPalette")
|
||||
highContrast: root.setting("islandHighContrast")
|
||||
transparency: root.setting("islandTransparency")
|
||||
transparency: SettingsData.barTransparency(root.barConfig)
|
||||
onScrollWheel: wheel => root.scrollWheel(wheel)
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ QtObject {
|
||||
property string edge: "top"
|
||||
readonly property bool isVertical: edge === "left" || edge === "right"
|
||||
property real cornerRadius: 34
|
||||
property real pillRadius: cornerRadius
|
||||
readonly property real edgeCornerRadius: Math.round(cornerRadius * 0.75)
|
||||
property real compactThickness: 38
|
||||
property string batteryStyle: "solid"
|
||||
@@ -355,7 +356,7 @@ QtObject {
|
||||
}
|
||||
|
||||
function pillTarget(alongSize, crossSize) {
|
||||
const radius = Math.min(crossSize / 2, root.cornerRadius);
|
||||
const radius = Math.min(crossSize / 2, root.pillRadius);
|
||||
return {
|
||||
"width": root.isVertical ? crossSize : alongSize,
|
||||
"height": root.isVertical ? alongSize : crossSize,
|
||||
|
||||
@@ -200,7 +200,7 @@ FocusScope {
|
||||
readonly property real animatedSurfaceRadius: Math.max(0, surfaceMotion.currentTopLeftRadius, surfaceMotion.currentTopRightRadius, surfaceMotion.currentBottomLeftRadius, surfaceMotion.currentBottomRightRadius)
|
||||
onAnimatedSurfaceRadiusChanged: dockChromeSync.schedule()
|
||||
readonly property real surfaceRadius: config.mode === "taskbar" ? (usesConnectedFrameChrome ? Theme.connectedSurfaceRadius : 0) : Theme.windowRadius
|
||||
readonly property color surfaceColor: usesConnectedFrameChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, backgroundTransparency)
|
||||
readonly property color surfaceColor: usesConnectedFrameChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.hostSurface, backgroundTransparency)
|
||||
readonly property real surfaceTopLeftRadius: usesConnectedFrameChrome && (dock.config.position === SettingsData.Position.Top || dock.config.position === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||
readonly property real surfaceTopRightRadius: usesConnectedFrameChrome && (dock.config.position === SettingsData.Position.Top || dock.config.position === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||
readonly property real surfaceBottomLeftRadius: usesConnectedFrameChrome && (dock.config.position === SettingsData.Position.Bottom || dock.config.position === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||
|
||||
@@ -14,7 +14,7 @@ Item {
|
||||
required property real cutoutLeftInset
|
||||
required property real cutoutRightInset
|
||||
required property real cutoutRadius
|
||||
property color borderColor: Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity)
|
||||
property color borderColor: Theme.frameSurfaceColor
|
||||
|
||||
ShaderEffect {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -262,7 +262,7 @@ PanelWindow {
|
||||
readonly property real _effectiveModalFarStartCcr: win._modalRadii.farStart
|
||||
readonly property real _effectiveModalFarEndCcr: win._modalRadii.farEnd
|
||||
readonly property real _effectiveModalFarExtent: Math.max(win._effectiveModalFarStartCcr, win._effectiveModalFarEndCcr)
|
||||
readonly property color _surfaceColor: Theme.connectedSurfaceColor
|
||||
readonly property color _surfaceColor: Theme.frameSurfaceColor
|
||||
readonly property real _surfaceRadius: Theme.connectedSurfaceRadius
|
||||
readonly property real _seamOverlap: Theme.hairline(win._dpr)
|
||||
readonly property bool _disableLayer: Quickshell.env("DMS_DISABLE_LAYER") === "true" || Quickshell.env("DMS_DISABLE_LAYER") === "1"
|
||||
@@ -396,7 +396,7 @@ PanelWindow {
|
||||
}
|
||||
|
||||
readonly property bool _blurSurfacesActive: BlurService.enabled && SettingsData.frameBlurEnabled && win._frameActive
|
||||
readonly property int _blurCutoutCompensation: SettingsData.frameOpacity <= 0.2 ? 1 : 0
|
||||
readonly property int _blurCutoutCompensation: Theme.frameSurfaceColor.a <= 0.2 ? 1 : 0
|
||||
readonly property int _blurCutoutLeft: Math.max(0, win.cutoutLeftInset - win._blurCutoutCompensation)
|
||||
readonly property int _blurCutoutTop: Math.max(0, win.cutoutTopInset - win._blurCutoutCompensation)
|
||||
readonly property int _blurCutoutRight: Math.min(win._windowRegionWidth, win._windowRegionWidth - win.cutoutRightInset + win._blurCutoutCompensation)
|
||||
|
||||
@@ -52,35 +52,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "islandTransparency"
|
||||
tags: ["island", "appearance", "surface", "opacity", "transparency", "blur"]
|
||||
visible: bar.selectedBarIsIsland
|
||||
resetStore: bar
|
||||
resetKeys: ["islandTransparency"]
|
||||
text: I18n.tr("Opacity", "island settings: island surface opacity slider")
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
step: 1
|
||||
value: Math.round(bar.islandSetting("islandTransparency") * 100)
|
||||
onSliderValueChanged: value => bar.apply("islandTransparency", value / 100)
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "islandCornerRadius"
|
||||
tags: ["island", "appearance", "corner", "radius", "rounding", "pill", "expanded"]
|
||||
visible: bar.selectedBarIsIsland
|
||||
resetStore: bar
|
||||
resetKeys: ["islandCornerRadius"]
|
||||
text: I18n.tr("Corner radius", "island settings: island corner radius slider")
|
||||
unit: "px"
|
||||
minimum: 0
|
||||
maximum: 64
|
||||
step: 1
|
||||
value: bar.islandSetting("islandCornerRadius")
|
||||
onSliderValueChanged: value => bar.apply("islandCornerRadius", value)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "islandHighContrast"
|
||||
tags: ["island", "appearance", "contrast", "accessibility", "outline"]
|
||||
|
||||
@@ -101,16 +101,6 @@ Item {
|
||||
onSliderDragFinished: v => SettingsData.set("frameBarSize", v)
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "frameOpacity"
|
||||
tags: ["frame", "border", "surface", "popup", "opacity", "transparency"]
|
||||
text: I18n.tr("Surface opacity")
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
value: SettingsData.frameOpacity * 100
|
||||
onSliderDragFinished: v => SettingsData.set("frameOpacity", v / 100)
|
||||
}
|
||||
|
||||
SettingsSliderRow {
|
||||
settingKey: "frameBarInsetPadding"
|
||||
tags: ["frame", "bar", "edge", "inset", "padding", "corner", "end"]
|
||||
@@ -165,101 +155,6 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsButtonGroupRow {
|
||||
settingKey: "frameColor"
|
||||
tags: ["frame", "border", "color", "theme", "primary", "surface", "default"]
|
||||
text: I18n.tr("Color")
|
||||
model: [I18n.tr("Default"), I18n.tr("Primary"), I18n.tr("Surface"), I18n.tr("Custom")]
|
||||
buttonPadding: Theme.spacingS
|
||||
minButtonWidth: 44
|
||||
textSize: Theme.fontSizeSmall
|
||||
currentIndex: {
|
||||
const fc = SettingsData.frameColor;
|
||||
if (!fc || fc === "default")
|
||||
return 0;
|
||||
switch (fc) {
|
||||
case "primary":
|
||||
return 1;
|
||||
case "surface":
|
||||
return 2;
|
||||
default:
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
onSelectionChanged: (index, selected) => {
|
||||
if (!selected)
|
||||
return;
|
||||
switch (index) {
|
||||
case 0:
|
||||
SettingsData.set("frameColor", "");
|
||||
break;
|
||||
case 1:
|
||||
SettingsData.set("frameColor", "primary");
|
||||
break;
|
||||
case 2:
|
||||
SettingsData.set("frameColor", "surface");
|
||||
break;
|
||||
case 3:
|
||||
const cur = SettingsData.frameColor;
|
||||
const isPreset = !cur || cur === "primary" || cur === "surface";
|
||||
if (isPreset)
|
||||
SettingsData.set("frameColor", "#2a2a2a");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsRow {
|
||||
visible: {
|
||||
const fc = SettingsData.frameColor;
|
||||
return !!(fc && fc !== "primary" && fc !== "surface");
|
||||
}
|
||||
body: Item {
|
||||
|
||||
width: parent.width
|
||||
height: customColorRow.height + Theme.spacingM * 2
|
||||
|
||||
Row {
|
||||
id: customColorRow
|
||||
width: parent.width - Theme.spacingM * 2
|
||||
x: Theme.spacingM
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Theme.spacingM
|
||||
|
||||
StyledText {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: I18n.tr("Custom color")
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Theme.fontWeightMedium
|
||||
color: Theme.surfaceText
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 32
|
||||
height: 32
|
||||
radius: Theme.cornerRadiusL
|
||||
color: SettingsData.effectiveFrameColor
|
||||
border.color: Theme.outline
|
||||
border.width: Theme.outlineWidth
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
PopoutService.colorPickerModal.selectedColor = SettingsData.effectiveFrameColor;
|
||||
PopoutService.colorPickerModal.pickerTitle = I18n.tr("Frame Border Color");
|
||||
PopoutService.colorPickerModal.onColorSelectedCallback = function (color) {
|
||||
SettingsData.set("frameColor", color.toString());
|
||||
};
|
||||
PopoutService.colorPickerModal.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
@@ -30,7 +30,7 @@ Column {
|
||||
readonly property var opacityTargets: {
|
||||
SettingsData.barConfigs;
|
||||
SettingsData.dockConfigs;
|
||||
const bars = SettingsData.barConfigs.filter(config => !SettingsData.isIslandBarConfig(config)).map(config => ({
|
||||
const bars = SettingsData.barConfigs.map(config => ({
|
||||
kind: "bar",
|
||||
id: config.id,
|
||||
name: config.name || config.id,
|
||||
@@ -84,14 +84,6 @@ Column {
|
||||
onSliderValueChanged: newValue => SettingsData.set("popupTransparency", newValue / 100)
|
||||
}
|
||||
|
||||
SettingsControlledBy {
|
||||
visible: root.connectedFrameModeActive
|
||||
parentModal: root.parentModal
|
||||
section: "frameOpacity"
|
||||
settingLabel: I18n.tr("Opacity")
|
||||
reason: I18n.tr("Managed by Frame in Connected Mode")
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
tab: "theme"
|
||||
tags: ["foreground", "layers", "contrast", "surface", "blur", "glass", "frosted"]
|
||||
|
||||
@@ -11,7 +11,7 @@ test("legacy migration preserves explicit radii and defaults sparse settings to
|
||||
const original = { configVersion: version, cornerRadius: radius, niriLayoutRadiusOverride: 17 };
|
||||
const migrated = store.migrateToVersion(original, 26);
|
||||
assert.equal(migrated.radiusStrength, strength);
|
||||
assert.equal(migrated.configVersion, 27);
|
||||
assert.equal(migrated.configVersion, 26);
|
||||
assert.equal("cornerRadius" in migrated, false);
|
||||
assert.equal(migrated.niriLayoutRadiusOverride, 17);
|
||||
assert.equal(original.configVersion, version);
|
||||
|
||||
@@ -3676,30 +3676,6 @@
|
||||
"parentLabel": "Bar",
|
||||
"icon": "border_style"
|
||||
},
|
||||
{
|
||||
"section": "islandCornerRadius",
|
||||
"label": "Corner radius",
|
||||
"tabIndex": 6,
|
||||
"category": "Appearance",
|
||||
"keywords": [
|
||||
"appearance",
|
||||
"bar",
|
||||
"corner",
|
||||
"corners",
|
||||
"expanded",
|
||||
"island",
|
||||
"panel",
|
||||
"pill",
|
||||
"radius",
|
||||
"round",
|
||||
"rounded",
|
||||
"rounding",
|
||||
"statusbar",
|
||||
"taskbar",
|
||||
"topbar"
|
||||
],
|
||||
"parentLabel": "Bar"
|
||||
},
|
||||
{
|
||||
"section": "barCornerStyle",
|
||||
"label": "Corner style",
|
||||
@@ -3924,26 +3900,6 @@
|
||||
],
|
||||
"parentLabel": "Bar"
|
||||
},
|
||||
{
|
||||
"section": "islandTransparency",
|
||||
"label": "Opacity",
|
||||
"tabIndex": 6,
|
||||
"category": "Appearance",
|
||||
"keywords": [
|
||||
"appearance",
|
||||
"bar",
|
||||
"blur",
|
||||
"island",
|
||||
"opacity",
|
||||
"panel",
|
||||
"statusbar",
|
||||
"surface",
|
||||
"taskbar",
|
||||
"topbar",
|
||||
"transparency"
|
||||
],
|
||||
"parentLabel": "Bar"
|
||||
},
|
||||
{
|
||||
"section": "islandPalette",
|
||||
"label": "Palette",
|
||||
@@ -9988,33 +9944,6 @@
|
||||
"icon": "border_outer",
|
||||
"conditionKey": "frameEnabled"
|
||||
},
|
||||
{
|
||||
"section": "frameColor",
|
||||
"label": "Color",
|
||||
"tabIndex": 33,
|
||||
"category": "Frame",
|
||||
"keywords": [
|
||||
"bar",
|
||||
"border",
|
||||
"color",
|
||||
"colour",
|
||||
"decoration",
|
||||
"default",
|
||||
"frame",
|
||||
"hue",
|
||||
"panel",
|
||||
"primary",
|
||||
"statusbar",
|
||||
"surface",
|
||||
"taskbar",
|
||||
"theme",
|
||||
"tint",
|
||||
"topbar",
|
||||
"window"
|
||||
],
|
||||
"parentLabel": "Bar",
|
||||
"conditionKey": "frameEnabled"
|
||||
},
|
||||
{
|
||||
"section": "frameConnectedOptions",
|
||||
"label": "Connected",
|
||||
@@ -10221,29 +10150,6 @@
|
||||
"parentLabel": "Bar",
|
||||
"conditionKey": "nativeOverviewCapable"
|
||||
},
|
||||
{
|
||||
"section": "frameOpacity",
|
||||
"label": "Surface opacity",
|
||||
"tabIndex": 33,
|
||||
"category": "Frame",
|
||||
"keywords": [
|
||||
"bar",
|
||||
"border",
|
||||
"decoration",
|
||||
"frame",
|
||||
"opacity",
|
||||
"panel",
|
||||
"popup",
|
||||
"statusbar",
|
||||
"surface",
|
||||
"taskbar",
|
||||
"topbar",
|
||||
"transparency",
|
||||
"window"
|
||||
],
|
||||
"parentLabel": "Bar",
|
||||
"conditionKey": "frameEnabled"
|
||||
},
|
||||
{
|
||||
"section": "frameModeSelector",
|
||||
"label": "Surfaces",
|
||||
|
||||
Reference in New Issue
Block a user