Autoformatting
This commit is contained in:
parent
8b6c7632af
commit
af0f4818d8
8 changed files with 309 additions and 325 deletions
|
|
@ -21,15 +21,13 @@ Rectangle {
|
||||||
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
||||||
|
|
||||||
function onLoaded() {
|
function onLoaded() {
|
||||||
// When the widget is fully initialized with its props
|
// When the widget is fully initialized with its props set the screen for the trayMenu
|
||||||
// set the screen for the trayMenu
|
|
||||||
if (trayMenu.item) {
|
if (trayMenu.item) {
|
||||||
trayMenu.item.screen = screen
|
trayMenu.item.screen = screen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visible: SystemTray.items.values.length > 0
|
visible: SystemTray.items.values.length > 0
|
||||||
// Changed: The binding now refers to 'trayFlow'
|
|
||||||
implicitWidth: isVertical ? Math.round(Style.capsuleHeight * scaling) : (trayFlow.implicitWidth + Style.marginS * scaling * 2)
|
implicitWidth: isVertical ? Math.round(Style.capsuleHeight * scaling) : (trayFlow.implicitWidth + Style.marginS * scaling * 2)
|
||||||
implicitHeight: isVertical ? (trayFlow.implicitHeight + Style.marginS * scaling * 2) : Math.round(Style.capsuleHeight * scaling)
|
implicitHeight: isVertical ? (trayFlow.implicitHeight + Style.marginS * scaling * 2) : Math.round(Style.capsuleHeight * scaling)
|
||||||
radius: Math.round(Style.radiusM * scaling)
|
radius: Math.round(Style.radiusM * scaling)
|
||||||
|
|
@ -41,8 +39,6 @@ Rectangle {
|
||||||
id: trayFlow
|
id: trayFlow
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
|
|
||||||
// The key change: Dynamically set the flow direction
|
|
||||||
flow: isVertical ? Flow.TopToBottom : Flow.LeftToRight
|
flow: isVertical ? Flow.TopToBottom : Flow.LeftToRight
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ ColumnLayout {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
// Versions
|
// Versions
|
||||||
GridLayout {
|
GridLayout {
|
||||||
columns: 2
|
columns: 2
|
||||||
|
|
@ -115,7 +114,6 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
// Helper functions to update arrays immutably
|
// Helper functions to update arrays immutably
|
||||||
function addMonitor(list, name) {
|
function addMonitor(list, name) {
|
||||||
const arr = (list || []).slice()
|
const arr = (list || []).slice()
|
||||||
|
|
@ -46,7 +45,6 @@ ColumnLayout {
|
||||||
description: "Configure bar appearance and positioning."
|
description: "Configure bar appearance and positioning."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
NComboBox {
|
NComboBox {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -190,7 +188,6 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginXL * scaling
|
Layout.topMargin: Style.marginXL * scaling
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Cache for scheme JSON (can be flat or {dark, light})
|
// Cache for scheme JSON (can be flat or {dark, light})
|
||||||
property var schemeColorsCache: ({})
|
property var schemeColorsCache: ({})
|
||||||
|
|
||||||
|
|
@ -106,7 +104,6 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Main Toggles - Dark Mode / Matugen
|
// Main Toggles - Dark Mode / Matugen
|
||||||
NHeader {
|
NHeader {
|
||||||
label: "Behavior"
|
label: "Behavior"
|
||||||
|
|
@ -143,7 +140,6 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginXL * scaling
|
Layout.topMargin: Style.marginXL * scaling
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Helper functions to update arrays immutably
|
// Helper functions to update arrays immutably
|
||||||
function addMonitor(list, name) {
|
function addMonitor(list, name) {
|
||||||
const arr = (list || []).slice()
|
const arr = (list || []).slice()
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ ColumnLayout {
|
||||||
onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked
|
onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NDivider {
|
NDivider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Style.marginXL * scaling
|
Layout.topMargin: Style.marginXL * scaling
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue