mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Taskbar: new setting to control icon scaling.
This commit is contained in:
@@ -341,6 +341,10 @@
|
||||
"description": "Steuert das Verhalten des Widgets, wenn keine übereinstimmenden Fenster vorhanden sind.",
|
||||
"label": "Ausblendmodus"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Legt den Skalierungsfaktor für Taskleistensymbole fest.",
|
||||
"label": "Symbolskalierung"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Maximale Breite der Taskleiste als Prozentsatz der Bildschirmbreite.",
|
||||
"label": "Maximale Breite"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Controls how the widget behaves when there are no matching windows.",
|
||||
"label": "Hiding mode"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Sets the scaling factor for taskbar icons.",
|
||||
"label": "Icon scaling"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Maximum width of the taskbar as a percentage of screen width.",
|
||||
"label": "Maximum width"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Controla cómo se comporta el widget cuando no hay ventanas coincidentes.",
|
||||
"label": "Modo de ocultación"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Establece el factor de escala para los iconos de la barra de tareas.",
|
||||
"label": "Escalado de iconos"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Ancho máximo de la barra de tareas como porcentaje del ancho de la pantalla.",
|
||||
"label": "Ancho máximo"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Contrôle le comportement du widget lorsqu'il n'y a pas de fenêtres correspondantes.",
|
||||
"label": "Mode de masquage"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Définit le facteur d'échelle pour les icônes de la barre des tâches.",
|
||||
"label": "Mise à l'échelle des icônes"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Largeur maximale de la barre des tâches en pourcentage de la largeur de l'écran.",
|
||||
"label": "Largeur maximale"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "一致するウィンドウがない場合のウィジェットの動作を制御します。",
|
||||
"label": "非表示モード"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "タスクバーのアイコンの拡大率を設定します。",
|
||||
"label": "アイコンのスケーリング"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "画面幅に対するタスクバーの最大幅の割合。",
|
||||
"label": "最大幅"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Bepaalt hoe de widget zich gedraagt wanneer er geen overeenkomende vensters zijn.",
|
||||
"label": "Verbergmodus"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Stelt de schaalfactor in voor taakbalkpictogrammen.",
|
||||
"label": "Icoon schaling"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Maximale breedte van de taakbalk als percentage van de schermbreedte.",
|
||||
"label": "Maximale breedte"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Controla como o widget se comporta quando não há janelas correspondentes.",
|
||||
"label": "Modo de ocultação"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Define o fator de escala para ícones da barra de tarefas.",
|
||||
"label": "Escalonamento de ícones"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Largura máxima da barra de tarefas como porcentagem da largura da tela.",
|
||||
"label": "Largura máxima"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Управляет поведением виджета, когда нет соответствующих окон.",
|
||||
"label": "Режим скрытия"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Задает коэффициент масштабирования для значков панели задач.",
|
||||
"label": "Масштабирование значков"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Максимальная ширина панели задач в процентах от ширины экрана.",
|
||||
"label": "Максимальная ширина"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Eşleşen pencere olmadığında araç takımının nasıl davrandığını kontrol eder.",
|
||||
"label": "Gizleme modu"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Görev çubuğu simgeleri için ölçeklendirme faktörünü ayarlar.",
|
||||
"label": "Simge ölçeklendirme"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Görev çubuğunun ekran genişliğine göre maksimum genişliği yüzdesi.",
|
||||
"label": "Maksimum genişlik"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "Керує поведінкою віджета, коли немає відповідних вікон.",
|
||||
"label": "Режим приховування"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "Встановлює коефіцієнт масштабування для значків панелі завдань.",
|
||||
"label": "Масштабування іконок"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "Максимальна ширина панелі завдань у відсотках від ширини екрана.",
|
||||
"label": "Максимальна ширина"
|
||||
|
||||
@@ -341,6 +341,10 @@
|
||||
"description": "当没有匹配的窗口时控制小部件的行为。",
|
||||
"label": "隐藏模式"
|
||||
},
|
||||
"icon-scale": {
|
||||
"description": "设置任务栏图标的缩放比例。",
|
||||
"label": "图标缩放"
|
||||
},
|
||||
"max-width": {
|
||||
"description": "任务栏的最大宽度(占屏幕宽度的百分比)。",
|
||||
"label": "最大宽度"
|
||||
|
||||
@@ -23,7 +23,6 @@ Rectangle {
|
||||
readonly property string barPosition: Settings.data.bar.position
|
||||
readonly property bool isVerticalBar: barPosition === "left" || barPosition === "right"
|
||||
readonly property string density: Settings.data.bar.density
|
||||
readonly property int itemSize: Math.round((density === "compact") ? Style.capsuleHeight * 1.0 : Style.capsuleHeight * 0.9)
|
||||
|
||||
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
|
||||
property var widgetSettings: {
|
||||
@@ -43,6 +42,8 @@ Rectangle {
|
||||
readonly property bool showTitle: isVerticalBar ? false : (widgetSettings.showTitle !== undefined) ? widgetSettings.showTitle : widgetMetadata.showTitle
|
||||
readonly property bool smartWidth: (widgetSettings.smartWidth !== undefined) ? widgetSettings.smartWidth : widgetMetadata.smartWidth
|
||||
readonly property int maxTaskbarWidthPercent: (widgetSettings.maxTaskbarWidth !== undefined) ? widgetSettings.maxTaskbarWidth : widgetMetadata.maxTaskbarWidth
|
||||
readonly property real iconScale: (widgetSettings.iconScale !== undefined) ? widgetSettings.iconScale : widgetMetadata.iconScale
|
||||
readonly property int itemSize: Math.round(((density === "compact") ? Style.capsuleHeight * 1.0 : Style.capsuleHeight * 0.9) * Math.max(0.1, iconScale))
|
||||
|
||||
// Maximum width for the taskbar widget to prevent overlapping with other widgets
|
||||
readonly property real maxTaskbarWidth: {
|
||||
|
||||
@@ -24,6 +24,7 @@ ColumnLayout {
|
||||
property int valueMaxTaskbarWidth: widgetData.maxTaskbarWidth !== undefined ? widgetData.maxTaskbarWidth : widgetMetadata.maxTaskbarWidth
|
||||
property int valueTitleWidth: widgetData.titleWidth !== undefined ? widgetData.titleWidth : widgetMetadata.titleWidth
|
||||
property bool valueShowPinnedApps: widgetData.showPinnedApps !== undefined ? widgetData.showPinnedApps : widgetMetadata.showPinnedApps
|
||||
property real valueIconScale: widgetData.iconScale !== undefined ? widgetData.iconScale : widgetMetadata.iconScale
|
||||
|
||||
Component.onCompleted: {
|
||||
if (widgetData && widgetData.hideMode !== undefined) {
|
||||
@@ -44,6 +45,7 @@ ColumnLayout {
|
||||
settings.maxTaskbarWidth = valueMaxTaskbarWidth;
|
||||
settings.titleWidth = parseInt(titleWidthInput.text) || widgetMetadata.titleWidth;
|
||||
settings.showPinnedApps = valueShowPinnedApps;
|
||||
settings.iconScale = valueIconScale;
|
||||
return settings;
|
||||
}
|
||||
|
||||
@@ -101,6 +103,26 @@ ColumnLayout {
|
||||
onToggled: checked => root.valueShowPinnedApps = checked
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("bar.widget-settings.taskbar.icon-scale.label")
|
||||
description: I18n.tr("bar.widget-settings.taskbar.icon-scale.description")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0.5
|
||||
to: 1
|
||||
stepSize: 0.01
|
||||
value: root.valueIconScale
|
||||
onMoved: value => root.valueIconScale = value
|
||||
text: Math.round(root.valueIconScale * 100) + "%"
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.taskbar.show-title.label")
|
||||
|
||||
@@ -211,7 +211,8 @@ Singleton {
|
||||
"titleWidth": 120,
|
||||
"showPinnedApps": true,
|
||||
"smartWidth": true,
|
||||
"maxTaskbarWidth": 40
|
||||
"maxTaskbarWidth": 40,
|
||||
"iconScale": 1.0
|
||||
},
|
||||
"Tray": {
|
||||
"allowUserSettings": true,
|
||||
|
||||
Reference in New Issue
Block a user