mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
@@ -271,6 +271,10 @@
|
||||
"label": "Dock-Schwebeabstand",
|
||||
"description": "Schwebeabstand vom Bildschirmrand anpassen."
|
||||
},
|
||||
"icon-size": {
|
||||
"label": "Dock-Größe",
|
||||
"description": "Gesamtgröße des Docks anpassen."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Symbole einfärben",
|
||||
"description": "Theme-Farben auf Dock-App-Symbole anwenden (nur nicht fokussierte Apps)."
|
||||
@@ -928,9 +932,13 @@
|
||||
"label": "Scrollmodus",
|
||||
"description": "Steuern, wann Textscrolling für lange Fenstertitel aktiviert ist."
|
||||
},
|
||||
"width": {
|
||||
"description": "Steuert die horizontale Größe des Widgets.",
|
||||
"label": "Widget-Breite"
|
||||
"max-width": {
|
||||
"label": "Maximale Breite",
|
||||
"description": "Stellt die maximale Horizontalgröße des Widgets ein. Das Widget wird sich an kürzere Inhalte anpassen."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Feste Breite verwenden",
|
||||
"description": "Wenn aktiviert, verwendet das Widget immer die maximale Breite, anstatt sich dynamisch an den Inhalt anzupassen."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Symbole einfärben",
|
||||
@@ -1081,6 +1089,14 @@
|
||||
"label": "Visualizer-Typ",
|
||||
"description": "Stil des Audio-Visualizers auswählen."
|
||||
},
|
||||
"max-width": {
|
||||
"label": "Maximale Breite",
|
||||
"description": "Stellt die maximale Horizontalgröße des Widgets ein. Das Widget wird sich an kürzere Inhalte anpassen."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Feste Breite verwenden",
|
||||
"description": "Wenn aktiviert, verwendet das Widget immer die maximale Breite, anstatt sich dynamisch an den Inhalt anzupassen."
|
||||
},
|
||||
"scrolling-mode": {
|
||||
"label": "Scrollmodus",
|
||||
"description": "Steuern, wann Textscrolling für lange Track-Titel aktiviert ist."
|
||||
|
||||
@@ -269,7 +269,11 @@
|
||||
},
|
||||
"floating-distance": {
|
||||
"label": "Dock floating distance",
|
||||
"description": "Adjust the floating distance from the screen edge."
|
||||
"description": "Set the distance between the dock and the edge of the screen."
|
||||
},
|
||||
"icon-size": {
|
||||
"label": "Dock size",
|
||||
"description": "Adjust the overall size of the dock."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Colorize Icons",
|
||||
@@ -911,9 +915,13 @@
|
||||
"label": "Scrolling mode",
|
||||
"description": "Control when text scrolling is enabled for long window titles."
|
||||
},
|
||||
"width": {
|
||||
"label": "Widget Width",
|
||||
"description": "Controls the horizontal size of the widget."
|
||||
"max-width": {
|
||||
"label": "Maximum Width",
|
||||
"description": "Sets the maximum horizontal size of the widget. The widget will shrink to fit shorter content."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Use Fixed Width",
|
||||
"description": "When enabled, the widget will always use the maximum width instead of dynamically adjusting to content."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Colorize Icons",
|
||||
@@ -1064,6 +1072,14 @@
|
||||
"label": "Visualizer type",
|
||||
"description": "Choose the style of audio visualizer to display."
|
||||
},
|
||||
"max-width": {
|
||||
"label": "Maximum Width",
|
||||
"description": "Sets the maximum horizontal size of the widget. The widget will shrink to fit shorter content."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Use Fixed Width",
|
||||
"description": "When enabled, the widget will always use the maximum width instead of dynamically adjusting to content."
|
||||
},
|
||||
"scrolling-mode": {
|
||||
"label": "Scrolling mode",
|
||||
"description": "Control when text scrolling is enabled for long track titles."
|
||||
|
||||
@@ -271,6 +271,10 @@
|
||||
"label": "Distancia de flotación del dock",
|
||||
"description": "Ajusta la distancia de flotación desde el borde de la pantalla."
|
||||
},
|
||||
"icon-size": {
|
||||
"label": "Tamaño del Dock",
|
||||
"description": "Ajusta el tamaño general del Dock."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Colorear iconos",
|
||||
"description": "Aplicar colores del tema a los iconos de aplicaciones del dock (solo aplicaciones no enfocadas)."
|
||||
@@ -911,9 +915,13 @@
|
||||
"label": "Modo de desplazamiento",
|
||||
"description": "Controlar cuándo está habilitado el desplazamiento de texto para títulos de ventana largos."
|
||||
},
|
||||
"width": {
|
||||
"description": "Controla el tamaño horizontal del widget.",
|
||||
"label": "Ancho del widget"
|
||||
"max-width": {
|
||||
"label": "Ancho Máximo",
|
||||
"description": "Establece el tamaño horizontal máximo del widget. El widget se reducirá para adaptarse a contenido más corto."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Usar Ancho Fijo",
|
||||
"description": "Cuando está activado, el widget siempre usará el ancho máximo en lugar de ajustarse dinámicamente al contenido."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Colorear iconos",
|
||||
@@ -1064,6 +1072,14 @@
|
||||
"label": "Tipo de visualizador",
|
||||
"description": "Elegir el estilo de visualizador de audio a mostrar."
|
||||
},
|
||||
"max-width": {
|
||||
"label": "Ancho Máximo",
|
||||
"description": "Establece el tamaño horizontal máximo del widget. El widget se reducirá para adaptarse a contenido más corto."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Usar Ancho Fijo",
|
||||
"description": "Cuando está activado, el widget siempre usará el ancho máximo en lugar de ajustarse dinámicamente al contenido."
|
||||
},
|
||||
"scrolling-mode": {
|
||||
"label": "Modo de desplazamiento",
|
||||
"description": "Controlar cuándo está habilitado el desplazamiento de texto para títulos de pista largos."
|
||||
|
||||
@@ -271,6 +271,10 @@
|
||||
"label": "Distance de flottaison du dock",
|
||||
"description": "Ajustez la distance de flottaison par rapport au bord de l'écran."
|
||||
},
|
||||
"icon-size": {
|
||||
"label": "Taille du Dock",
|
||||
"description": "Ajuster la taille globale du Dock."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Coloriser les icônes",
|
||||
"description": "Appliquer les couleurs du thème aux icônes d'applications du dock (applications non focalisées uniquement)."
|
||||
@@ -911,9 +915,13 @@
|
||||
"label": "Mode de masquage",
|
||||
"description": "Contrôle le comportement du widget lorsqu'aucune fenêtre n'est active."
|
||||
},
|
||||
"width": {
|
||||
"description": "Contrôle la taille horizontale du widget.",
|
||||
"label": "Largeur du widget"
|
||||
"max-width": {
|
||||
"label": "Largeur Maximale",
|
||||
"description": "Définit la taille horizontale maximale du widget. Le widget se rétrécira pour s'adapter à un contenu plus court."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Utiliser une Largeur Fixe",
|
||||
"description": "Lorsque activé, le widget utilisera toujours la largeur maximale au lieu de s'ajuster dynamiquement au contenu."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Coloriser les icônes",
|
||||
@@ -1060,6 +1068,14 @@
|
||||
"label": "Type de visualiseur",
|
||||
"description": "Choisir le style de visualiseur audio à afficher."
|
||||
},
|
||||
"max-width": {
|
||||
"label": "Largeur Maximale",
|
||||
"description": "Définit la taille horizontale maximale du widget. Le widget se rétrécira pour s'adapter à un contenu plus court."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Utiliser une Largeur Fixe",
|
||||
"description": "Lorsque activé, le widget utilisera toujours la largeur maximale au lieu de s'ajuster dynamiquement au contenu."
|
||||
},
|
||||
"scrolling-mode": {
|
||||
"label": "Mode de défilement",
|
||||
"description": "Contrôler quand le défilement de texte est activé pour les titres de piste longs."
|
||||
|
||||
@@ -271,6 +271,10 @@
|
||||
"label": "Distância de flutuação da dock",
|
||||
"description": "Ajuste a distância de flutuação da borda da tela."
|
||||
},
|
||||
"icon-size": {
|
||||
"label": "Tamanho do Dock",
|
||||
"description": "Ajustar o tamanho geral do Dock."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Colorir ícones",
|
||||
"description": "Aplicar cores do tema aos ícones de aplicativos da dock (apenas aplicativos não focados)."
|
||||
@@ -911,9 +915,13 @@
|
||||
"label": "Modo de rolagem",
|
||||
"description": "Controlar quando a rolagem de texto está habilitada para títulos de janela longos."
|
||||
},
|
||||
"width": {
|
||||
"description": "Controla o tamanho horizontal do widget.",
|
||||
"label": "Largura do Widget"
|
||||
"max-width": {
|
||||
"label": "Largura Máxima",
|
||||
"description": "Define o tamanho horizontal máximo do widget. O widget será reduzido para se adequar a conteúdo mais curto."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Usar Largura Fixa",
|
||||
"description": "Quando ativado, o widget sempre usará a largura máxima em vez de ajustar dinamicamente ao conteúdo."
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "Colorir ícones",
|
||||
@@ -1064,6 +1072,14 @@
|
||||
"label": "Tipo de visualizador",
|
||||
"description": "Escolher o estilo de visualizador de áudio a exibir."
|
||||
},
|
||||
"max-width": {
|
||||
"label": "Largura Máxima",
|
||||
"description": "Define o tamanho horizontal máximo do widget. O widget será reduzido para se adequar a conteúdo mais curto."
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "Usar Largura Fixa",
|
||||
"description": "Quando ativado, o widget sempre usará a largura máxima em vez de ajustar dinamicamente ao conteúdo."
|
||||
},
|
||||
"scrolling-mode": {
|
||||
"label": "Modo de rolagem",
|
||||
"description": "Controlar quando a rolagem de texto está habilitada para títulos de faixa longos."
|
||||
|
||||
@@ -271,6 +271,10 @@
|
||||
"label": "Dock 浮动距离",
|
||||
"description": "调整距离屏幕边缘的浮动距离。"
|
||||
},
|
||||
"icon-size": {
|
||||
"label": "Dock 大小",
|
||||
"description": "调整 Dock 的整体大小。"
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "着色图标",
|
||||
"description": "将主题颜色应用到 Dock 应用图标(仅限非聚焦应用)。"
|
||||
@@ -911,9 +915,13 @@
|
||||
"label": "滚动模式",
|
||||
"description": "控制何时为长窗口标题启用文本滚动。"
|
||||
},
|
||||
"width": {
|
||||
"description": "控制小部件的水平尺寸。",
|
||||
"label": "小部件宽度"
|
||||
"max-width": {
|
||||
"label": "最大宽度",
|
||||
"description": "设置小部件的最大水平尺寸。当内容较短时,小部件会自动收缩以适应内容。"
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "使用固定宽度",
|
||||
"description": "启用后,小部件将始终使用最大宽度,而不根据内容动态调整。"
|
||||
},
|
||||
"colorize-icons": {
|
||||
"label": "着色图标",
|
||||
@@ -1064,6 +1072,14 @@
|
||||
"label": "可视化器类型",
|
||||
"description": "选择要显示的音频可视化器样式。"
|
||||
},
|
||||
"max-width": {
|
||||
"label": "最大宽度",
|
||||
"description": "设置小部件的最大水平尺寸。当内容较短时,小部件会自动收缩以适应内容。"
|
||||
},
|
||||
"use-fixed-width": {
|
||||
"label": "使用固定宽度",
|
||||
"description": "启用后,小部件将始终使用最大宽度,而不根据内容动态调整。"
|
||||
},
|
||||
"scrolling-mode": {
|
||||
"label": "滚动模式",
|
||||
"description": "控制何时为长曲目标题启用文本滚动。"
|
||||
|
||||
@@ -172,7 +172,8 @@
|
||||
"onlySameOutput": true,
|
||||
"monitors": [],
|
||||
"pinnedApps": [],
|
||||
"colorizeIcons": false
|
||||
"colorizeIcons": false,
|
||||
"size": 1
|
||||
},
|
||||
"network": {
|
||||
"wifiEnabled": true
|
||||
|
||||
@@ -293,6 +293,7 @@ Singleton {
|
||||
property string displayMode: "always_visible" // "always_visible", "auto_hide", "exclusive"
|
||||
property real backgroundOpacity: 1.0
|
||||
property real floatingRatio: 1.0
|
||||
property real size: 1
|
||||
property bool onlySameOutput: true
|
||||
property list<string> monitors: []
|
||||
// Desktop entry IDs pinned to the dock (e.g., "org.kde.konsole", "firefox.desktop")
|
||||
|
||||
@@ -35,7 +35,10 @@ Item {
|
||||
readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon
|
||||
readonly property string hideMode: (widgetSettings.hideMode !== undefined) ? widgetSettings.hideMode : widgetMetadata.hideMode
|
||||
readonly property string scrollingMode: (widgetSettings.scrollingMode !== undefined) ? widgetSettings.scrollingMode : (widgetMetadata.scrollingMode !== undefined ? widgetMetadata.scrollingMode : "hover")
|
||||
readonly property int widgetWidth: (widgetSettings.width !== undefined) ? widgetSettings.width : Math.max(widgetMetadata.width, screen.width * 0.06)
|
||||
|
||||
// Maximum widget width with user settings support
|
||||
readonly property real maxWidth: (widgetSettings.maxWidth !== undefined) ? widgetSettings.maxWidth : Math.max(widgetMetadata.maxWidth, screen ? screen.width * 0.06 : 0)
|
||||
readonly property bool useFixedWidth: (widgetSettings.useFixedWidth !== undefined) ? widgetSettings.useFixedWidth : widgetMetadata.useFixedWidth
|
||||
|
||||
readonly property bool isVerticalBar: (Settings.data.bar.position === "left" || Settings.data.bar.position === "right")
|
||||
readonly property bool hasFocusedWindow: CompositorService.getFocusedWindow() !== null
|
||||
@@ -43,7 +46,7 @@ Item {
|
||||
readonly property string fallbackIcon: "user-desktop"
|
||||
|
||||
implicitHeight: visible ? (isVerticalBar ? calculatedVerticalDimension() : Style.barHeight) : 0
|
||||
implicitWidth: visible ? (isVerticalBar ? calculatedVerticalDimension() : widgetWidth) : 0
|
||||
implicitWidth: visible ? (isVerticalBar ? calculatedVerticalDimension() : dynamicWidth) : 0
|
||||
|
||||
// "visible": Always Visible, "hidden": Hide When Empty, "transparent": Transparent When Empty
|
||||
visible: hideMode !== "hidden" || hasFocusedWindow
|
||||
@@ -59,6 +62,43 @@ Item {
|
||||
return Math.round((Style.baseWidgetSize - 5) * scaling)
|
||||
}
|
||||
|
||||
function calculateContentWidth() {
|
||||
// Calculate the actual content width based on visible elements
|
||||
var contentWidth = 0
|
||||
var margins = Style.marginS * scaling * 2 // Left and right margins
|
||||
|
||||
// Icon width (if visible)
|
||||
if (showIcon) {
|
||||
contentWidth += 18 * scaling
|
||||
contentWidth += Style.marginS * scaling // Spacing after icon
|
||||
}
|
||||
|
||||
// Text width (use the measured width)
|
||||
contentWidth += fullTitleMetrics.contentWidth
|
||||
|
||||
// Additional small margin for text
|
||||
contentWidth += Style.marginXXS * 2
|
||||
|
||||
// Add container margins
|
||||
contentWidth += margins
|
||||
|
||||
return Math.ceil(contentWidth)
|
||||
}
|
||||
|
||||
// Dynamic width: adapt to content but respect maximum width setting
|
||||
readonly property real dynamicWidth: {
|
||||
// If using fixed width mode, always use maxWidth
|
||||
if (useFixedWidth) {
|
||||
return maxWidth
|
||||
}
|
||||
// Otherwise, adapt to content
|
||||
if (!hasFocusedWindow) {
|
||||
return maxWidth
|
||||
}
|
||||
// Use content width but don't exceed user-set maximum width
|
||||
return Math.min(calculateContentWidth(), maxWidth)
|
||||
}
|
||||
|
||||
function getAppIcon() {
|
||||
try {
|
||||
// Try CompositorService first
|
||||
@@ -117,11 +157,19 @@ Item {
|
||||
visible: root.visible
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: isVerticalBar ? root.width : widgetWidth
|
||||
width: isVerticalBar ? root.width : dynamicWidth
|
||||
height: isVerticalBar ? width : Style.capsuleHeight
|
||||
radius: isVerticalBar ? width / 2 : Style.radiusM
|
||||
color: Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
|
||||
// Smooth width transition
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: Style.animationNormal
|
||||
easing.type: Easing.InOutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: mainContainer
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -38,8 +38,9 @@ Item {
|
||||
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType !== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
|
||||
readonly property string scrollingMode: (widgetSettings.scrollingMode !== undefined) ? widgetSettings.scrollingMode : widgetMetadata.scrollingMode
|
||||
|
||||
// Fixed width - no expansion
|
||||
readonly property real widgetWidth: Math.max(145, screen.width * 0.06)
|
||||
// Maximum widget width with user settings support
|
||||
readonly property real maxWidth: (widgetSettings.maxWidth !== undefined) ? widgetSettings.maxWidth : Math.max(widgetMetadata.maxWidth, screen ? screen.width * 0.06 : 0)
|
||||
readonly property bool useFixedWidth: (widgetSettings.useFixedWidth !== undefined) ? widgetSettings.useFixedWidth : widgetMetadata.useFixedWidth
|
||||
|
||||
readonly property bool hasActivePlayer: MediaService.currentPlayer !== null
|
||||
readonly property string placeholderText: I18n.tr("bar.widget-settings.media-mini.no-active-player")
|
||||
@@ -60,7 +61,7 @@ Item {
|
||||
}
|
||||
|
||||
implicitHeight: visible ? (isVerticalBar ? calculatedVerticalDimension() : Style.barHeight) : 0
|
||||
implicitWidth: visible ? (isVerticalBar ? calculatedVerticalDimension() : widgetWidth) : 0
|
||||
implicitWidth: visible ? (isVerticalBar ? calculatedVerticalDimension() : dynamicWidth) : 0
|
||||
|
||||
// "visible": Always Visible, "hidden": Hide When Empty, "transparent": Transparent When Empty
|
||||
visible: hideMode !== "hidden" || hasActivePlayer
|
||||
@@ -80,6 +81,49 @@ Item {
|
||||
return Math.round((Style.baseWidgetSize - 5) * scaling)
|
||||
}
|
||||
|
||||
function calculateContentWidth() {
|
||||
// Calculate the actual content width based on visible elements
|
||||
var contentWidth = 0
|
||||
var margins = Style.marginS * scaling * 2 // Left and right margins
|
||||
|
||||
// Icon or album art width
|
||||
if (!hasActivePlayer || !showAlbumArt) {
|
||||
// Icon width
|
||||
contentWidth += Style.fontSizeL * scaling
|
||||
} else if (showAlbumArt && hasActivePlayer) {
|
||||
// Album art width
|
||||
contentWidth += 21 * scaling
|
||||
}
|
||||
|
||||
// Spacing between icon/art and text
|
||||
contentWidth += Style.marginS * scaling
|
||||
|
||||
// Text width (use the measured width)
|
||||
contentWidth += fullTitleMetrics.contentWidth
|
||||
|
||||
// Additional small margin for text
|
||||
contentWidth += Style.marginXXS * 2
|
||||
|
||||
// Add container margins
|
||||
contentWidth += margins
|
||||
|
||||
return Math.ceil(contentWidth)
|
||||
}
|
||||
|
||||
// Dynamic width: adapt to content but respect maximum width setting
|
||||
readonly property real dynamicWidth: {
|
||||
// If using fixed width mode, always use maxWidth
|
||||
if (useFixedWidth) {
|
||||
return maxWidth
|
||||
}
|
||||
// Otherwise, adapt to content
|
||||
if (!hasActivePlayer) {
|
||||
return maxWidth
|
||||
}
|
||||
// Use content width but don't exceed user-set maximum width
|
||||
return Math.min(calculateContentWidth(), maxWidth)
|
||||
}
|
||||
|
||||
// A hidden text element to safely measure the full title width
|
||||
NText {
|
||||
id: fullTitleMetrics
|
||||
@@ -95,11 +139,19 @@ Item {
|
||||
visible: root.visible
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: isVerticalBar ? root.width : (widgetWidth)
|
||||
width: isVerticalBar ? root.width : dynamicWidth
|
||||
height: isVerticalBar ? width : Style.capsuleHeight
|
||||
radius: isVerticalBar ? width / 2 : Style.radiusM
|
||||
color: Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
|
||||
// Smooth width transition
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: Style.animationNormal
|
||||
easing.type: Easing.InOutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: mainContainer
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -63,7 +63,7 @@ Variants {
|
||||
readonly property int hideAnimationDuration: Style.animationFast
|
||||
readonly property int showAnimationDuration: Style.animationFast
|
||||
readonly property int peekHeight: 1
|
||||
readonly property int iconSize: 36
|
||||
readonly property int iconSize: Math.round(12 + 24 * (Settings.data.dock.size ?? 1))
|
||||
readonly property int floatingMargin: Settings.data.dock.floatingRatio * Style.marginL
|
||||
|
||||
// Bar detection and positioning properties
|
||||
|
||||
@@ -17,7 +17,8 @@ ColumnLayout {
|
||||
property bool valueShowIcon: widgetData.showIcon !== undefined ? widgetData.showIcon : widgetMetadata.showIcon
|
||||
property string valueHideMode: "hidden" // Default to 'Hide When Empty'
|
||||
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
|
||||
property int valueWidth: widgetData.width !== undefined ? widgetData.width : widgetMetadata.width
|
||||
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
|
||||
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
|
||||
property bool valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
|
||||
|
||||
Component.onCompleted: {
|
||||
@@ -31,7 +32,8 @@ ColumnLayout {
|
||||
settings.hideMode = valueHideMode
|
||||
settings.showIcon = valueShowIcon
|
||||
settings.scrollingMode = valueScrollingMode
|
||||
settings.width = parseInt(widthInput.text) || widgetMetadata.width
|
||||
settings.maxWidth = parseInt(widthInput.text) || widgetMetadata.maxWidth
|
||||
settings.useFixedWidth = valueUseFixedWidth
|
||||
settings.colorizeIcons = valueColorizeIcons
|
||||
return settings
|
||||
}
|
||||
@@ -73,10 +75,18 @@ ColumnLayout {
|
||||
NTextInput {
|
||||
id: widthInput
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.active-window.width.label")
|
||||
description: I18n.tr("bar.widget-settings.active-window.width.description")
|
||||
placeholderText: widgetMetadata.width
|
||||
text: valueWidth
|
||||
label: I18n.tr("bar.widget-settings.active-window.max-width.label")
|
||||
description: I18n.tr("bar.widget-settings.active-window.max-width.description")
|
||||
placeholderText: widgetMetadata.maxWidth
|
||||
text: valueMaxWidth
|
||||
}
|
||||
|
||||
NToggle {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.active-window.use-fixed-width.label")
|
||||
description: I18n.tr("bar.widget-settings.active-window.use-fixed-width.description")
|
||||
checked: valueUseFixedWidth
|
||||
onToggled: checked => valueUseFixedWidth = checked
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
|
||||
@@ -19,6 +19,8 @@ ColumnLayout {
|
||||
property bool valueShowVisualizer: widgetData.showVisualizer !== undefined ? widgetData.showVisualizer : widgetMetadata.showVisualizer
|
||||
property string valueVisualizerType: widgetData.visualizerType || widgetMetadata.visualizerType
|
||||
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
|
||||
property int valueMaxWidth: widgetData.maxWidth !== undefined ? widgetData.maxWidth : widgetMetadata.maxWidth
|
||||
property bool valueUseFixedWidth: widgetData.useFixedWidth !== undefined ? widgetData.useFixedWidth : widgetMetadata.useFixedWidth
|
||||
|
||||
Component.onCompleted: {
|
||||
if (widgetData && widgetData.hideMode !== undefined) {
|
||||
@@ -33,6 +35,8 @@ ColumnLayout {
|
||||
settings.showVisualizer = valueShowVisualizer
|
||||
settings.visualizerType = valueVisualizerType
|
||||
settings.scrollingMode = valueScrollingMode
|
||||
settings.maxWidth = parseInt(widthInput.text) || widgetMetadata.maxWidth
|
||||
settings.useFixedWidth = valueUseFixedWidth
|
||||
return settings
|
||||
}
|
||||
|
||||
@@ -87,6 +91,22 @@ ColumnLayout {
|
||||
minimumWidth: 200
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
id: widthInput
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.media-mini.max-width.label")
|
||||
description: I18n.tr("bar.widget-settings.media-mini.max-width.description")
|
||||
placeholderText: widgetMetadata.maxWidth
|
||||
text: valueMaxWidth
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("bar.widget-settings.media-mini.use-fixed-width.label")
|
||||
description: I18n.tr("bar.widget-settings.media-mini.use-fixed-width.description")
|
||||
checked: valueUseFixedWidth
|
||||
onToggled: checked => valueUseFixedWidth = checked
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.media-mini.scrolling-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.media-mini.scrolling-mode.description")
|
||||
|
||||
@@ -87,6 +87,24 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
NLabel {
|
||||
label: I18n.tr("settings.dock.appearance.icon-size.label")
|
||||
description: I18n.tr("settings.dock.appearance.icon-size.description")
|
||||
}
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 0
|
||||
to: 2
|
||||
stepSize: 0.01
|
||||
value: Settings.data.dock.size
|
||||
onMoved: value => Settings.data.dock.size = value
|
||||
text: Math.floor(Settings.data.dock.size * 100) + "%"
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.dock.monitors.only-same-output.label")
|
||||
description: I18n.tr("settings.dock.monitors.only-same-output.description")
|
||||
|
||||
@@ -44,7 +44,8 @@ Singleton {
|
||||
"hideMode": "hidden",
|
||||
"scrollingMode"// "visible", "hidden", "transparent"
|
||||
: "hover",
|
||||
"width": 145,
|
||||
"maxWidth": 145,
|
||||
"useFixedWidth": false,
|
||||
"colorizeIcons": false
|
||||
},
|
||||
"Battery": {
|
||||
@@ -88,6 +89,8 @@ Singleton {
|
||||
"hideMode": "hidden",
|
||||
"scrollingMode"// "visible", "hidden", "transparent"
|
||||
: "hover",
|
||||
"maxWidth": 145,
|
||||
"useFixedWidth": false,
|
||||
"showAlbumArt": false,
|
||||
"showVisualizer": false,
|
||||
"visualizerType": "linear"
|
||||
|
||||
Reference in New Issue
Block a user