diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 16d3042d..a2c7e21d 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -32,15 +32,22 @@ }, "border-radius": { "label": "Eckenradius", - "description": "Steuert die Rundung der Ecken von Fenstern, Buttons und anderen Elementen." + "description": "Steuert die Rundung der Ecken von Fenstern, Buttons und anderen Elementen.", + "reset": "Rahmenradius zurücksetzen" }, "animation-speed": { "label": "Animationsgeschwindigkeit", - "description": "Globale Animationsgeschwindigkeit anpassen." + "description": "Globale Animationsgeschwindigkeit anpassen.", + "reset": "Animationsgeschwindigkeit zurücksetzen" }, "animation-disable": { "label": "UI-Animationen deaktivieren", "description": "Alle Animationen für eine schnellere, reaktionsschnellere Erfahrung deaktivieren." + }, + "scaling": { + "description": "Ändert die Größe der allgemeinen Benutzeroberfläche, mit Ausnahme der Leiste.", + "label": "Oberflächenskalierung", + "reset-scaling": "Schnittstellenskalierung zurücksetzen" } }, "screen-corners": { @@ -58,7 +65,8 @@ }, "radius": { "label": "Bildschirmecken-Radius", - "description": "Rundung der Bildschirmecken anpassen." + "description": "Rundung der Bildschirmecken anpassen.", + "reset": "Eckenradius des Bildschirms zurücksetzen" } }, "fonts": { @@ -200,11 +208,9 @@ "monitors": { "section": { "label": "Monitor-spezifische Einstellungen", - "description": "Skalierung und Helligkeit für jeden Bildschirm anpassen." + "description": "Helligkeitseinstellungen für jedes Display anpassen." }, - "scale": "Skalierung", "brightness": "Helligkeit", - "reset-scaling": "Skalierung zurücksetzen", "brightness-step": { "label": "Helligkeits-Schrittgröße", "description": "Schrittgröße für Helligkeitsänderungen anpassen (Mausrad und Tastenkombinationen)." diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 41800513..618a251e 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -22,6 +22,11 @@ "label": "Show tooltips", "description": "Enable or disable tooltips throughout the interface." }, + "scaling": { + "label": "Interface Scaling", + "description": "Changes the size of the general user interface, excluding the bar.", + "reset-scaling": "Reset interface scaling" + }, "dim-desktop": { "label": "Dim desktop", "description": "Dim the desktop when panels or menus are open." @@ -32,11 +37,13 @@ }, "border-radius": { "label": "Border radius", - "description": "Controls the corner roundness of windows, buttons, and other elements." + "description": "Controls the corner roundness of windows, buttons, and other elements.", + "reset": "Reset border radius" }, "animation-speed": { "label": "Animation speed", - "description": "Adjust global animation speed." + "description": "Adjust global animation speed.", + "reset": "Reset animation speed" }, "animation-disable": { "label": "Disable UI Animations", @@ -58,7 +65,8 @@ }, "radius": { "label": "Screen corners radius", - "description": "Adjust the rounded corners of the screen." + "description": "Adjust the rounded corners of the screen.", + "reset": "Reset screen corners radius" } }, "fonts": { @@ -200,11 +208,9 @@ "monitors": { "section": { "label": "Per-monitor settings", - "description": "Adjust scaling and brightness for each display." + "description": "Adjust settings brightness for each display." }, - "scale": "Scale", "brightness": "Brightness", - "reset-scaling": "Reset scaling", "brightness-step": { "label": "Brightness step size", "description": "Adjust the step size for brightness changes (scroll wheel and keyboard shortcuts)." @@ -1272,6 +1278,7 @@ "right": "Right" }, "density": { + "mini": "Mini", "compact": "Compact", "default": "Default", "comfortable": "Comfortable" diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 6602519f..5bfb5da8 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -32,15 +32,22 @@ }, "border-radius": { "label": "Radio del borde", - "description": "Controla la redondez de las esquinas de ventanas, botones y otros elementos." + "description": "Controla la redondez de las esquinas de ventanas, botones y otros elementos.", + "reset": "Restablecer el radio del borde" }, "animation-speed": { "label": "Velocidad de la animación", - "description": "Ajusta la velocidad de la animación global." + "description": "Ajusta la velocidad de la animación global.", + "reset": "Restablecer la velocidad de la animación" }, "animation-disable": { "label": "Desactivar animaciones de UI", "description": "Desactivar todas las animaciones para una experiencia más rápida y responsiva." + }, + "scaling": { + "description": "Cambia el tamaño de la interfaz de usuario general, excluyendo la barra.", + "label": "Escalado de la interfaz", + "reset-scaling": "Restablecer la escala de la interfaz" } }, "screen-corners": { @@ -58,7 +65,8 @@ }, "radius": { "label": "Radio de las esquinas de la pantalla", - "description": "Ajusta las esquinas redondeadas de la pantalla." + "description": "Ajusta las esquinas redondeadas de la pantalla.", + "reset": "Restablecer el radio de las esquinas de la pantalla" } }, "fonts": { @@ -200,11 +208,9 @@ "monitors": { "section": { "label": "Configuración por monitor", - "description": "Ajusta la escala y el brillo para cada pantalla." + "description": "Ajustar el brillo de la configuración para cada pantalla." }, - "scale": "Escala", "brightness": "Brillo", - "reset-scaling": "Restablecer escala", "brightness-step": { "label": "Tamaño del paso de brillo", "description": "Ajusta el tamaño del paso para los cambios de brillo (rueda de desplazamiento y atajos de teclado)." diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index d62cace9..b2fe5ffe 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -32,15 +32,22 @@ }, "border-radius": { "label": "Rayon de bordure", - "description": "Contrôle l'arrondi des coins des fenêtres, des boutons et d'autres éléments." + "description": "Contrôle l'arrondi des coins des fenêtres, des boutons et d'autres éléments.", + "reset": "Réinitialiser le rayon de la bordure" }, "animation-speed": { "label": "Vitesse d'animation", - "description": "Ajustez la vitesse globale des animations." + "description": "Ajustez la vitesse globale des animations.", + "reset": "Réinitialiser la vitesse de l'animation" }, "animation-disable": { "label": "Désactiver les animations de l'interface", "description": "Désactiver toutes les animations pour une expérience plus rapide et réactive." + }, + "scaling": { + "description": "Modifie la taille de l'interface utilisateur générale, à l'exception de la barre.", + "label": "Mise à l'échelle de l'interface", + "reset-scaling": "Réinitialiser l'échelle de l'interface" } }, "screen-corners": { @@ -58,7 +65,8 @@ }, "radius": { "label": "Rayon des coins de l'écran", - "description": "Ajustez l'arrondi des coins de l'écran." + "description": "Ajustez l'arrondi des coins de l'écran.", + "reset": "Réinitialiser le rayon des coins de l'écran" } }, "fonts": { @@ -200,11 +208,9 @@ "monitors": { "section": { "label": "Paramètres par moniteur", - "description": "Ajustez la mise à l'échelle et la luminosité pour chaque écran." + "description": "Ajustez la luminosité pour chaque écran." }, - "scale": "Mise à l'échelle", "brightness": "Luminosité", - "reset-scaling": "Réinitialiser la mise à l'échelle", "brightness-step": { "label": "Incrément de luminosité", "description": "Ajustez l'incrément pour les changements de luminosité (molette de la souris et raccourcis clavier)." diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index 25522957..5c6bf04f 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -32,15 +32,22 @@ }, "border-radius": { "label": "Raio da borda", - "description": "Controla o arredondamento dos cantos de janelas, botões e outros elementos." + "description": "Controla o arredondamento dos cantos de janelas, botões e outros elementos.", + "reset": "Redefinir raio da borda" }, "animation-speed": { "label": "Velocidade da animação", - "description": "Ajuste a velocidade global da animação." + "description": "Ajuste a velocidade global da animação.", + "reset": "Redefinir velocidade da animação" }, "animation-disable": { "label": "Desativar animações da interface", "description": "Desativar todas as animações para uma experiência mais rápida e responsiva." + }, + "scaling": { + "description": "Altera o tamanho da interface geral do usuário, excluindo a barra.", + "label": "Escalonamento da Interface", + "reset-scaling": "Redefinir escala da interface" } }, "screen-corners": { @@ -58,7 +65,8 @@ }, "radius": { "label": "Raio dos cantos da tela", - "description": "Ajuste os cantos arredondados da tela." + "description": "Ajuste os cantos arredondados da tela.", + "reset": "Redefinir raio dos cantos da tela" } }, "fonts": { @@ -200,11 +208,9 @@ "monitors": { "section": { "label": "Configurações por monitor", - "description": "Ajuste a escala e o brilho para cada tela." + "description": "Ajustar o brilho das configurações para cada tela." }, - "scale": "Escala", "brightness": "Brilho", - "reset-scaling": "Redefinir escala", "brightness-step": { "label": "Tamanho do passo do brilho", "description": "Ajuste o tamanho do passo para alterações de brilho (roda do mouse e atalhos de teclado)." diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 3bbe1d89..716a04d2 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -32,15 +32,22 @@ }, "border-radius": { "label": "边框圆角", - "description": "控制窗口、按钮及其他元素的边角圆度。" + "description": "控制窗口、按钮及其他元素的边角圆度。", + "reset": "重置边框半径" }, "animation-speed": { "label": "动画速度", - "description": "调整全局动画速度。" + "description": "调整全局动画速度。", + "reset": "重置动画速度" }, "animation-disable": { "label": "关闭动画", "description": "禁用所有动画效果,以获得更快速、更灵敏的体验。" + }, + "scaling": { + "description": "更改常规用户界面(不包括栏)的大小。", + "label": "界面缩放", + "reset-scaling": "重置界面缩放" } }, "screen-corners": { @@ -58,7 +65,8 @@ }, "radius": { "label": "屏幕边角半径", - "description": "调整屏幕圆角的弧度。" + "description": "调整屏幕圆角的弧度。", + "reset": "重置屏幕圆角半径" } }, "fonts": { @@ -200,11 +208,9 @@ "monitors": { "section": { "label": "显示器设置", - "description": "调整每个显示器的缩放比例和亮度。" + "description": "调整每个显示器的亮度设置。" }, - "scale": "缩放比例", "brightness": "亮度", - "reset-scaling": "重置缩放", "brightness-step": { "label": "亮度步长", "description": "调整亮度变化的步长(滚轮和键盘快捷键)。" diff --git a/Commons/Settings.qml b/Commons/Settings.qml index ce521b4c..a96a3539 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -183,6 +183,7 @@ Singleton { property bool dimDesktop: true property bool showScreenCorners: false property bool forceBlackScreenCorners: false + property real scaleRatio: 1.0 property real radiusRatio: 1.0 property real screenRadiusRatio: 1.0 property real animationSpeed: 1.0 diff --git a/Commons/Style.qml b/Commons/Style.qml index 954cb33e..aaad6128 100644 --- a/Commons/Style.qml +++ b/Commons/Style.qml @@ -34,14 +34,12 @@ Singleton { property int radiusS: Math.round(12 * Settings.data.general.radiusRatio) property int radiusM: Math.round(16 * Settings.data.general.radiusRatio) property int radiusL: Math.round(20 * Settings.data.general.radiusRatio) - - //screen Radii property int screenRadius: Math.round(20 * Settings.data.general.screenRadiusRatio) // Border - property int borderS: 1 - property int borderM: 2 - property int borderL: 3 + property int borderS: Math.round(1 * uiScaleRatio) + property int borderM: Math.round(2 * uiScaleRatio) + property int borderL: Math.round(3 * uiScaleRatio) // Margins (for margins and spacing) property int marginXXS: Math.round(2 * uiScaleRatio) @@ -51,8 +49,6 @@ Singleton { property int marginL: Math.round(13 * uiScaleRatio) property int marginXL: Math.round(18 * uiScaleRatio) - property real uiScaleRatio: 1.2 - // Opacity property real opacityNone: 0.0 property real opacityLight: 0.25 @@ -72,10 +68,12 @@ Singleton { property int tooltipDelayLong: 1200 property int pillDelay: 500 - // Settings widgets base size + // Widgets base size property real baseWidgetSize: 33 property real sliderWidth: 200 + property real uiScaleRatio: Settings.data.general.scaleRatio + // Bar Dimensions property real barHeight: { switch (Settings.data.bar.density) { @@ -86,6 +84,7 @@ Singleton { case "comfortable": return (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? 39 : 37 default: + case "default": return (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? 33 : 31 } @@ -99,6 +98,7 @@ Singleton { case "comfortable": return barHeight * 0.73 default: + case "default": return barHeight * 0.82 } diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 6b3af61b..0e097b3d 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -186,7 +186,7 @@ NPanel { anchors.right: parent.right anchors.rightMargin: Style.marginM anchors.verticalCenter: parent.verticalCenter - height: Math.round((Style.fontSizeXXXL * 1.9) / 2 * Style.uiScaleRatio) * 2 + height: Math.round((Style.fontSizeXXXL * 1.9) / 2 * Style.uiScaleRatio) * 2 width: clockItem.height // Seconds circular progress diff --git a/Modules/Bar/Extras/BarPillHorizontal.qml b/Modules/Bar/Extras/BarPillHorizontal.qml index 597d02f9..f58e26e2 100644 --- a/Modules/Bar/Extras/BarPillHorizontal.qml +++ b/Modules/Bar/Extras/BarPillHorizontal.qml @@ -90,7 +90,7 @@ Item { text: root.text + root.suffix family: Settings.data.ui.fontFixed pointSize: textSize - applyUiScale: false + applyUiScale: false font.weight: Style.fontWeightBold color: forceOpen ? Color.mOnSurface : Color.mPrimary visible: revealed diff --git a/Modules/Bar/Extras/BarPillVertical.qml b/Modules/Bar/Extras/BarPillVertical.qml index 7c0b5e77..bba3457a 100644 --- a/Modules/Bar/Extras/BarPillVertical.qml +++ b/Modules/Bar/Extras/BarPillVertical.qml @@ -102,7 +102,7 @@ Item { text: root.text + root.suffix family: Settings.data.ui.fontFixed pointSize: textSize - applyUiScale: false + applyUiScale: false font.weight: Style.fontWeightMedium horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index 7ff5b7b6..a1b38912 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -35,7 +35,6 @@ Item { readonly property string fallbackIcon: "user-desktop" readonly property string barPosition: Settings.data.bar.position - readonly property bool compact: (Settings.data.bar.density === "compact") // Widget settings - matching MediaMini pattern readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon @@ -107,7 +106,7 @@ Item { visible: false text: windowTitle pointSize: Style.fontSizeS - applyUiScale: false + applyUiScale: false font.weight: Style.fontWeightMedium } diff --git a/Modules/ControlCenter/Cards/ProfileCard.qml b/Modules/ControlCenter/Cards/ProfileCard.qml index 70f330dc..230b22ca 100644 --- a/Modules/ControlCenter/Cards/ProfileCard.qml +++ b/Modules/ControlCenter/Cards/ProfileCard.qml @@ -31,7 +31,6 @@ NBox { fallbackIcon: "person" borderColor: Color.mPrimary borderWidth: Math.max(1, Style.borderM) - } ColumnLayout { @@ -85,7 +84,6 @@ NBox { } } - // ---------------------------------- // Uptime Timer { diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index bc62a371..0001f5ec 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -82,6 +82,46 @@ ColumnLayout { onToggled: checked => Settings.data.general.dimDesktop = checked } + ColumnLayout { + spacing: Style.marginXXS + Layout.fillWidth: true + + NLabel { + label: I18n.tr("settings.general.ui.scaling.label") + description: I18n.tr("settings.general.ui.scaling.description") + } + + RowLayout { + spacing: Style.marginL + Layout.fillWidth: true + + NValueSlider { + Layout.fillWidth: true + from: 0.8 + to: 1.2 + stepSize: 0.1 + value: Settings.data.general.scaleRatio + onMoved: value => Settings.data.general.scaleRatio = value + text: Math.floor(Settings.data.general.scaleRatio * 100) + "%" + } + + // Reset button container + Item { + Layout.preferredWidth: 30 * Style.uiScaleRatio + Layout.preferredHeight: 30 * Style.uiScaleRatio + + NIconButton { + icon: "refresh" + baseSize: Style.baseWidgetSize * 0.8 + tooltipText: I18n.tr("settings.general.ui.scaling.reset-scaling") + onClicked: Settings.data.general.scaleRatio = 1.0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + } + } + } + } + NToggle { label: I18n.tr("settings.general.ui.tooltips.label") description: I18n.tr("settings.general.ui.tooltips.description") @@ -105,14 +145,34 @@ ColumnLayout { description: I18n.tr("settings.general.ui.border-radius.description") } - NValueSlider { + RowLayout { + spacing: Style.marginL Layout.fillWidth: true - from: 0 - to: 1 - stepSize: 0.01 - value: Settings.data.general.radiusRatio - onMoved: value => Settings.data.general.radiusRatio = value - text: Math.floor(Settings.data.general.radiusRatio * 100) + "%" + + NValueSlider { + Layout.fillWidth: true + from: 0 + to: 1 + stepSize: 0.01 + value: Settings.data.general.radiusRatio + onMoved: value => Settings.data.general.radiusRatio = value + text: Math.floor(Settings.data.general.radiusRatio * 100) + "%" + } + + // Reset button container + Item { + Layout.preferredWidth: 30 * Style.uiScaleRatio + Layout.preferredHeight: 30 * Style.uiScaleRatio + + NIconButton { + icon: "refresh" + baseSize: Style.baseWidgetSize * 0.8 + tooltipText: I18n.tr("settings.general.ui.border-radius.reset") + onClicked: Settings.data.general.radiusRatio = 1.0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + } + } } } @@ -138,14 +198,34 @@ ColumnLayout { description: I18n.tr("settings.general.ui.animation-speed.description") } - NValueSlider { + RowLayout { + spacing: Style.marginL Layout.fillWidth: true - from: 0.1 - to: 2.0 - stepSize: 0.01 - value: Settings.data.general.animationSpeed - onMoved: value => Settings.data.general.animationSpeed = value - text: Math.round(Settings.data.general.animationSpeed * 100) + "%" + + NValueSlider { + Layout.fillWidth: true + from: 0.1 + to: 2.0 + stepSize: 0.01 + value: Settings.data.general.animationSpeed + onMoved: value => Settings.data.general.animationSpeed = value + text: Math.round(Settings.data.general.animationSpeed * 100) + "%" + } + + // Reset button container + Item { + Layout.preferredWidth: 30 * Style.uiScaleRatio + Layout.preferredHeight: 30 * Style.uiScaleRatio + + NIconButton { + icon: "refresh" + baseSize: Style.baseWidgetSize * 0.8 + tooltipText: I18n.tr("settings.general.ui.animation-speed.reset") + onClicked: Settings.data.general.animationSpeed = 1.0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + } + } } } } @@ -190,14 +270,34 @@ ColumnLayout { description: I18n.tr("settings.general.screen-corners.radius.description") } - NValueSlider { + RowLayout { + spacing: Style.marginL Layout.fillWidth: true - from: 0 - to: 2 - stepSize: 0.01 - value: Settings.data.general.screenRadiusRatio - onMoved: value => Settings.data.general.screenRadiusRatio = value - text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%" + + NValueSlider { + Layout.fillWidth: true + from: 0 + to: 2 + stepSize: 0.01 + value: Settings.data.general.screenRadiusRatio + onMoved: value => Settings.data.general.screenRadiusRatio = value + text: Math.floor(Settings.data.general.screenRadiusRatio * 100) + "%" + } + + // Reset button container + Item { + Layout.preferredWidth: 30 * Style.uiScaleRatio + Layout.preferredHeight: 30 * Style.uiScaleRatio + + NIconButton { + icon: "refresh" + baseSize: Style.baseWidgetSize * 0.8 + tooltipText: I18n.tr("settings.general.screen-corners.radius.reset") + onClicked: Settings.data.general.screenRadiusRatio = 1.0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + } + } } } } @@ -323,8 +423,8 @@ ColumnLayout { // Reset button container Item { - Layout.preferredWidth: 30 - Layout.preferredHeight: 30 + Layout.preferredWidth: 30 * Style.uiScaleRatio + Layout.preferredHeight: 30 * Style.uiScaleRatio NIconButton { icon: "refresh" @@ -360,8 +460,8 @@ ColumnLayout { // Reset button container Item { - Layout.preferredWidth: 30 - Layout.preferredHeight: 30 + Layout.preferredWidth: 30 * Style.uiScaleRatio + Layout.preferredHeight: 30 * Style.uiScaleRatio NIconButton { icon: "refresh"