mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-03 19:01:50 +00:00
ActiveWindow: implement dynamic width with max width setting
This commit is contained in:
@@ -17,7 +17,7 @@ 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 valueColorizeIcons: widgetData.colorizeIcons !== undefined ? widgetData.colorizeIcons : widgetMetadata.colorizeIcons
|
||||
|
||||
Component.onCompleted: {
|
||||
@@ -31,7 +31,7 @@ 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.colorizeIcons = valueColorizeIcons
|
||||
return settings
|
||||
}
|
||||
@@ -73,10 +73,10 @@ 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
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
|
||||
Reference in New Issue
Block a user