diff --git a/quickshell/CODENAME b/quickshell/CODENAME index d434e3fc..a900e981 100644 --- a/quickshell/CODENAME +++ b/quickshell/CODENAME @@ -1 +1 @@ -The Wolverine +Saffron Bloom diff --git a/quickshell/Common/settings/SettingsSpec.js b/quickshell/Common/settings/SettingsSpec.js index 44bd17d6..b4c5ed3d 100644 --- a/quickshell/Common/settings/SettingsSpec.js +++ b/quickshell/Common/settings/SettingsSpec.js @@ -49,15 +49,15 @@ var SPEC = { modalAnimationSpeed: { def: 1 }, modalCustomAnimationDuration: { def: 150 }, enableRippleEffects: { def: true }, - m3ElevationEnabled: { def: true }, + m3ElevationEnabled: { def: false }, m3ElevationIntensity: { def: 12 }, m3ElevationOpacity: { def: 30 }, m3ElevationColorMode: { def: "default" }, m3ElevationLightDirection: { def: "top" }, m3ElevationCustomColor: { def: "#000000" }, - modalElevationEnabled: { def: true }, - popoutElevationEnabled: { def: true }, - barElevationEnabled: { def: true }, + modalElevationEnabled: { def: false }, + popoutElevationEnabled: { def: false }, + barElevationEnabled: { def: false }, wallpaperFillMode: { def: "Fill" }, blurredWallpaperLayer: { def: false }, blurWallpaperOnOverview: { def: false }, @@ -484,7 +484,7 @@ var SPEC = { scrollYBehavior: "workspace", shadowIntensity: 0, shadowOpacity: 60, - shadowColorMode: "default", + shadowColorMode: "text", shadowCustomColor: "#000000", clickThrough: false }], onChange: "updateBarConfigs" diff --git a/quickshell/Modals/Changelog/ChangelogModal.qml b/quickshell/Modals/Changelog/ChangelogModal.qml index 524298b9..3be9f1f4 100644 --- a/quickshell/Modals/Changelog/ChangelogModal.qml +++ b/quickshell/Modals/Changelog/ChangelogModal.qml @@ -18,7 +18,7 @@ FloatingWindow { } objectName: "changelogModal" - title: i18n("What's New") + title: I18n.tr("What's New") minimumSize: Qt.size(modalWidth, modalHeight) maximumSize: Qt.size(modalWidth, modalHeight) color: Theme.surfaceContainer @@ -81,7 +81,7 @@ FloatingWindow { onClicked: root.dismiss() DankTooltip { - text: i18n("Close") + text: I18n.tr("Close") } } } @@ -125,7 +125,7 @@ FloatingWindow { spacing: Theme.spacingM DankButton { - text: i18n("Read Full Release Notes") + text: I18n.tr("Read Full Release Notes") iconName: "open_in_new" backgroundColor: Theme.surfaceContainerHighest textColor: Theme.surfaceText @@ -133,7 +133,7 @@ FloatingWindow { } DankButton { - text: i18n("Got It") + text: I18n.tr("Got It") iconName: "check" backgroundColor: Theme.primary textColor: Theme.primaryText diff --git a/quickshell/Modals/Settings/SettingsContent.qml b/quickshell/Modals/Settings/SettingsContent.qml index dfff231b..5e4b3271 100644 --- a/quickshell/Modals/Settings/SettingsContent.qml +++ b/quickshell/Modals/Settings/SettingsContent.qml @@ -244,8 +244,8 @@ FocusScope { Loader { id: greeterLoader anchors.fill: parent - active: root.currentIndex === 31 - visible: active + active: false + visible: false focus: active sourceComponent: GreeterTab {} diff --git a/quickshell/Modals/Settings/SettingsSidebar.qml b/quickshell/Modals/Settings/SettingsSidebar.qml index 221a4129..7a596e9b 100644 --- a/quickshell/Modals/Settings/SettingsSidebar.qml +++ b/quickshell/Modals/Settings/SettingsSidebar.qml @@ -293,12 +293,6 @@ Rectangle { "icon": "lock", "tabIndex": 11 }, - { - "id": "greeter", - "text": I18n.tr("Greeter"), - "icon": "login", - "tabIndex": 31 - }, { "id": "power_sleep", "text": I18n.tr("Power & Sleep"), diff --git a/quickshell/Modules/DankBar/BarCanvas.qml b/quickshell/Modules/DankBar/BarCanvas.qml index df3f17fb..ab0bdf97 100644 --- a/quickshell/Modules/DankBar/BarCanvas.qml +++ b/quickshell/Modules/DankBar/BarCanvas.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Effects import QtQuick.Shapes import qs.Common import qs.Services @@ -52,43 +53,15 @@ Item { } } - // M3 elevation shadow — Level 2 baseline (navigation bar), with per-bar override support - readonly property bool hasPerBarOverride: (barConfig?.shadowIntensity ?? 0) > 0 - readonly property var elevLevel: Theme.elevationLevel2 - readonly property bool shadowEnabled: (Theme.elevationEnabled && (typeof SettingsData !== "undefined" ? (SettingsData.barElevationEnabled ?? true) : false)) || hasPerBarOverride - readonly property string autoBarShadowDirection: isTop ? "top" : (isBottom ? "bottom" : (isLeft ? "left" : (isRight ? "right" : "top"))) - readonly property string globalShadowDirection: Theme.elevationLightDirection === "autoBar" ? autoBarShadowDirection : Theme.elevationLightDirection - readonly property string perBarShadowDirectionMode: barConfig?.shadowDirectionMode ?? "inherit" - readonly property string perBarManualShadowDirection: { - switch (barConfig?.shadowDirection) { - case "top": - case "topLeft": - case "topRight": - case "bottom": - return barConfig.shadowDirection; - default: - return "top"; - } - } - readonly property string effectiveShadowDirection: { - if (!hasPerBarOverride) - return globalShadowDirection; - switch (perBarShadowDirectionMode) { - case "autoBar": - return autoBarShadowDirection; - case "manual": - return perBarManualShadowDirection === "autoBar" ? autoBarShadowDirection : perBarManualShadowDirection; - default: - return globalShadowDirection; - } - } - - // Per-bar override values (when barConfig.shadowIntensity > 0) - readonly property real overrideBlurPx: (barConfig?.shadowIntensity ?? 0) * 0.2 - readonly property real overrideOpacity: (barConfig?.shadowOpacity ?? 60) / 100 - readonly property string overrideColorMode: barConfig?.shadowColorMode ?? "default" - readonly property color overrideBaseColor: { - switch (overrideColorMode) { + readonly property real shadowIntensity: barConfig?.shadowIntensity ?? 0 + readonly property bool shadowEnabled: shadowIntensity > 0 + readonly property int blurMax: 64 + readonly property real shadowBlurPx: shadowIntensity * 0.2 + readonly property real shadowBlur: Math.max(0, Math.min(1, shadowBlurPx / blurMax)) + readonly property real shadowOpacity: (barConfig?.shadowOpacity ?? 60) / 100 + readonly property string shadowColorMode: barConfig?.shadowColorMode ?? "text" + readonly property color shadowBaseColor: { + switch (shadowColorMode) { case "surface": return Theme.surface; case "primary": @@ -98,16 +71,10 @@ Item { case "custom": return barConfig?.shadowCustomColor ?? "#000000"; default: - return "#000000"; + return Theme.surfaceText; } } - - // Resolved values — per-bar override wins if set, otherwise use global M3 elevation - readonly property real shadowBlurPx: hasPerBarOverride ? overrideBlurPx : (elevLevel.blurPx ?? 8) - readonly property color shadowColor: hasPerBarOverride ? Theme.withAlpha(overrideBaseColor, overrideOpacity) : Theme.elevationShadowColor(elevLevel) - readonly property real shadowOffsetMagnitude: hasPerBarOverride ? (overrideBlurPx * 0.5) : Theme.elevationOffsetMagnitude(elevLevel, 4, effectiveShadowDirection) - readonly property real shadowOffsetX: Theme.elevationOffsetXFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude) - readonly property real shadowOffsetY: Theme.elevationOffsetYFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude) + readonly property color shadowColor: Theme.withAlpha(shadowBaseColor, shadowOpacity * barWindow._backgroundAlpha) readonly property string mainPath: generatePathForPosition(width, height) readonly property string borderFullPath: generateBorderFullPath(width, height) @@ -151,28 +118,42 @@ Item { } } - ElevationShadow { - id: barShadow - visible: root.shadowEnabled && root.width > 0 && root.height > 0 + Loader { + id: shadowLoader + anchors.fill: parent + active: root.shadowEnabled && mainPathCorrectShape + asynchronous: false + sourceComponent: Item { + anchors.fill: parent - // Size to the bar's rectangular body, excluding gothic wing extensions - x: root.isRight ? root.wing : 0 - y: root.isBottom ? root.wing : 0 - width: axis.isVertical ? (parent.width - root.wing) : parent.width - height: axis.isVertical ? parent.height : (parent.height - root.wing) + layer.enabled: true + layer.smooth: true + layer.samples: 8 + layer.textureSize: Qt.size(Math.round(width * barWindow._dpr * 2), Math.round(height * barWindow._dpr * 2)) + layer.effect: MultiEffect { + shadowEnabled: true + shadowBlur: root.shadowBlur + shadowColor: root.shadowColor + shadowVerticalOffset: root.isTop ? root.shadowBlurPx * 0.5 : (root.isBottom ? -root.shadowBlurPx * 0.5 : 0) + shadowHorizontalOffset: root.isLeft ? root.shadowBlurPx * 0.5 : (root.isRight ? -root.shadowBlurPx * 0.5 : 0) + autoPaddingEnabled: true + } - shadowEnabled: root.shadowEnabled - level: root.hasPerBarOverride ? null : root.elevLevel - direction: root.effectiveShadowDirection - fallbackOffset: 4 - targetRadius: root.rt - targetColor: barWindow._bgColor + Shape { + anchors.fill: parent + preferredRendererType: Shape.CurveRenderer - shadowBlurPx: root.shadowBlurPx - shadowOffsetX: root.shadowOffsetX - shadowOffsetY: root.shadowOffsetY - shadowColor: root.shadowColor - blurMax: Theme.elevationBlurMax + ShapePath { + fillColor: barWindow._bgColor + strokeColor: "transparent" + strokeWidth: 0 + + PathSvg { + path: root.mainPath + } + } + } + } } Loader { diff --git a/quickshell/Modules/Notepad/NotepadTabs.qml b/quickshell/Modules/Notepad/NotepadTabs.qml index 05a21d18..6e2e6e24 100644 --- a/quickshell/Modules/Notepad/NotepadTabs.qml +++ b/quickshell/Modules/Notepad/NotepadTabs.qml @@ -10,10 +10,6 @@ Column { property var currentTab: NotepadStorageService.tabs.length > NotepadStorageService.currentTabIndex ? NotepadStorageService.tabs[NotepadStorageService.currentTabIndex] : null property bool contentLoaded: false - property int draggedIndex: -1 - property int dropTargetIndex: -1 - property bool suppressShiftAnimation: false - readonly property real tabItemSize: 128 + Theme.spacingXS signal tabSwitched(int tabIndex) signal tabClosed(int tabIndex) @@ -50,221 +46,92 @@ Column { Repeater { model: NotepadStorageService.tabs - delegate: Item { - id: delegateItem + delegate: Rectangle { required property int index required property var modelData readonly property bool isActive: NotepadStorageService.currentTabIndex === index readonly property bool isHovered: tabMouseArea.containsMouse && !closeMouseArea.containsMouse readonly property real tabWidth: 128 - property bool longPressing: false - property bool dragging: false - property point dragStartPos: Qt.point(0, 0) - property int targetIndex: -1 - property int originalIndex: -1 - property real dragAxisOffset: 0 - - Timer { - id: longPressTimer - interval: 200 - repeat: false - onTriggered: { - if (NotepadStorageService.tabs.length > 1) { - delegateItem.longPressing = true - } - } - } - - readonly property real shiftOffset: { - if (root.draggedIndex < 0) - return 0 - if (index === root.draggedIndex) - return 0 - var dragIdx = root.draggedIndex - var dropIdx = root.dropTargetIndex - var myIdx = index - var shiftAmount = root.tabItemSize - if (dropIdx < 0) - return 0 - if (dragIdx < dropIdx && myIdx > dragIdx && myIdx <= dropIdx) - return -shiftAmount - if (dragIdx > dropIdx && myIdx >= dropIdx && myIdx < dragIdx) - return shiftAmount - return 0 - } width: tabWidth height: 32 - z: dragging ? 100 : 0 - - transform: Translate { - x: shiftOffset - Behavior on x { - enabled: !root.suppressShiftAnimation - NumberAnimation { - duration: 150 - easing.type: Easing.OutCubic - } - } - } - - Item { - id: tabVisual - anchors.fill: parent - z: 1 - layer.enabled: dragging - layer.smooth: true - - transform: Translate { - x: dragging ? dragAxisOffset : 0 - } - - Rectangle { - id: tabRect - anchors.fill: parent - radius: Theme.cornerRadius - color: isActive ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryPressed, 0) - border.width: isActive || dragging ? 0 : 1 - border.color: dragging ? Theme.primary : Theme.outlineMedium - clip: true - - Row { - id: tabContent - anchors.fill: parent - anchors.leftMargin: Theme.spacingM - anchors.rightMargin: Theme.spacingM - spacing: Theme.spacingXS - - StyledText { - id: tabText - width: parent.width - (tabCloseButton.visible ? tabCloseButton.width + Theme.spacingXS : 0) - text: { - var prefix = "" - if (hasUnsavedChangesForTab(modelData)) { - prefix = "● " - } - return prefix + (modelData.title || "Untitled") - } - font.pixelSize: Theme.fontSizeSmall - color: isActive ? Theme.primary : Theme.surfaceText - font.weight: isActive ? Font.Medium : Font.Normal - elide: Text.ElideMiddle - maximumLineCount: 1 - wrapMode: Text.NoWrap - anchors.verticalCenter: parent.verticalCenter - } - - Rectangle { - id: tabCloseButton - width: 20 - height: 20 - radius: Theme.cornerRadius - color: closeMouseArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) - visible: NotepadStorageService.tabs.length > 1 - anchors.verticalCenter: parent.verticalCenter - - DankIcon { - name: "close" - size: 14 - color: Theme.surfaceTextMedium - anchors.centerIn: parent - } - - MouseArea { - id: closeMouseArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - z: 100 - - onClicked: root.tabClosed(index) - } - } - } - - Behavior on color { - ColorAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } - } - } + radius: Theme.cornerRadius + color: isActive ? Theme.primaryPressed : isHovered ? Theme.primaryHoverLight : Theme.withAlpha(Theme.primaryPressed, 0) + border.width: isActive ? 0 : 1 + border.color: Theme.outlineMedium + clip: true MouseArea { id: tabMouseArea anchors.fill: parent hoverEnabled: true - preventStealing: dragging || longPressing - cursorShape: dragging || longPressing ? Qt.ClosedHandCursor : Qt.PointingHandCursor + cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton - onPressed: mouse => { - if (mouse.button === Qt.LeftButton && NotepadStorageService.tabs.length > 1) { - delegateItem.dragStartPos = Qt.point(mouse.x, mouse.y) - longPressTimer.start() + onClicked: root.tabSwitched(index) + } + + Row { + id: tabContent + anchors.fill: parent + anchors.leftMargin: Theme.spacingM + anchors.rightMargin: Theme.spacingM + spacing: Theme.spacingXS + + StyledText { + id: tabText + width: parent.width - (tabCloseButton.visible ? tabCloseButton.width + Theme.spacingXS : 0) + text: { + var prefix = ""; + if (hasUnsavedChangesForTab(modelData)) { + prefix = "● "; + } + return prefix + (modelData.title || "Untitled"); } + font.pixelSize: Theme.fontSizeSmall + color: isActive ? Theme.primary : Theme.surfaceText + font.weight: isActive ? Font.Medium : Font.Normal + elide: Text.ElideMiddle + maximumLineCount: 1 + wrapMode: Text.NoWrap + anchors.verticalCenter: parent.verticalCenter } - onReleased: mouse => { - longPressTimer.stop() - var wasDragging = delegateItem.dragging - var didReorder = wasDragging && delegateItem.targetIndex >= 0 && delegateItem.targetIndex !== delegateItem.originalIndex + Rectangle { + id: tabCloseButton + width: 20 + height: 20 + radius: Theme.cornerRadius + color: closeMouseArea.containsMouse ? Theme.surfaceTextHover : Theme.withAlpha(Theme.surfaceTextHover, 0) + visible: NotepadStorageService.tabs.length > 1 + anchors.verticalCenter: parent.verticalCenter - if (didReorder) { - root.suppressShiftAnimation = true - NotepadStorageService.reorderTab(delegateItem.originalIndex, delegateItem.targetIndex) + DankIcon { + name: "close" + size: 14 + color: Theme.surfaceTextMedium + anchors.centerIn: parent } - delegateItem.longPressing = false - delegateItem.dragging = false - delegateItem.dragAxisOffset = 0 - delegateItem.targetIndex = -1 - delegateItem.originalIndex = -1 - root.draggedIndex = -1 - root.dropTargetIndex = -1 - if (didReorder) { - Qt.callLater(() => { - root.suppressShiftAnimation = false - }) - } + MouseArea { + id: closeMouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + z: 100 - if (wasDragging || mouse.button !== Qt.LeftButton) - return - root.tabSwitched(index) - } - - onPositionChanged: mouse => { - if (delegateItem.longPressing && !delegateItem.dragging) { - var distance = Math.sqrt(Math.pow(mouse.x - delegateItem.dragStartPos.x, 2) + Math.pow(mouse.y - delegateItem.dragStartPos.y, 2)) - if (distance > 5) { - delegateItem.dragging = true - delegateItem.targetIndex = index - delegateItem.originalIndex = index - root.draggedIndex = index - root.dropTargetIndex = index + onClicked: { + root.tabClosed(index); } } + } + } - if (!delegateItem.dragging) - return - - var axisOffset = mouse.x - delegateItem.dragStartPos.x - delegateItem.dragAxisOffset = axisOffset - - var itemSize = root.tabItemSize - var rawSlot = axisOffset / itemSize - var slotOffset = rawSlot >= 0 - ? Math.floor(rawSlot + 0.4) - : Math.ceil(rawSlot - 0.4) - var tabCount = NotepadStorageService.tabs.length - var newTargetIndex = Math.max(0, Math.min(tabCount - 1, delegateItem.originalIndex + slotOffset)) - - if (newTargetIndex !== delegateItem.targetIndex) { - delegateItem.targetIndex = newTargetIndex - root.dropTargetIndex = newTargetIndex - } + Behavior on color { + ColorAnimation { + duration: Theme.shortDuration + easing.type: Theme.standardEasing } } } diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml index 823106f1..b6d24fec 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml @@ -187,7 +187,7 @@ PanelWindow { readonly property real maxPopupShadowBlurPx: Math.max((Theme.elevationLevel3 && Theme.elevationLevel3.blurPx !== undefined) ? Theme.elevationLevel3.blurPx : 12, (Theme.elevationLevel4 && Theme.elevationLevel4.blurPx !== undefined) ? Theme.elevationLevel4.blurPx : 16) readonly property real maxPopupShadowOffsetXPx: Math.max(Math.abs(Theme.elevationOffsetX(Theme.elevationLevel3)), Math.abs(Theme.elevationOffsetX(Theme.elevationLevel4))) readonly property real maxPopupShadowOffsetYPx: Math.max(Math.abs(Theme.elevationOffsetY(Theme.elevationLevel3, 6)), Math.abs(Theme.elevationOffsetY(Theme.elevationLevel4, 8))) - readonly property real windowShadowPad: Theme.elevationEnabled && SettingsData.notificationPopupShadowEnabled ? Theme.snap(Math.max(16, maxPopupShadowBlurPx + Math.max(maxPopupShadowOffsetXPx, maxPopupShadowOffsetYPx) + 8), dpr) : 0 + readonly property real windowShadowPad: SettingsData.notificationPopupShadowEnabled ? Theme.snap(Math.max(16, maxPopupShadowBlurPx + Math.max(maxPopupShadowOffsetXPx, maxPopupShadowOffsetYPx) + 8), dpr) : 0 anchors.top: true anchors.left: true @@ -352,7 +352,7 @@ PanelWindow { readonly property bool swipeActive: swipeDragHandler.active property bool swipeDismissing: false - readonly property bool shadowsAllowed: Theme.elevationEnabled && SettingsData.notificationPopupShadowEnabled + readonly property bool shadowsAllowed: SettingsData.notificationPopupShadowEnabled readonly property var elevLevel: cardHoverHandler.hovered ? Theme.elevationLevel4 : Theme.elevationLevel3 readonly property real cardInset: Theme.snap(4, win.dpr) readonly property real shadowRenderPadding: shadowsAllowed ? Theme.snap(Math.max(16, shadowBlurPx + Math.max(Math.abs(shadowOffsetX), Math.abs(shadowOffsetY)) + 8), win.dpr) : 0 diff --git a/quickshell/Modules/Settings/DankBarTab.qml b/quickshell/Modules/Settings/DankBarTab.qml index a4bd87d1..cab3f9b9 100644 --- a/quickshell/Modules/Settings/DankBarTab.qml +++ b/quickshell/Modules/Settings/DankBarTab.qml @@ -1049,50 +1049,20 @@ Item { SettingsCard { id: shadowCard iconName: "layers" - title: I18n.tr("Shadow Override", "bar shadow settings card") + title: I18n.tr("Shadow", "bar shadow settings card") settingKey: "barShadow" collapsible: true - expanded: true + expanded: false visible: selectedBarConfig?.enabled readonly property bool shadowActive: (selectedBarConfig?.shadowIntensity ?? 0) > 0 - readonly property bool isCustomColor: (selectedBarConfig?.shadowColorMode ?? "default") === "custom" - readonly property string directionSource: selectedBarConfig?.shadowDirectionMode ?? "inherit" - - StyledText { - width: parent.width - text: I18n.tr("Enable a custom override below to set per-bar shadow intensity, opacity, and color.") - font.pixelSize: Theme.fontSizeSmall - color: Theme.surfaceVariantText - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignLeft - } - - SettingsToggleRow { - text: I18n.tr("Custom Shadow Override") - description: I18n.tr("Override the global shadow with per-bar settings") - checked: shadowCard.shadowActive - onToggled: checked => { - if (checked) { - SettingsData.updateBarConfig(selectedBarId, { - shadowIntensity: 12, - shadowOpacity: 60 - }); - } else { - SettingsData.updateBarConfig(selectedBarId, { - shadowIntensity: 0 - }); - } - } - } + readonly property bool isCustomColor: (selectedBarConfig?.shadowColorMode ?? "text") === "custom" SettingsSliderRow { - visible: shadowCard.shadowActive text: I18n.tr("Intensity", "shadow intensity slider") minimum: 0 maximum: 100 - unit: "px" - defaultValue: 12 + unit: "%" value: selectedBarConfig?.shadowIntensity ?? 0 onSliderValueChanged: newValue => SettingsData.updateBarConfig(selectedBarId, { shadowIntensity: newValue @@ -1112,78 +1082,6 @@ Item { }) } - SettingsDropdownRow { - visible: shadowCard.shadowActive - text: I18n.tr("Direction Source", "bar shadow direction source") - description: I18n.tr("Choose how this bar resolves shadow direction") - settingKey: "barShadowDirectionSource" - options: [I18n.tr("Inherit Global (Default)", "bar shadow direction source option"), I18n.tr("Auto (Bar-aware)", "bar shadow direction source option"), I18n.tr("Manual", "bar shadow direction source option")] - currentValue: { - switch (shadowCard.directionSource) { - case "autoBar": - return I18n.tr("Auto (Bar-aware)", "bar shadow direction source option"); - case "manual": - return I18n.tr("Manual", "bar shadow direction source option"); - default: - return I18n.tr("Inherit Global (Default)", "bar shadow direction source option"); - } - } - onValueChanged: value => { - if (value === I18n.tr("Auto (Bar-aware)", "bar shadow direction source option")) { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirectionMode: "autoBar" - }); - } else if (value === I18n.tr("Manual", "bar shadow direction source option")) { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirectionMode: "manual" - }); - } else { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirectionMode: "inherit" - }); - } - } - } - - SettingsDropdownRow { - visible: shadowCard.shadowActive && shadowCard.directionSource === "manual" - text: I18n.tr("Manual Direction", "bar manual shadow direction") - description: I18n.tr("Use a fixed shadow direction for this bar") - settingKey: "barShadowDirectionManual" - options: [I18n.tr("Top", "shadow direction option"), I18n.tr("Top Left", "shadow direction option"), I18n.tr("Top Right", "shadow direction option"), I18n.tr("Bottom", "shadow direction option")] - currentValue: { - switch (selectedBarConfig?.shadowDirection) { - case "topLeft": - return I18n.tr("Top Left", "shadow direction option"); - case "topRight": - return I18n.tr("Top Right", "shadow direction option"); - case "bottom": - return I18n.tr("Bottom", "shadow direction option"); - default: - return I18n.tr("Top", "shadow direction option"); - } - } - onValueChanged: value => { - if (value === I18n.tr("Top Left", "shadow direction option")) { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirection: "topLeft" - }); - } else if (value === I18n.tr("Top Right", "shadow direction option")) { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirection: "topRight" - }); - } else if (value === I18n.tr("Bottom", "shadow direction option")) { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirection: "bottom" - }); - } else { - SettingsData.updateBarConfig(selectedBarId, { - shadowDirection: "top" - }); - } - } - } - Column { visible: shadowCard.shadowActive width: parent.width @@ -1208,10 +1106,10 @@ Item { buttonPadding: parent.width < 420 ? Theme.spacingXS : Theme.spacingS minButtonWidth: parent.width < 420 ? 36 : 56 textSize: parent.width < 420 ? Theme.fontSizeSmall : Theme.fontSizeMedium - model: [I18n.tr("Default (Black)"), I18n.tr("Surface", "shadow color option"), I18n.tr("Primary"), I18n.tr("Secondary"), I18n.tr("Custom")] + model: [I18n.tr("Text", "shadow color option"), I18n.tr("Surface", "shadow color option"), I18n.tr("Primary"), I18n.tr("Secondary"), I18n.tr("Custom")] selectionMode: "single" currentIndex: { - switch (selectedBarConfig?.shadowColorMode || "default") { + switch (selectedBarConfig?.shadowColorMode || "text") { case "surface": return 1; case "primary": @@ -1227,7 +1125,7 @@ Item { onSelectionChanged: (index, selected) => { if (!selected) return; - let mode = "default"; + let mode = "text"; switch (index) { case 1: mode = "surface"; diff --git a/quickshell/Modules/Settings/ThemeColorsTab.qml b/quickshell/Modules/Settings/ThemeColorsTab.qml index 6ffb4512..e0041159 100644 --- a/quickshell/Modules/Settings/ThemeColorsTab.qml +++ b/quickshell/Modules/Settings/ThemeColorsTab.qml @@ -1640,6 +1640,7 @@ Item { description: I18n.tr("Material inspired shadows and elevation on modals, popouts, and dialogs") checked: SettingsData.m3ElevationEnabled ?? true onToggled: checked => SettingsData.set("m3ElevationEnabled", checked) + visible: false } SettingsSliderRow { diff --git a/quickshell/Services/ChangelogService.qml b/quickshell/Services/ChangelogService.qml index 562a513a..d19d182a 100644 --- a/quickshell/Services/ChangelogService.qml +++ b/quickshell/Services/ChangelogService.qml @@ -11,7 +11,7 @@ Singleton { id: root readonly property string currentVersion: "1.4" - readonly property bool changelogEnabled: false + readonly property bool changelogEnabled: true readonly property string configDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation)) + "/DankMaterialShell" readonly property string changelogMarkerPath: configDir + "/.changelog-" + currentVersion diff --git a/quickshell/Services/NotepadStorageService.qml b/quickshell/Services/NotepadStorageService.qml index 3a6257a4..16690d5e 100644 --- a/quickshell/Services/NotepadStorageService.qml +++ b/quickshell/Services/NotepadStorageService.qml @@ -260,28 +260,6 @@ Singleton { saveMetadata() } - function reorderTab(fromIndex, toIndex) { - if (fromIndex < 0 || fromIndex >= tabs.length || toIndex < 0 || toIndex >= tabs.length) - return - if (fromIndex === toIndex) - return - - var newTabs = tabs.slice() - var moved = newTabs.splice(fromIndex, 1)[0] - newTabs.splice(toIndex, 0, moved) - tabs = newTabs - - if (currentTabIndex === fromIndex) { - currentTabIndex = toIndex - } else if (fromIndex < currentTabIndex && toIndex >= currentTabIndex) { - currentTabIndex-- - } else if (fromIndex > currentTabIndex && toIndex <= currentTabIndex) { - currentTabIndex++ - } - - saveMetadata() - } - function saveTabAs(tabIndex, userPath) { if (tabIndex < 0 || tabIndex >= tabs.length) return diff --git a/quickshell/VERSION b/quickshell/VERSION index 4233a094..0d0c52f8 100644 --- a/quickshell/VERSION +++ b/quickshell/VERSION @@ -1 +1 @@ -v1.5-beta +v1.4.0