Merge branch 'main' into fix/launcher

This commit is contained in:
lonerorz
2025-10-01 10:11:12 +08:00
committed by GitHub
102 changed files with 1479 additions and 859 deletions
+4 -4
View File
@@ -70,7 +70,7 @@ NBox {
NText {
text: sectionName + " Section"
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
Layout.alignment: Qt.AlignVCenter
@@ -225,7 +225,7 @@ NBox {
NText {
text: modelData.id
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: root.getWidgetColor(modelData)[1]
horizontalAlignment: Text.AlignHCenter
elide: Text.ElideRight
@@ -312,10 +312,10 @@ NBox {
z: 2000
clip: false // Ensure ghost isn't clipped
Text {
NText {
id: ghostText
anchors.centerIn: parent
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mOnPrimary
}
}
@@ -61,7 +61,7 @@ Popup {
text: I18n.tr("system.widget-settings-title", {
"widget": widgetSettings.widgetId
})
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mPrimary
Layout.fillWidth: true
@@ -133,7 +133,8 @@ Popup {
"Spacer": "WidgetSettings/SpacerSettings.qml",
"SystemMonitor": "WidgetSettings/SystemMonitorSettings.qml",
"Volume": "WidgetSettings/VolumeSettings.qml",
"Workspace": "WidgetSettings/WorkspaceSettings.qml"
"Workspace": "WidgetSettings/WorkspaceSettings.qml",
"Taskbar": "WidgetSettings/TaskbarSettings.qml"
}
const source = widgetSettingsMap[widgetId]
@@ -23,7 +23,6 @@ ColumnLayout {
settings.autoHide = valueAutoHide
settings.showIcon = valueShowIcon
settings.scrollingMode = valueScrollingMode
console.log(JSON.stringify(settings))
return settings
}
@@ -182,12 +182,12 @@ ColumnLayout {
// Horizontal
Repeater {
Layout.topMargin: Style.marginM * scaling
model: Qt.formatDateTime(now, valueFormatHorizontal.trim()).split("\\n")
model: Qt.locale().toString(now, valueFormatHorizontal.trim()).split("\\n")
delegate: NText {
visible: text !== ""
text: modelData
font.family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
font.pointSize: Style.fontSizeM * scaling
family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: valueUsePrimaryColor ? Color.mPrimary : Color.mOnSurface
wrapMode: Text.WordWrap
@@ -213,12 +213,12 @@ ColumnLayout {
Repeater {
Layout.topMargin: Style.marginM * scaling
model: Qt.formatDateTime(now, valueFormatVertical.trim()).split(" ")
model: Qt.locale().toString(now, valueFormatVertical.trim()).split(" ")
delegate: NText {
visible: text !== ""
text: modelData
font.family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
font.pointSize: Style.fontSizeM * scaling
family: valueUseMonospacedFont ? Settings.data.ui.fontFixed : Settings.data.ui.fontDefault
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: valueUsePrimaryColor ? Color.mPrimary : Color.mOnSurface
wrapMode: Text.WordWrap
@@ -59,7 +59,7 @@ ColumnLayout {
NIcon {
Layout.alignment: Qt.AlignVCenter
icon: valueIcon
font.pointSize: Style.fontSizeXXL * 1.5 * scaling
pointSize: Style.fontSizeXXL * 1.5 * scaling
visible: valueIcon !== "" && valueCustomIconPath === ""
}
}
@@ -37,7 +37,7 @@ ColumnLayout {
NIcon {
Layout.alignment: Qt.AlignVCenter
icon: valueIcon
font.pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL * scaling
visible: valueIcon !== ""
}
@@ -0,0 +1,43 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qs.Commons
import qs.Widgets
import qs.Services
ColumnLayout {
id: root
spacing: Style.marginM * scaling
// Properties to receive data from parent
property var widgetData: null
property var widgetMetadata: null
// Local state
property bool valueOnlyActiveWorkspaces: widgetData.onlyActiveWorkspaces !== undefined ? widgetData.onlyActiveWorkspaces : widgetMetadata.onlyActiveWorkspaces
property bool valueOnlySameOutput: widgetData.onlySameOutput !== undefined ? widgetData.onlySameOutput : widgetMetadata.onlySameOutput
function saveSettings() {
var settings = Object.assign({}, widgetData || {})
settings.onlySameOutput = valueOnlySameOutput
settings.onlyActiveWorkspaces = valueOnlyActiveWorkspaces
console.log(JSON.stringify(settings))
return settings
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.taskbar.only-same-output.label")
description: I18n.tr("bar.widget-settings.taskbar.only-same-output.description")
checked: root.valueOnlySameOutput
onToggled: checked => root.valueOnlySameOutput = checked
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.taskbar.only-active-workspaces.label")
description: I18n.tr("bar.widget-settings.taskbar.only-active-workspaces.description")
checked: root.valueOnlyActiveWorkspaces
onToggled: checked => root.valueOnlyActiveWorkspaces = checked
}
}
+4 -4
View File
@@ -396,14 +396,14 @@ NPanel {
NIcon {
icon: modelData.icon
color: tabTextColor
font.pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL * scaling
}
// Tab label
NText {
text: I18n.tr(modelData.label)
color: tabTextColor
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
@@ -456,13 +456,13 @@ NPanel {
NIcon {
icon: root.tabsModel[currentTabIndex]?.icon
color: Color.mPrimary
font.pointSize: Style.fontSizeXXL * scaling
pointSize: Style.fontSizeXXL * scaling
}
// Main title
NText {
text: I18n.tr(root.tabsModel[currentTabIndex]?.label) || ""
font.pointSize: Style.fontSizeXL * scaling
pointSize: Style.fontSizeXL * scaling
font.weight: Style.fontWeightBold
color: Color.mPrimary
Layout.fillWidth: true
+3 -3
View File
@@ -91,14 +91,14 @@ ColumnLayout {
NIcon {
icon: "download"
font.pointSize: Style.fontSizeXXL * scaling
pointSize: Style.fontSizeXXL * scaling
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
}
NText {
id: updateText
text: I18n.tr("settings.about.noctalia.download-latest")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
}
}
@@ -200,7 +200,7 @@ ColumnLayout {
NText {
text: (modelData.contributions || 0) + " " + ((modelData.contributions || 0) === 1 ? "commit" : "commits")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: contributorArea.containsMouse ? Color.mOnTertiary : Color.mOnSurface
}
}
+1 -1
View File
@@ -309,7 +309,7 @@ ColumnLayout {
NText {
text: modelData
color: Color.mOnSurface
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: Style.marginS * scaling
}
+2 -2
View File
@@ -140,7 +140,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.bar.appearance.margins.vertical")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
}
@@ -160,7 +160,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.bar.appearance.margins.horizontal")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
}
+2 -2
View File
@@ -261,7 +261,7 @@ ColumnLayout {
var chunks = schemePath.replace(".json", "").split("/")
return chunks[chunks.length - 1]
}
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: getSchemeColor(modelData, "mOnSurface")
Layout.fillWidth: true
@@ -326,7 +326,7 @@ ColumnLayout {
NIcon {
icon: "check"
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSecondary
anchors.centerIn: parent
+18 -22
View File
@@ -126,7 +126,7 @@ ColumnLayout {
// Reset button container
Item {
Layout.preferredWidth: 40 * scaling
Layout.preferredWidth: 30 * scaling
Layout.preferredHeight: 30 * scaling
NIconButton {
@@ -168,13 +168,13 @@ ColumnLayout {
// Empty container to match scale row layout
Item {
Layout.preferredWidth: 40 * scaling
Layout.preferredWidth: 30 * scaling
Layout.preferredHeight: 30 * scaling
// Method text positioned in the button area
NText {
text: brightnessMonitor ? brightnessMonitor.method : ""
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
@@ -186,22 +186,18 @@ ColumnLayout {
}
}
}
// Brightness Step Section
ColumnLayout {
spacing: Style.marginS * scaling
Layout.fillWidth: true
NSpinBox {
Layout.fillWidth: true
label: I18n.tr("settings.display.monitors.brightness-step.label")
description: I18n.tr("settings.display.monitors.brightness-step.description")
minimum: 1
maximum: 50
value: Settings.data.brightness.brightnessStep
stepSize: 1
suffix: "%"
onValueChanged: Settings.data.brightness.brightnessStep = value
}
// Brightness Step
NSpinBox {
Layout.fillWidth: true
label: I18n.tr("settings.display.monitors.brightness-step.label")
description: I18n.tr("settings.display.monitors.brightness-step.description")
minimum: 1
maximum: 50
value: Settings.data.brightness.brightnessStep
stepSize: 1
suffix: "%"
onValueChanged: Settings.data.brightness.brightnessStep = value
}
}
@@ -258,7 +254,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.temperature.night")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignVCenter
}
@@ -280,7 +276,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.temperature.day")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignVCenter
}
@@ -327,7 +323,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.manual-schedule.sunrise")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
}
@@ -345,7 +341,7 @@ ColumnLayout {
NText {
text: I18n.tr("settings.display.night-light.manual-schedule.sunset")
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
color: Color.mOnSurfaceVariant
}
+7
View File
@@ -118,6 +118,13 @@ ColumnLayout {
}
}
NToggle {
label: I18n.tr("settings.dock.monitors.only-same-output.label")
description: I18n.tr("settings.dock.monitors.only-same-output.description")
checked: Settings.data.dock.onlySameOutput
onToggled: checked => Settings.data.dock.onlySameOutput = checked
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL * scaling
+72 -11
View File
@@ -187,6 +187,7 @@ ColumnLayout {
}
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL * scaling
@@ -236,17 +237,77 @@ ColumnLayout {
}
}
NSearchableComboBox {
label: I18n.tr("settings.general.fonts.accent.label")
description: I18n.tr("settings.general.fonts.accent.description")
model: FontService.displayFonts
currentKey: Settings.data.ui.fontBillboard
placeholder: I18n.tr("settings.general.fonts.accent.placeholder")
searchPlaceholder: I18n.tr("settings.general.fonts.accent.search-placeholder")
popupHeight: 320 * scaling
minimumWidth: 300 * scaling
onSelected: function (key) {
Settings.data.ui.fontBillboard = key
ColumnLayout {
NLabel {
label: I18n.tr("settings.general.fonts.default.scale.label")
description: I18n.tr("settings.general.fonts.default.scale.description")
}
RowLayout {
spacing: Style.marginL * scaling
Layout.fillWidth: true
NValueSlider {
Layout.fillWidth: true
from: 0.75
to: 1.25
stepSize: 0.01
value: Settings.data.ui.fontDefaultScale
onMoved: value => Settings.data.ui.fontDefaultScale = value
text: Math.floor(Settings.data.ui.fontDefaultScale * 100) + "%"
}
// Reset button container
Item {
Layout.preferredWidth: 30 * scaling
Layout.preferredHeight: 30 * scaling
NIconButton {
icon: "refresh"
baseSize: Style.baseWidgetSize * 0.9
tooltipText: I18n.tr("settings.general.fonts.reset-scaling")
onClicked: Settings.data.ui.fontDefaultScale = 1.0
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
ColumnLayout {
NLabel {
label: I18n.tr("settings.general.fonts.monospace.scale.label")
description: I18n.tr("settings.general.fonts.monospace.scale.description")
}
RowLayout {
spacing: Style.marginL * scaling
Layout.fillWidth: true
NValueSlider {
Layout.fillWidth: true
from: 0.75
to: 1.25
stepSize: 0.01
value: Settings.data.ui.fontFixedScale
onMoved: value => Settings.data.ui.fontFixedScale = value
text: Math.floor(Settings.data.ui.fontFixedScale * 100) + "%"
}
// Reset button container
Item {
Layout.preferredWidth: 30 * scaling
Layout.preferredHeight: 30 * scaling
NIconButton {
icon: "refresh"
baseSize: Style.baseWidgetSize * 0.9
tooltipText: I18n.tr("settings.general.fonts.reset-scaling")
onClicked: Settings.data.ui.fontFixedScale = 1.0
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
+2 -2
View File
@@ -53,14 +53,14 @@ ColumnLayout {
NText {
text: I18n.tr("settings.launcher.settings.background-opacity.label")
font.pointSize: Style.fontSizeL * scaling
pointSize: Style.fontSizeL * scaling
font.weight: Style.fontWeightBold
color: Color.mOnSurface
}
NText {
text: I18n.tr("settings.launcher.settings.background-opacity.description")
font.pointSize: Style.fontSizeXS * scaling
pointSize: Style.fontSizeXS * scaling
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.fillWidth: true
+1 -1
View File
@@ -46,7 +46,7 @@ ColumnLayout {
"name": LocationService.stableName,
"coordinates": LocationService.displayCoordinates
})
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: Color.mOnSurfaceVariant
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignRight
+2 -2
View File
@@ -77,7 +77,7 @@ ColumnLayout {
text: (modelData.name || "Unknown")
color: Color.mPrimary
font.weight: Style.fontWeightBold
font.pointSize: Style.fontSizeM * scaling
pointSize: Style.fontSizeM * scaling
}
NTextInputButton {
@@ -327,7 +327,7 @@ ColumnLayout {
id: chipLabel
anchors.centerIn: parent
text: parent.label
font.pointSize: Style.fontSizeS * scaling
pointSize: Style.fontSizeS * scaling
color: parent.selected ? Color.mOnPrimary : Color.mOnSurface
}
}