mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-09 05:05:27 +00:00
Qt-Scaling: first cleanup pass
This commit is contained in:
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -68,6 +68,6 @@ ColumnLayout {
|
||||
}]
|
||||
currentKey: valueScrollingMode
|
||||
onSelected: key => valueScrollingMode = key
|
||||
minimumWidth: 200 * scaling
|
||||
minimumWidth: 200
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -27,7 +27,7 @@ ColumnLayout {
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.battery.display-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.battery.display-mode.description")
|
||||
minimumWidth: 134 * scaling
|
||||
minimumWidth: 134
|
||||
model: [{
|
||||
"key": "onhover",
|
||||
"name": I18n.tr("options.display-mode.on-hover")
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -25,7 +25,7 @@ ColumnLayout {
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.brightness.display-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.brightness.display-mode.description")
|
||||
minimumWidth: 134 * scaling
|
||||
minimumWidth: 134
|
||||
model: [{
|
||||
"key": "onhover",
|
||||
"name": I18n.tr("options.display-mode.on-hover")
|
||||
|
||||
@@ -7,8 +7,8 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
width: 700 * scaling
|
||||
spacing: Style.marginM
|
||||
width: 700
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -89,8 +89,8 @@ ColumnLayout {
|
||||
currentKey: valueCustomFont
|
||||
placeholder: I18n.tr("bar.widget-settings.clock.custom-font.placeholder")
|
||||
searchPlaceholder: I18n.tr("bar.widget-settings.clock.custom-font.search-placeholder")
|
||||
popupHeight: 420 * scaling
|
||||
minimumWidth: 300 * scaling
|
||||
popupHeight: 420
|
||||
minimumWidth: 300
|
||||
onSelected: function (key) {
|
||||
valueCustomFont = key
|
||||
}
|
||||
@@ -108,12 +108,12 @@ ColumnLayout {
|
||||
RowLayout {
|
||||
id: main
|
||||
|
||||
spacing: Style.marginL * scaling
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: 1 // Equal sizing hint
|
||||
@@ -175,13 +175,13 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.preferredWidth: 320 * scaling
|
||||
Layout.preferredHeight: 160 * scaling // Fixed height instead of fillHeight
|
||||
Layout.preferredWidth: 320
|
||||
Layout.preferredHeight: 160 // Fixed height instead of fillHeight
|
||||
|
||||
color: Color.mSurfaceVariant
|
||||
radius: Style.radiusM * scaling
|
||||
radius: Style.radiusM
|
||||
border.color: Color.mSecondary
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
border.width: Math.max(1, Style.borderS)
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
@@ -190,22 +190,22 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
anchors.centerIn: parent
|
||||
|
||||
ColumnLayout {
|
||||
spacing: -2 * scaling
|
||||
spacing: -2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
// Horizontal
|
||||
Repeater {
|
||||
Layout.topMargin: Style.marginM * scaling
|
||||
Layout.topMargin: Style.marginM
|
||||
model: Qt.locale().toString(now, valueFormatHorizontal.trim()).split("\\n")
|
||||
delegate: NText {
|
||||
visible: text !== ""
|
||||
text: modelData
|
||||
family: valueUseCustomFont && valueCustomFont ? valueCustomFont : Settings.data.ui.fontDefault
|
||||
pointSize: Style.fontSizeM * scaling
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Style.fontWeightBold
|
||||
color: valueUsePrimaryColor ? Color.mPrimary : Color.mOnSurface
|
||||
wrapMode: Text.WordWrap
|
||||
@@ -226,17 +226,17 @@ ColumnLayout {
|
||||
|
||||
// Vertical
|
||||
ColumnLayout {
|
||||
spacing: -2 * scaling
|
||||
spacing: -2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
Repeater {
|
||||
Layout.topMargin: Style.marginM * scaling
|
||||
Layout.topMargin: Style.marginM
|
||||
model: Qt.locale().toString(now, valueFormatVertical.trim()).split(" ")
|
||||
delegate: NText {
|
||||
visible: text !== ""
|
||||
text: modelData
|
||||
family: valueUseCustomFont && valueCustomFont ? valueCustomFont : Settings.data.ui.fontDefault
|
||||
pointSize: Style.fontSizeM * scaling
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Style.fontWeightBold
|
||||
color: valueUsePrimaryColor ? Color.mPrimary : Color.mOnSurface
|
||||
wrapMode: Text.WordWrap
|
||||
@@ -256,13 +256,13 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.topMargin: Style.marginM * scaling
|
||||
Layout.bottomMargin: Style.marginM * scaling
|
||||
Layout.topMargin: Style.marginM
|
||||
Layout.bottomMargin: Style.marginM
|
||||
}
|
||||
|
||||
NDateTimeTokens {
|
||||
Layout.fillWidth: true
|
||||
height: 200 * scaling
|
||||
height: 200
|
||||
|
||||
// Connect to token clicked signal if NDateTimeTokens provides it
|
||||
onTokenClicked: token => root.insertToken(token)
|
||||
|
||||
@@ -8,7 +8,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -41,7 +41,7 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("bar.widget-settings.control-center.icon.label")
|
||||
@@ -52,20 +52,20 @@ ColumnLayout {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
imagePath: valueCustomIconPath
|
||||
visible: valueCustomIconPath !== ""
|
||||
width: Style.fontSizeXL * 2 * scaling
|
||||
height: Style.fontSizeXL * 2 * scaling
|
||||
width: Style.fontSizeXL * 2
|
||||
height: Style.fontSizeXL * 2
|
||||
}
|
||||
|
||||
NIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
icon: valueIcon
|
||||
pointSize: Style.fontSizeXXL * 1.5 * scaling
|
||||
pointSize: Style.fontSizeXXL * 1.5
|
||||
visible: valueIcon !== "" && valueCustomIconPath === ""
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
NButton {
|
||||
enabled: !valueUseDistroLogo
|
||||
text: I18n.tr("bar.widget-settings.control-center.browse-library")
|
||||
|
||||
@@ -8,7 +8,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
property var widgetData: null
|
||||
property var widgetMetadata: null
|
||||
@@ -27,7 +27,7 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("bar.widget-settings.custom-button.icon.label")
|
||||
@@ -37,7 +37,7 @@ ColumnLayout {
|
||||
NIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
icon: valueIcon
|
||||
pointSize: Style.fontSizeXL * scaling
|
||||
pointSize: Style.fontSizeXL
|
||||
visible: valueIcon !== ""
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -25,7 +25,7 @@ ColumnLayout {
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.keyboard-layout.display-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.keyboard-layout.display-mode.description")
|
||||
minimumWidth: 134 * scaling
|
||||
minimumWidth: 134
|
||||
model: [{
|
||||
"key": "onhover",
|
||||
"name": I18n.tr("options.display-mode.on-hover")
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -68,7 +68,7 @@ ColumnLayout {
|
||||
}]
|
||||
currentKey: valueVisualizerType
|
||||
onSelected: key => valueVisualizerType = key
|
||||
minimumWidth: 200 * scaling
|
||||
minimumWidth: 200
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
@@ -86,6 +86,6 @@ ColumnLayout {
|
||||
}]
|
||||
currentKey: valueScrollingMode
|
||||
onSelected: key => valueScrollingMode = key
|
||||
minimumWidth: 200 * scaling
|
||||
minimumWidth: 200
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -25,7 +25,7 @@ ColumnLayout {
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.microphone.display-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.microphone.display-mode.description")
|
||||
minimumWidth: 134 * scaling
|
||||
minimumWidth: 134
|
||||
model: [{
|
||||
"key": "onhover",
|
||||
"name": I18n.tr("options.display-mode.on-hover")
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
|
||||
@@ -25,11 +25,11 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginS * scaling
|
||||
spacing: Style.marginS
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.bar.tray.blacklist.label")
|
||||
@@ -38,7 +38,7 @@ ColumnLayout {
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginS * scaling
|
||||
spacing: Style.marginS
|
||||
|
||||
NTextInput {
|
||||
id: newRuleInput
|
||||
@@ -49,7 +49,7 @@ ColumnLayout {
|
||||
NIconButton {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
icon: "add"
|
||||
baseSize: Style.baseWidgetSize * 0.8 * scaling
|
||||
baseSize: Style.baseWidgetSize * 0.8
|
||||
onClicked: {
|
||||
if (newRuleInput.text.length > 0) {
|
||||
var newRule = newRuleInput.text.trim()
|
||||
@@ -76,30 +76,30 @@ ColumnLayout {
|
||||
// List of current blacklist items
|
||||
ListView {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 150 * scaling
|
||||
Layout.topMargin: Style.marginL * scaling // Increased top margin
|
||||
Layout.preferredHeight: 150
|
||||
Layout.topMargin: Style.marginL // Increased top margin
|
||||
clip: true
|
||||
model: blacklistModel
|
||||
delegate: Item {
|
||||
width: ListView.width
|
||||
height: 40 * scaling
|
||||
height: 40
|
||||
|
||||
Rectangle {
|
||||
id: itemBackground
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginXS * scaling
|
||||
anchors.margins: Style.marginXS
|
||||
color: Color.transparent // Make background transparent
|
||||
border.color: Color.mOutline
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
radius: Style.radiusS * scaling
|
||||
border.width: Math.max(1, Style.borderS)
|
||||
radius: Style.radiusS
|
||||
visible: model.rule !== undefined && model.rule !== "" // Only visible if rule exists
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Style.marginS * scaling
|
||||
anchors.rightMargin: Style.marginS * scaling
|
||||
spacing: Style.marginS * scaling
|
||||
anchors.leftMargin: Style.marginS
|
||||
anchors.rightMargin: Style.marginS
|
||||
spacing: Style.marginS
|
||||
|
||||
NText {
|
||||
text: model.rule
|
||||
@@ -109,10 +109,10 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
width: 16 * scaling
|
||||
height: 16 * scaling
|
||||
width: 16
|
||||
height: 16
|
||||
icon: "close"
|
||||
baseSize: 8 * scaling
|
||||
baseSize: 8
|
||||
colorBg: Color.mSurfaceVariant
|
||||
colorFg: Color.mOnSurface
|
||||
colorBgHover: Color.mError
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -25,7 +25,7 @@ ColumnLayout {
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.volume.display-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.volume.display-mode.description")
|
||||
minimumWidth: 134 * scaling
|
||||
minimumWidth: 134
|
||||
model: [{
|
||||
"key": "onhover",
|
||||
"name": I18n.tr("options.display-mode.on-hover")
|
||||
|
||||
@@ -7,7 +7,7 @@ import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginM * scaling
|
||||
spacing: Style.marginM
|
||||
|
||||
// Properties to receive data from parent
|
||||
property var widgetData: null
|
||||
@@ -37,7 +37,7 @@ ColumnLayout {
|
||||
}]
|
||||
currentKey: widgetData.labelMode || widgetMetadata.labelMode
|
||||
onSelected: key => labelModeCombo.currentKey = key
|
||||
minimumWidth: 200 * scaling
|
||||
minimumWidth: 200
|
||||
}
|
||||
|
||||
NToggle {
|
||||
|
||||
Reference in New Issue
Block a user