diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index 2d134613e..3619aca81 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -1010,6 +1010,7 @@ Singleton { property int dankIslandHoverCloseDelay: 150 property string dankIslandPalette: "default" property real dankIslandTransparency: 1 + property int dankIslandCornerRadius: 34 property bool dankIslandHighContrast: false property bool dankIslandMediaClockVisible: true property bool dankIslandNotificationBadgeClearOnOpen: false diff --git a/quickshell/Common/settings/SettingsSpec.js b/quickshell/Common/settings/SettingsSpec.js index b3767d3c2..f1bbbce42 100644 --- a/quickshell/Common/settings/SettingsSpec.js +++ b/quickshell/Common/settings/SettingsSpec.js @@ -546,6 +546,7 @@ var SPEC = { dankIslandHoverCloseDelay: { def: 150 }, dankIslandPalette: { def: "default" }, dankIslandTransparency: { def: 1 }, + dankIslandCornerRadius: { def: 34 }, dankIslandHighContrast: { def: false }, dankIslandMediaClockVisible: { def: true }, dankIslandNotificationBadgeClearOnOpen: { def: false }, diff --git a/quickshell/Modules/DankIsland/DankIslandSurface.qml b/quickshell/Modules/DankIsland/DankIslandSurface.qml index 00698a105..3f36e43b3 100644 --- a/quickshell/Modules/DankIsland/DankIslandSurface.qml +++ b/quickshell/Modules/DankIsland/DankIslandSurface.qml @@ -38,14 +38,8 @@ Item { return Theme.surfaceContainerHigh; } readonly property bool popupStyled: root.controller.expanded - readonly property real compactOpacity: Math.max(0, Math.min(1, SettingsData.dankIslandTransparency)) - readonly property color effectiveSurfaceColor: { - if (root.highContrast) - return Theme.surfaceContainerHighest; - if (root.popupStyled) - return Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency); - return Theme.withAlpha(root.surfaceColor, root.compactOpacity); - } + readonly property real islandOpacity: Math.max(0, Math.min(1, SettingsData.dankIslandTransparency)) + readonly property color effectiveSurfaceColor: root.highContrast ? Theme.surfaceContainerHighest : Theme.withAlpha(root.surfaceColor, root.islandOpacity) readonly property real surfaceOpacity: root.effectiveSurfaceColor.a readonly property real currentSurfaceRadius: Math.max(0, motion.currentTopLeftRadius, motion.currentBottomLeftRadius) readonly property color notificationAccentColor: { diff --git a/quickshell/Modules/DankIsland/IslandController.qml b/quickshell/Modules/DankIsland/IslandController.qml index d30904da6..627fd82c4 100644 --- a/quickshell/Modules/DankIsland/IslandController.qml +++ b/quickshell/Modules/DankIsland/IslandController.qml @@ -32,8 +32,10 @@ QtObject { property real horizontalOffset: 0 property real outerGap: 8 readonly property bool bottomEdge: SettingsData.dankIslandEdge === "bottom" - readonly property real anchoredRadius: bottomEdge ? 34 : 26 - readonly property real freeRadius: bottomEdge ? 26 : 34 + readonly property real cornerRadius: Math.max(0, Math.min(64, SettingsData.dankIslandCornerRadius)) + readonly property real edgeCornerRadius: Math.round(cornerRadius * 0.75) + readonly property real topCornerRadius: bottomEdge ? cornerRadius : edgeCornerRadius + readonly property real bottomCornerRadius: bottomEdge ? edgeCornerRadius : cornerRadius property real compactHeight: 38 property int transientTimeout: 2200 property int notificationTimeout: 5000 @@ -290,7 +292,7 @@ QtObject { readonly property real mediaCompactWidth: Math.ceil(Math.max(1, mediaContentWidth)) function pillTarget(width, height) { - const radius = height / 2; + const radius = Math.min(height / 2, root.cornerRadius); return { "width": width, "height": height, @@ -309,10 +311,10 @@ QtObject { "height": height, "offsetX": root.horizontalOffset, "offsetY": root.outerGap, - "topLeftRadius": root.anchoredRadius, - "topRightRadius": root.anchoredRadius, - "bottomLeftRadius": root.freeRadius, - "bottomRightRadius": root.freeRadius + "topLeftRadius": root.topCornerRadius, + "topRightRadius": root.topCornerRadius, + "bottomLeftRadius": root.bottomCornerRadius, + "bottomRightRadius": root.bottomCornerRadius }; } diff --git a/quickshell/Modules/DankIsland/IslandSatelliteHost.qml b/quickshell/Modules/DankIsland/IslandSatelliteHost.qml index 18f73c24f..e42b620be 100644 --- a/quickshell/Modules/DankIsland/IslandSatelliteHost.qml +++ b/quickshell/Modules/DankIsland/IslandSatelliteHost.qml @@ -72,6 +72,7 @@ Item { } readonly property color chromeColor: Theme.withAlpha(root.chromeBase, root.chromeOpacity) readonly property bool chromeTranslucent: root.backgroundEnabled && root.chromeOpacity > 0 && root.chromeOpacity < 1 + readonly property bool chromeCoversWidgets: root.backgroundEnabled && root.chromeOpacity > 0 readonly property real islandOpacity: root.islandSurface?.surfaceOpacity ?? 1 readonly property bool islandTranslucent: root.islandOpacity > 0 && root.islandOpacity < 1 readonly property bool tracksIsland: !root.edgeAligned && root.visible @@ -190,7 +191,7 @@ Item { } if (!BlurService.enabled) return; - const widgets = root._blurWidgetItems.filter(w => w && w.visible && w.width > 0 && w.height > 0); + const widgets = root.chromeCoversWidgets ? [] : root._blurWidgetItems.filter(w => w && w.visible && w.width > 0 && w.height > 0); const chromes = [leftChrome, rightChrome].filter(c => root.chromeTranslucent && c.visible); if (chromes.length === 0 && widgets.length === 0 && !root.islandTranslucent) return; @@ -233,6 +234,7 @@ Item { } onChromeTranslucentChanged: blurRebuildTimer.restart() + onChromeCoversWidgetsChanged: blurRebuildTimer.restart() onEdgeAlignedChanged: { blurRebuildTimer.restart(); blurTrailTimer.restart(); diff --git a/quickshell/Modules/Settings/DankIslandTab.qml b/quickshell/Modules/Settings/DankIslandTab.qml index 502c0e0fa..e197b3c0a 100644 --- a/quickshell/Modules/Settings/DankIslandTab.qml +++ b/quickshell/Modules/Settings/DankIslandTab.qml @@ -301,6 +301,19 @@ Item { onSliderValueChanged: value => SettingsData.set("dankIslandTransparency", value / 100) } + SettingsSliderRow { + settingKey: "dankIslandCornerRadius" + tags: ["island", "appearance", "corner", "radius", "rounding", "pill", "expanded"] + text: I18n.tr("Corner Radius", "island settings: island corner radius slider") + unit: "px" + minimum: 0 + maximum: 64 + step: 1 + defaultValue: 34 + value: SettingsData.dankIslandCornerRadius + onSliderValueChanged: value => SettingsData.set("dankIslandCornerRadius", value) + } + SettingsToggleRow { settingKey: "dankIslandHighContrast" tags: ["island", "appearance", "contrast", "accessibility", "outline"] @@ -402,7 +415,7 @@ Item { SettingsSliderRow { settingKey: "dankIslandSatelliteSwoopRadius" tags: ["island", "satellite", "goth", "corners", "radius", "sweep", "size"] - text: I18n.tr("Corner Radius", "island settings: satellite goth corner radius slider") + text: I18n.tr("Goth Corner Radius", "island settings: satellite goth corner radius slider") unit: "px" minimum: 4 maximum: 64 diff --git a/quickshell/translations/settings_search_index.json b/quickshell/translations/settings_search_index.json index ede5b5975..d1a38ad3c 100644 --- a/quickshell/translations/settings_search_index.json +++ b/quickshell/translations/settings_search_index.json @@ -12501,21 +12501,21 @@ "conditionKey": "islandEnabled" }, { - "section": "dankIslandSatelliteSwoopRadius", + "section": "dankIslandCornerRadius", "label": "Corner Radius", "tabIndex": 46, "category": "Island", "keywords": [ + "appearance", "corner", "corners", - "goth", + "expanded", "island", + "pill", "radius", "round", "rounded", - "satellite", - "size", - "sweep" + "rounding" ], "conditionKey": "islandEnabled" }, @@ -12638,6 +12638,25 @@ "description": "Floats above windows and other content", "conditionKey": "islandEnabled" }, + { + "section": "dankIslandSatelliteSwoopRadius", + "label": "Goth Corner Radius", + "tabIndex": 46, + "category": "Island", + "keywords": [ + "corner", + "corners", + "goth", + "island", + "radius", + "round", + "rounded", + "satellite", + "size", + "sweep" + ], + "conditionKey": "islandEnabled" + }, { "section": "dankIslandSatelliteGothCorners", "label": "Goth Corners",