diff --git a/Assets/settings-default.json b/Assets/settings-default.json index fdc6f7f8a..110989d5e 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -246,7 +246,6 @@ "enabled": true, "displayMode": "auto_hide", "backgroundOpacity": 1, - "radiusRatio": 0.1, "floatingRatio": 1, "size": 1, "onlySameOutput": true, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 29cc6dd6c..26aa036d4 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -433,7 +433,6 @@ Singleton { property bool enabled: true property string displayMode: "auto_hide" // "always_visible", "auto_hide", "exclusive" property real backgroundOpacity: 1.0 - property real radiusRatio: 0.1 property real floatingRatio: 1.0 property real size: 1 property bool onlySameOutput: true diff --git a/Modules/Bar/Extras/BarPillHorizontal.qml b/Modules/Bar/Extras/BarPillHorizontal.qml index 9adb26294..fce99dd84 100644 --- a/Modules/Bar/Extras/BarPillHorizontal.qml +++ b/Modules/Bar/Extras/BarPillHorizontal.qml @@ -85,12 +85,10 @@ Item { id: pillBackground width: collapseToIcon ? pillHeight : root.width height: pillHeight - radius: halfPillHeight + radius: Style.radiusM color: root.bgColor anchors.verticalCenter: parent.verticalCenter - readonly property int halfPillHeight: Math.round(pillHeight * 0.5) - Behavior on color { ColorAnimation { duration: Style.animationFast @@ -111,12 +109,10 @@ Item { opacity: revealed ? Style.opacityFull : Style.opacityNone color: Color.transparent // Make pill background transparent to avoid double opacity - readonly property int halfPillHeight: Math.round(pillHeight * 0.5) - - topLeftRadius: oppositeDirection ? 0 : halfPillHeight - bottomLeftRadius: oppositeDirection ? 0 : halfPillHeight - topRightRadius: oppositeDirection ? halfPillHeight : 0 - bottomRightRadius: oppositeDirection ? halfPillHeight : 0 + topLeftRadius: oppositeDirection ? 0 : Style.radiusM + bottomLeftRadius: oppositeDirection ? 0 : Style.radiusM + topRightRadius: oppositeDirection ? Style.radiusM : 0 + bottomRightRadius: oppositeDirection ? Style.radiusM : 0 anchors.verticalCenter: parent.verticalCenter NText { @@ -161,7 +157,7 @@ Item { id: iconCircle width: pillHeight height: pillHeight - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.transparent // Make icon background transparent to avoid double opacity anchors.verticalCenter: parent.verticalCenter diff --git a/Modules/Bar/Extras/BarPillVertical.qml b/Modules/Bar/Extras/BarPillVertical.qml index 23c560085..6bb131b85 100644 --- a/Modules/Bar/Extras/BarPillVertical.qml +++ b/Modules/Bar/Extras/BarPillVertical.qml @@ -41,7 +41,6 @@ Item { // Sizing logic for vertical bars readonly property int buttonSize: Style.capsuleHeight - readonly property int halfButtonSize: Math.round(buttonSize * 0.5) readonly property int pillHeight: buttonSize readonly property int pillOverlap: Math.round(buttonSize * 0.5) readonly property int maxPillWidth: rotateText ? Math.max(buttonSize, Math.round(textItem.implicitHeight + Style.marginM * 2)) : buttonSize @@ -94,7 +93,7 @@ Item { id: pillBackground width: buttonSize height: collapseToIcon ? buttonSize : (revealed ? (buttonSize + maxPillHeight - pillOverlap) : buttonSize) - radius: halfButtonSize + radius: Style.radiusM color: root.bgColor Behavior on color { @@ -119,10 +118,10 @@ Item { color: Color.transparent // Make pill background transparent to avoid double opacity // Radius logic for vertical expansion - rounded on the side that connects to icon - topLeftRadius: openUpward ? halfButtonSize : 0 - bottomLeftRadius: openDownward ? halfButtonSize : 0 - topRightRadius: openUpward ? halfButtonSize : 0 - bottomRightRadius: openDownward ? halfButtonSize : 0 + topLeftRadius: openUpward ? Style.radiusM : 0 + bottomLeftRadius: openDownward ? Style.radiusM : 0 + topRightRadius: openUpward ? Style.radiusM : 0 + bottomRightRadius: openDownward ? Style.radiusM : 0 anchors.horizontalCenter: parent.horizontalCenter @@ -174,7 +173,7 @@ Item { id: iconCircle width: buttonSize height: buttonSize - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.transparent // Make icon background transparent to avoid double opacity // Icon positioning based on direction diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 78ff485bb..f700c2c33 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -197,7 +197,7 @@ Item { anchors.verticalCenter: parent.verticalCenter width: isVerticalBar ? ((!hasFocusedWindow) && hideMode === "hidden" ? 0 : calculatedVerticalDimension()) : ((!hasFocusedWindow) && (hideMode === "hidden") ? 0 : dynamicWidth) height: isVerticalBar ? ((!hasFocusedWindow) && hideMode === "hidden" ? 0 : calculatedVerticalDimension()) : Style.capsuleHeight - radius: isVerticalBar ? width / 2 : Style.radiusM + radius: Style.radiusM color: Style.capsuleColor // Smooth width transition diff --git a/Modules/Bar/Widgets/MediaMini.qml b/Modules/Bar/Widgets/MediaMini.qml index c99fb2d71..4788a87b4 100644 --- a/Modules/Bar/Widgets/MediaMini.qml +++ b/Modules/Bar/Widgets/MediaMini.qml @@ -230,7 +230,7 @@ Item { anchors.verticalCenter: parent.verticalCenter width: isVerticalBar ? ((shouldHideIdle || isEmptyForHideMode) ? 0 : calculatedVerticalDimension()) : ((shouldHideIdle || isEmptyForHideMode) ? 0 : dynamicWidth) height: isVerticalBar ? ((shouldHideIdle || isEmptyForHideMode) ? 0 : calculatedVerticalDimension()) : Style.capsuleHeight - radius: isVerticalBar ? width / 2 : Style.radiusM + radius: Style.radiusM color: Style.capsuleColor // Smooth width transition @@ -416,7 +416,7 @@ Item { id: trackArt anchors.fill: parent anchors.margins: showProgressRing ? 0 : -1 * scaling // Add negative margin to make album art larger when no progress ring - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) visible: showAlbumArt && hasActivePlayer imagePath: MediaService.trackArtUrl fallbackIcon: MediaService.isPlaying ? "media-pause" : "media-play" @@ -658,7 +658,7 @@ Item { NImageRounded { anchors.fill: parent visible: showAlbumArt && hasActivePlayer - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) imagePath: MediaService.trackArtUrl fallbackIcon: MediaService.isPlaying ? "media-pause" : "media-play" fallbackIconSize: 12 diff --git a/Modules/Bar/Widgets/NotificationHistory.qml b/Modules/Bar/Widgets/NotificationHistory.qml index 29f74b3a9..81c47f6d9 100644 --- a/Modules/Bar/Widgets/NotificationHistory.qml +++ b/Modules/Bar/Widgets/NotificationHistory.qml @@ -120,7 +120,7 @@ NIconButton { readonly property int count: computeUnreadCount() height: 8 width: height - radius: height / 2 + radius: Style.radiusXS color: Color.mError border.color: Color.mSurface border.width: Style.borderS diff --git a/Modules/Bar/Widgets/SystemMonitor.qml b/Modules/Bar/Widgets/SystemMonitor.qml index cc90e4319..8195f41be 100644 --- a/Modules/Bar/Widgets/SystemMonitor.qml +++ b/Modules/Bar/Widgets/SystemMonitor.qml @@ -165,7 +165,7 @@ Rectangle { width: isVertical ? Math.max(0, indicatorWidth - Style.marginS * 2) : Math.max(0, indicatorWidth + Style.marginXS * 2) height: isVertical ? Math.max(0, Style.capsuleHeight + Style.marginXS * 2) : pillHeight - radius: Math.min(width, height) / 2 + radius: Style.radiusM // Hide the rectangular indicator when the bar is vertical; keep it available for horizontal layout visible: !root.isVertical color: critical ? criticalColor : warningColor diff --git a/Modules/Bar/Widgets/Taskbar.qml b/Modules/Bar/Widgets/Taskbar.qml index 60f4e0e72..13e3c01fb 100644 --- a/Modules/Bar/Widgets/Taskbar.qml +++ b/Modules/Bar/Widgets/Taskbar.qml @@ -199,7 +199,7 @@ Rectangle { width: 4 height: 4 color: modelData.isFocused ? Color.mPrimary : Color.transparent - radius: width * 0.5 + radius: Math.min(Style.radiusXXS, width / 2) } } diff --git a/Modules/Bar/Widgets/TaskbarGrouped.qml b/Modules/Bar/Widgets/TaskbarGrouped.qml index df708de7e..fe8c3217c 100644 --- a/Modules/Bar/Widgets/TaskbarGrouped.qml +++ b/Modules/Bar/Widgets/TaskbarGrouped.qml @@ -357,7 +357,7 @@ Item { width: model.isFocused ? 4 : 0 height: model.isFocused ? 4 : 0 color: model.isFocused ? Color.mPrimary : Color.transparent - radius: width * 0.5 + radius: Math.min(Style.radiusXXS, width / 2) } layer.effect: ShaderEffect { @@ -437,7 +437,7 @@ Item { id: workspaceNumberBackground anchors.fill: parent - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: { if (workspaceModel.isFocused) diff --git a/Modules/Bar/Widgets/Workspace.qml b/Modules/Bar/Widgets/Workspace.qml index 8317c521c..b54fe46c2 100644 --- a/Modules/Bar/Widgets/Workspace.qml +++ b/Modules/Bar/Widgets/Workspace.qml @@ -378,7 +378,7 @@ Item { } } - radius: width * 0.5 + radius: Style.radiusM color: { if (model.isFocused) return Color.mPrimary; @@ -527,7 +527,7 @@ Item { } } - radius: width * 0.5 + radius: Style.radiusM color: { if (model.isFocused) return Color.mPrimary; diff --git a/Modules/Cards/CalendarMonthCard.qml b/Modules/Cards/CalendarMonthCard.qml index d32f1b28f..73066c1ea 100644 --- a/Modules/Cards/CalendarMonthCard.qml +++ b/Modules/Cards/CalendarMonthCard.qml @@ -340,7 +340,7 @@ NBox { Rectangle { width: 4 height: width - radius: width / 2 + radius: Style.radiusXXS color: parent.parent.parent.parent.parent.getEventColor(modelData, modelData.today) } } diff --git a/Modules/Cards/ProfileCard.qml b/Modules/Cards/ProfileCard.qml index 7a4833479..805c7770e 100644 --- a/Modules/Cards/ProfileCard.qml +++ b/Modules/Cards/ProfileCard.qml @@ -27,7 +27,7 @@ NBox { NImageRounded { Layout.preferredWidth: Math.round(Style.baseWidgetSize * 1.25 * Style.uiScaleRatio) Layout.preferredHeight: Math.round(Style.baseWidgetSize * 1.25 * Style.uiScaleRatio) - radius: width * 0.5 + radius: Math.min(Style.radiusL, Layout.preferredWidth / 2) imagePath: Settings.preprocessPath(Settings.data.general.avatarImage) fallbackIcon: "person" borderColor: Color.mPrimary diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index e787369d7..da2840ca1 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -299,7 +299,7 @@ Loader { height: Math.round(iconSize * 1.5) color: Qt.alpha(Color.mSurface, Settings.data.dock.backgroundOpacity) anchors.centerIn: parent - radius: height * 0.5 * Settings.data.dock.radiusRatio + radius: height * 0.5 * Settings.data.general.radiusRatio border.width: Style.borderS border.color: Qt.alpha(Color.mOutline, Settings.data.dock.backgroundOpacity) diff --git a/Modules/LockScreen/LockScreen.qml b/Modules/LockScreen/LockScreen.qml index f2d30b580..a344b80ab 100644 --- a/Modules/LockScreen/LockScreen.qml +++ b/Modules/LockScreen/LockScreen.qml @@ -311,7 +311,7 @@ Loader { Layout.preferredWidth: 70 Layout.preferredHeight: 70 Layout.alignment: Qt.AlignVCenter - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.transparent Rectangle { @@ -340,7 +340,7 @@ Loader { anchors.centerIn: parent width: 66 height: 66 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) imagePath: Settings.preprocessPath(Settings.data.general.avatarImage) fallbackIcon: "person" @@ -610,7 +610,7 @@ Loader { // Expand to take remaining space when weather is hidden Layout.fillWidth: !(Settings.data.location.weatherEnabled && LocationService.data.weather !== null) Layout.preferredHeight: 50 - radius: 25 + radius: Style.radiusL color: Color.transparent clip: true visible: MediaService.currentPlayer && MediaService.canPlay @@ -663,14 +663,14 @@ Loader { Rectangle { Layout.preferredWidth: 34 Layout.preferredHeight: 34 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.transparent clip: true NImageRounded { anchors.fill: parent anchors.margins: 2 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) imagePath: MediaService.trackArtUrl fallbackIcon: "disc" fallbackIconSize: Style.fontSizeM @@ -905,7 +905,7 @@ Loader { Rectangle { Layout.fillWidth: true Layout.preferredHeight: 48 - radius: 24 + radius: Style.radiusL color: Color.mSurface border.color: passwordInput.activeFocus ? Color.mPrimary : Qt.alpha(Color.mOutline, 0.3) border.width: passwordInput.activeFocus ? 2 : 1 @@ -1040,7 +1040,7 @@ Loader { anchors.verticalCenter: parent.verticalCenter width: 36 height: 36 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: eyeButtonArea.containsMouse ? Qt.alpha(Color.mOnSurface, 0.1) : "transparent" visible: passwordInput.text.length > 0 enabled: !lockContext.unlockInProgress @@ -1076,7 +1076,7 @@ Loader { anchors.verticalCenter: parent.verticalCenter width: 36 height: 36 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: submitButtonArea.containsMouse ? Color.mPrimary : Qt.alpha(Color.mPrimary, 0.8) border.color: Color.mPrimary border.width: 1 @@ -1115,261 +1115,112 @@ Loader { RowLayout { Layout.fillWidth: true Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 - spacing: 10 + spacing: 0 Item { Layout.preferredWidth: Style.marginM } - Rectangle { + NButton { Layout.fillWidth: true - Layout.minimumWidth: buttonRowTextMeasurer.minButtonWidth Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 - radius: Settings.data.general.compactLockScreen ? 18 : 24 - color: logoutButtonArea.containsMouse ? Color.mHover : "transparent" - border.color: Color.mOutline - border.width: 1 - - RowLayout { - anchors.centerIn: parent - spacing: 6 - - NIcon { - icon: "logout" - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL - color: logoutButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - } - - NText { - text: I18n.tr("session-menu.logout") - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM - color: logoutButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - font.weight: Font.Medium - } - } - - MouseArea { - id: logoutButtonArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: CompositorService.logout() - } - - Behavior on color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } - - Behavior on border.color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } + icon: "logout" + text: I18n.tr("session-menu.logout") + outlined: true + backgroundColor: Color.mOnSurfaceVariant + textColor: Color.mOnSurfaceVariant + hoverColor: Color.mHover + fontSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM + iconSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL + fontWeight: Style.fontWeightMedium + horizontalAlignment: Qt.AlignLeft + buttonRadius: Style.radiusL + onClicked: CompositorService.logout() } - Rectangle { - Layout.fillWidth: true - Layout.minimumWidth: buttonRowTextMeasurer.minButtonWidth - Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 - radius: Settings.data.general.compactLockScreen ? 18 : 24 - color: suspendButtonArea.containsMouse ? Color.mHover : "transparent" - border.color: Color.mOutline - border.width: 1 - - RowLayout { - anchors.centerIn: parent - spacing: 6 - - NIcon { - icon: "suspend" - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL - color: suspendButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - } - - NText { - text: I18n.tr("session-menu.suspend") - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM - color: suspendButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - font.weight: Font.Medium - } - } - - MouseArea { - id: suspendButtonArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: CompositorService.suspend() - } - - Behavior on color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } - - Behavior on border.color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } + Item { + Layout.preferredWidth: 10 } - Rectangle { + NButton { Layout.fillWidth: true - Layout.minimumWidth: buttonRowTextMeasurer.minButtonWidth Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 - radius: Settings.data.general.compactLockScreen ? 18 : 24 - color: hibernateButtonArea.containsMouse ? Color.mHover : "transparent" - border.color: Color.mOutline - border.width: 1 + icon: "suspend" + text: I18n.tr("session-menu.suspend") + outlined: true + backgroundColor: Color.mOnSurfaceVariant + textColor: Color.mOnSurfaceVariant + hoverColor: Color.mHover + fontSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM + iconSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL + fontWeight: Style.fontWeightMedium + horizontalAlignment: Qt.AlignLeft + buttonRadius: Style.radiusL + onClicked: CompositorService.suspend() + } + + Item { + Layout.preferredWidth: 10 + } + + NButton { + Layout.fillWidth: true + Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 + icon: "hibernate" + text: I18n.tr("session-menu.hibernate") + outlined: true + backgroundColor: Color.mOnSurfaceVariant + textColor: Color.mOnSurfaceVariant + hoverColor: Color.mHover + fontSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM + iconSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL + fontWeight: Style.fontWeightMedium + horizontalAlignment: Qt.AlignLeft + buttonRadius: Style.radiusL visible: Settings.data.general.showHibernateOnLockScreen - - RowLayout { - anchors.centerIn: parent - spacing: 6 - - NIcon { - icon: "hibernate" - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL - color: hibernateButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - } - - NText { - text: I18n.tr("session-menu.hibernate") - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM - color: hibernateButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - font.weight: Font.Medium - } - } - - MouseArea { - id: hibernateButtonArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: CompositorService.hibernate() - } - - Behavior on color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } - - Behavior on border.color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } + onClicked: CompositorService.hibernate() } - Rectangle { - Layout.fillWidth: true - Layout.minimumWidth: buttonRowTextMeasurer.minButtonWidth - Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 - radius: Settings.data.general.compactLockScreen ? 18 : 24 - color: rebootButtonArea.containsMouse ? Color.mHover : "transparent" - border.color: Color.mOutline - border.width: 1 - - RowLayout { - anchors.centerIn: parent - spacing: 6 - - NIcon { - icon: "reboot" - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL - color: rebootButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - } - - NText { - text: I18n.tr("session-menu.reboot") - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM - color: rebootButtonArea.containsMouse ? Color.mOnHover : Color.mOnSurfaceVariant - font.weight: Font.Medium - } - } - - MouseArea { - id: rebootButtonArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: CompositorService.reboot() - } - - Behavior on color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } - - Behavior on border.color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } + Item { + Layout.preferredWidth: 10 } - Rectangle { + NButton { Layout.fillWidth: true - Layout.minimumWidth: buttonRowTextMeasurer.minButtonWidth Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 - radius: Settings.data.general.compactLockScreen ? 18 : 24 - color: shutdownButtonArea.containsMouse ? Color.mError : "transparent" - border.color: shutdownButtonArea.containsMouse ? Color.mError : Color.mOutline - border.width: 1 + icon: "reboot" + text: I18n.tr("session-menu.reboot") + outlined: true + backgroundColor: Color.mOnSurfaceVariant + textColor: Color.mOnSurfaceVariant + hoverColor: Color.mHover + fontSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM + iconSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL + fontWeight: Style.fontWeightMedium + horizontalAlignment: Qt.AlignLeft + buttonRadius: Style.radiusL + onClicked: CompositorService.reboot() + } - RowLayout { - anchors.centerIn: parent - spacing: 6 + Item { + Layout.preferredWidth: 10 + } - NIcon { - icon: "shutdown" - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL - color: shutdownButtonArea.containsMouse ? Color.mOnError : Color.mOnSurfaceVariant - } - - NText { - text: I18n.tr("session-menu.shutdown") - color: shutdownButtonArea.containsMouse ? Color.mOnError : Color.mOnSurfaceVariant - pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM - font.weight: Font.Medium - } - } - - MouseArea { - id: shutdownButtonArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: CompositorService.shutdown() - } - - Behavior on color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } - - Behavior on border.color { - ColorAnimation { - duration: 200 - easing.type: Easing.OutCubic - } - } + NButton { + Layout.fillWidth: true + Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48 + icon: "shutdown" + text: I18n.tr("session-menu.shutdown") + outlined: true + backgroundColor: Color.mError + textColor: Color.mOnSurfaceVariant + hoverColor: Color.mError + fontSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM + iconSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL + fontWeight: Style.fontWeightMedium + horizontalAlignment: Qt.AlignLeft + buttonRadius: Style.radiusL + onClicked: CompositorService.shutdown() } Item { diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index ca47a6e92..aa1c7ab02 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -402,7 +402,7 @@ Variants { Layout.preferredWidth: Math.round(40 * Style.uiScaleRatio) Layout.preferredHeight: Math.round(40 * Style.uiScaleRatio) Layout.alignment: Qt.AlignVCenter - radius: width * 0.5 + radius: Math.min(Style.radiusL, Layout.preferredWidth / 2) imagePath: model.originalImage || "" borderColor: Color.transparent borderWidth: 0 diff --git a/Modules/Panels/Battery/BatteryPanel.qml b/Modules/Panels/Battery/BatteryPanel.qml index af774c1fd..976fd94eb 100644 --- a/Modules/Panels/Battery/BatteryPanel.qml +++ b/Modules/Panels/Battery/BatteryPanel.qml @@ -240,7 +240,7 @@ SmartPanel { Rectangle { Layout.fillWidth: true height: Math.round(8 * Style.uiScaleRatio) - radius: height / 2 + radius: Math.min(Style.radiusL, height / 2) color: Color.mSurfaceVariant Rectangle { diff --git a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml index 31325d0ee..423353a48 100644 --- a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml +++ b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml @@ -321,7 +321,7 @@ SmartPanel { anchors.verticalCenter: parent.verticalCenter width: Math.round(40 * Style.uiScaleRatio) height: Math.round(40 * Style.uiScaleRatio) - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) imagePath: model.cachedImage || model.originalImage || "" borderColor: Color.transparent borderWidth: 0 diff --git a/Modules/Panels/SessionMenu/SessionMenu.qml b/Modules/Panels/SessionMenu/SessionMenu.qml index 4b5f9cbdf..5ef5f1f1d 100644 --- a/Modules/Panels/SessionMenu/SessionMenu.qml +++ b/Modules/Panels/SessionMenu/SessionMenu.qml @@ -523,7 +523,7 @@ SmartPanel { anchors.verticalCenter: parent.verticalCenter width: 20 height: 20 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.mPrimary visible: buttonRoot.pending diff --git a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml index 9f6f6fcf1..b3975bf24 100644 --- a/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml +++ b/Modules/Panels/Settings/Bar/WidgetSettings/ControlCenterSettings.qml @@ -92,7 +92,7 @@ ColumnLayout { Layout.preferredWidth: Style.fontSizeXL * 2 Layout.preferredHeight: Style.fontSizeXL * 2 Layout.alignment: Qt.AlignVCenter - radius: width * 0.5 + radius: Math.min(Style.radiusL, Layout.preferredWidth / 2) imagePath: valueCustomIconPath visible: valueCustomIconPath !== "" && !valueUseDistroLogo } diff --git a/Modules/Panels/Settings/Tabs/AboutTab.qml b/Modules/Panels/Settings/Tabs/AboutTab.qml index 3b14a4aec..7abb57e94 100644 --- a/Modules/Panels/Settings/Tabs/AboutTab.qml +++ b/Modules/Panels/Settings/Tabs/AboutTab.qml @@ -383,7 +383,7 @@ ColumnLayout { visible: wrapper.isRounded anchors.fill: parent color: Color.transparent - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) border.width: Style.borderM border.color: Color.mPrimary } diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml b/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml index 30c48c983..8767b5217 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml @@ -477,7 +477,7 @@ ColumnLayout { anchors.topMargin: -3 width: 20 height: 20 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.mSecondary border.width: Style.borderS border.color: Color.mOnSecondary diff --git a/Modules/Panels/Settings/Tabs/DockTab.qml b/Modules/Panels/Settings/Tabs/DockTab.qml index 5e88fa300..5ca75804d 100644 --- a/Modules/Panels/Settings/Tabs/DockTab.qml +++ b/Modules/Panels/Settings/Tabs/DockTab.qml @@ -81,25 +81,6 @@ ColumnLayout { } } - ColumnLayout { - visible: Settings.data.dock.enabled - spacing: Style.marginXXS - Layout.fillWidth: true - NLabel { - label: I18n.tr("settings.dock.appearance.border-radius.label") - description: I18n.tr("settings.dock.appearance.border-radius.description") - } - NValueSlider { - Layout.fillWidth: true - from: 0 - to: 1 - stepSize: 0.01 - value: Settings.data.dock.radiusRatio - onMoved: value => Settings.data.dock.radiusRatio = value - text: Math.floor(Settings.data.dock.radiusRatio * 100) + "%" - } - } - ColumnLayout { visible: Settings.data.dock.enabled spacing: Style.marginXXS diff --git a/Modules/Panels/Settings/Tabs/GeneralTab.qml b/Modules/Panels/Settings/Tabs/GeneralTab.qml index 261af6adc..5c9370db1 100644 --- a/Modules/Panels/Settings/Tabs/GeneralTab.qml +++ b/Modules/Panels/Settings/Tabs/GeneralTab.qml @@ -24,7 +24,7 @@ ColumnLayout { NImageRounded { Layout.preferredWidth: 88 * Style.uiScaleRatio Layout.preferredHeight: width - radius: width * 0.5 + radius: Math.min(Style.radiusL, Layout.preferredWidth / 2) imagePath: Settings.preprocessPath(Settings.data.general.avatarImage) fallbackIcon: "person" borderColor: Color.mPrimary diff --git a/Modules/Panels/SetupWizard/SetupCustomizeStep.qml b/Modules/Panels/SetupWizard/SetupCustomizeStep.qml index f3447eb83..2b2e55be8 100644 --- a/Modules/Panels/SetupWizard/SetupCustomizeStep.qml +++ b/Modules/Panels/SetupWizard/SetupCustomizeStep.qml @@ -257,7 +257,7 @@ ColumnLayout { } ] delegate: Rectangle { - radius: 16 + radius: Style.radiusM border.width: Style.borderS Layout.preferredHeight: 32 Layout.preferredWidth: Math.max(90, densityText.implicitWidth + Style.marginXL * 2) diff --git a/Widgets/NButton.qml b/Widgets/NButton.qml index e98502421..7de9c1ef6 100644 --- a/Widgets/NButton.qml +++ b/Widgets/NButton.qml @@ -20,6 +20,7 @@ Rectangle { property real iconSize: Style.fontSizeL property bool outlined: false property int horizontalAlignment: Qt.AlignHCenter + property real buttonRadius: Style.radiusS // Signals signal clicked @@ -36,7 +37,7 @@ Rectangle { implicitHeight: Math.max(Style.baseWidgetSize, contentRow.implicitHeight + (Style.marginM)) // Appearance - radius: Style.radiusS + radius: root.buttonRadius color: { if (!enabled) return outlined ? Color.transparent : Qt.lighter(Color.mSurfaceVariant, 1.2); diff --git a/Widgets/NColorPicker.qml b/Widgets/NColorPicker.qml index cc8650dba..06399e083 100644 --- a/Widgets/NColorPicker.qml +++ b/Widgets/NColorPicker.qml @@ -49,7 +49,7 @@ Rectangle { Rectangle { Layout.preferredWidth: root.height * 0.6 Layout.preferredHeight: root.height * 0.6 - radius: Layout.preferredWidth * 0.5 + radius: Math.min(Style.radiusL, Layout.preferredWidth / 2) color: root.selectedColor border.color: Color.mOutline border.width: Style.borderS diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index 9ba5ae931..28b55031d 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -564,7 +564,7 @@ Popup { Rectangle { width: 10 height: 10 - radius: 5 + radius: Math.min(Style.radiusXS, width / 2) color: "transparent" border.color: root.selectedColor.hsvValue < 0.5 ? "white" : "black" border.width: 1 @@ -698,7 +698,7 @@ Popup { Rectangle { width: 24 height: 24 - radius: 4 + radius: Math.min(Style.radiusXS, width / 2) color: modelData.color border.color: root.selectedColor.toString() === modelData.color.toString() ? Color.mPrimary : Color.mOutline border.width: root.selectedColor.toString() === modelData.color.toString() ? 2 : 1 diff --git a/Widgets/NColorSlider.qml b/Widgets/NColorSlider.qml index 1e7264eb6..95a18f10b 100644 --- a/Widgets/NColorSlider.qml +++ b/Widgets/NColorSlider.qml @@ -39,7 +39,7 @@ Slider { height: root.availableHeight - root.knobDiameter width: root.trackWidth - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: Qt.alpha(Color.mSurface, 0.5) border.color: Qt.alpha(Color.mOutline, 0.5) border.width: Style.borderS @@ -96,7 +96,7 @@ Slider { id: knobCutout implicitWidth: root.knobDiameter + root.cutoutExtra implicitHeight: root.knobDiameter + root.cutoutExtra - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: root.cutoutColor !== undefined ? root.cutoutColor : Color.mSurface y: root.visualPosition * (root.availableHeight - root.knobDiameter) - ((root.knobDiameter + root.cutoutExtra) / 2) @@ -114,7 +114,7 @@ Slider { id: knob implicitWidth: root.knobDiameter implicitHeight: root.knobDiameter - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: { if (root.rainbowMode) { // Hue Logic: Map position (0.0 to 1.0) directly to Hue diff --git a/Widgets/NFilePicker.qml b/Widgets/NFilePicker.qml index 05b907035..394b4c820 100644 --- a/Widgets/NFilePicker.qml +++ b/Widgets/NFilePicker.qml @@ -578,7 +578,7 @@ Popup { anchors.margins: Style.marginS width: 24 height: 24 - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: Color.mSecondary border.color: Color.mOutline border.width: Style.borderS diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index 4e8404f39..df6cdcb4f 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -37,7 +37,7 @@ Rectangle { opacity: root.enabled ? Style.opacityFull : Style.opacityMedium color: root.enabled && root.hovering ? colorBgHover : colorBg - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) border.color: root.enabled && root.hovering ? colorBorderHover : colorBorder border.width: Style.borderS diff --git a/Widgets/NIconButtonHot.qml b/Widgets/NIconButtonHot.qml index eb50c1159..6ab5b826f 100644 --- a/Widgets/NIconButtonHot.qml +++ b/Widgets/NIconButtonHot.qml @@ -60,7 +60,7 @@ Rectangle { } return colorBg; } - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) border.color: root.enabled && root.hovering ? colorBorderHover : colorBorder border.width: Style.borderS diff --git a/Widgets/NRadioButton.qml b/Widgets/NRadioButton.qml index 09c53e327..bcaf140d8 100644 --- a/Widgets/NRadioButton.qml +++ b/Widgets/NRadioButton.qml @@ -15,7 +15,7 @@ RadioButton { implicitWidth: Style.baseWidgetSize * 0.625 * pointSize / Style.fontSizeM implicitHeight: Style.baseWidgetSize * 0.625 * pointSize / Style.fontSizeM - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Color.transparent border.color: root.checked ? Color.mPrimary : Color.mOnSurface border.width: Style.borderM @@ -25,7 +25,7 @@ RadioButton { anchors.fill: parent anchors.margins: parent.width * 0.3 - radius: width * 0.5 + radius: Math.min(Style.radiusL, width / 2) color: Qt.alpha(Color.mPrimary, root.checked ? 1 : 0) Behavior on color { diff --git a/Widgets/NSectionEditor.qml b/Widgets/NSectionEditor.qml index 19f20c0bd..fda2a1fdc 100644 --- a/Widgets/NSectionEditor.qml +++ b/Widgets/NSectionEditor.qml @@ -355,7 +355,7 @@ NBox { id: dropIndicator width: 3 height: Style.baseWidgetSize * 1.15 - radius: width / 2 + radius: Style.radiusXXS color: Color.mPrimary opacity: 0 visible: opacity > 0 diff --git a/Widgets/NSlider.qml b/Widgets/NSlider.qml index dc028c757..6ffd5665a 100644 --- a/Widgets/NSlider.qml +++ b/Widgets/NSlider.qml @@ -31,7 +31,7 @@ Slider { implicitHeight: trackHeight width: root.availableWidth height: implicitHeight - radius: height / 2 + radius: Math.min(Style.radiusL, height / 2) color: Qt.alpha(Color.mSurface, 0.5) border.color: Qt.alpha(Color.mOutline, 0.5) border.width: Style.borderS @@ -46,7 +46,7 @@ Slider { Rectangle { width: parent.height height: parent.height - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: Qt.darker(fillColor, 1.2) //starting color of gradient } @@ -76,7 +76,7 @@ Slider { id: knobCutout implicitWidth: knobDiameter + cutoutExtra implicitHeight: knobDiameter + cutoutExtra - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: root.cutoutColor !== undefined ? root.cutoutColor : Color.mSurface x: root.leftPadding + root.visualPosition * (root.availableWidth - root.knobDiameter) - cutoutExtra anchors.verticalCenter: parent.verticalCenter @@ -93,7 +93,7 @@ Slider { id: knob implicitWidth: knobDiameter implicitHeight: knobDiameter - radius: width / 2 + radius: Math.min(Style.radiusL, width / 2) color: root.pressed ? Color.mHover : Color.mSurface border.color: fillColor border.width: Style.borderL diff --git a/Widgets/NSpinBox.qml b/Widgets/NSpinBox.qml index 44fc550b4..96c937f88 100644 --- a/Widgets/NSpinBox.qml +++ b/Widgets/NSpinBox.qml @@ -85,7 +85,7 @@ RowLayout { id: spinBoxContainer implicitWidth: 120 implicitHeight: Math.round((root.baseSize - 4) / 2) * 2 - radius: height * 0.5 + radius: Style.radiusS color: Color.mSurfaceVariant border.color: (root.hovering || decreaseArea.containsMouse || increaseArea.containsMouse) ? Color.mHover : Color.mOutline border.width: Style.borderS @@ -140,7 +140,7 @@ RowLayout { Rectangle { width: Math.round(parent.height) height: parent.height - radius: Math.round(width / 2) + radius: Math.min(Style.radiusL, width / 2) anchors.left: parent.left color: decreaseArea.containsMouse ? Color.mHover : Color.transparent Behavior on color { @@ -239,7 +239,7 @@ RowLayout { Rectangle { width: Math.round(parent.height) height: parent.height - radius: Math.round(width / 2) + radius: Math.min(Style.radiusL, width / 2) anchors.right: parent.right color: increaseArea.containsMouse ? Color.mHover : Color.transparent Behavior on color { diff --git a/Widgets/NToggle.qml b/Widgets/NToggle.qml index 95e369d12..bf5130387 100644 --- a/Widgets/NToggle.qml +++ b/Widgets/NToggle.qml @@ -35,7 +35,7 @@ RowLayout { implicitWidth: Math.round(root.baseSize * .85) * 2 implicitHeight: Math.round(root.baseSize * .5) * 2 - radius: height * 0.5 + radius: Math.min(Style.radiusL, height / 2) color: root.checked ? Color.mPrimary : Color.mSurface border.color: Color.mOutline border.width: Style.borderS @@ -56,7 +56,7 @@ RowLayout { implicitWidth: Math.round(root.baseSize * 0.4) * 2 implicitHeight: Math.round(root.baseSize * 0.4) * 2 - radius: height * 0.5 + radius: Math.min(Style.radiusL, height / 2) color: root.checked ? Color.mOnPrimary : Color.mPrimary border.color: root.checked ? Color.mSurface : Color.mSurface border.width: Style.borderM