From 72b2b9e9175181367b1d6758cdfba215fee8da1e Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Fri, 10 Oct 2025 13:31:02 -0400 Subject: [PATCH] autofmt --- Modules/Dock/DockMenu.qml | 92 +++++++++++++----------- Modules/Settings/Tabs/ColorSchemeTab.qml | 2 +- Services/AppThemeService.qml | 4 +- Services/MatugenTemplates.qml | 16 ++--- 4 files changed, 61 insertions(+), 53 deletions(-) diff --git a/Modules/Dock/DockMenu.qml b/Modules/Dock/DockMenu.qml index b3570bc3..73c3dcf4 100644 --- a/Modules/Dock/DockMenu.qml +++ b/Modules/Dock/DockMenu.qml @@ -40,38 +40,46 @@ PopupWindow { if (isRunning) { // Focus item next.push({ - "icon": "eye", - "text": I18n.tr("dock.menu.focus"), - "action": function() { handleFocus() } - }) + "icon": "eye", + "text": I18n.tr("dock.menu.focus"), + "action": function () { + handleFocus() + } + }) } // Pin/Unpin item next.push({ - "icon": !isPinned ? "pin" : "unpin", - "text": !isPinned ? I18n.tr("dock.menu.pin") : I18n.tr("dock.menu.unpin"), - "action": function() { handlePin() } - }) + "icon": !isPinned ? "pin" : "unpin", + "text": !isPinned ? I18n.tr("dock.menu.pin") : I18n.tr("dock.menu.unpin"), + "action": function () { + handlePin() + } + }) if (isRunning) { // Close item next.push({ - "icon": "close", - "text": I18n.tr("dock.menu.close"), - "action": function() { handleClose() } - }) + "icon": "close", + "text": I18n.tr("dock.menu.close"), + "action": function () { + handleClose() + } + }) } // Create a menu entry for each app-specific action definied in its .desktop file if (typeof DesktopEntries !== 'undefined' && DesktopEntries.byId) { const entry = (DesktopEntries.heuristicLookup) ? DesktopEntries.heuristicLookup(appId) : DesktopEntries.byId(appId) if (entry != null) { - entry.actions.forEach(function(action) { + entry.actions.forEach(function (action) { next.push({ - "icon": "", - "text": action.name, - "action": function() { action.execute() } - }) + "icon": "", + "text": action.name, + "action": function () { + action.execute() + } + }) }) } } @@ -225,34 +233,34 @@ PopupWindow { Repeater { model: root.items - Rectangle { - Layout.fillWidth: true - height: 32 * scaling - color: root.hoveredItem === index ? Color.mTertiary : Color.transparent - radius: Style.radiusXS * scaling + Rectangle { + Layout.fillWidth: true + height: 32 * scaling + color: root.hoveredItem === index ? Color.mTertiary : Color.transparent + radius: Style.radiusXS * scaling - RowLayout { - anchors.left: parent.left - anchors.leftMargin: Style.marginS * scaling - anchors.verticalCenter: parent.verticalCenter - spacing: Style.marginS * scaling + RowLayout { + anchors.left: parent.left + anchors.leftMargin: Style.marginS * scaling + anchors.verticalCenter: parent.verticalCenter + spacing: Style.marginS * scaling - NIcon { - icon: modelData.icon - pointSize: Style.fontSizeL * scaling - color: root.hoveredItem === index ? Color.mOnTertiary : Color.mOnSurfaceVariant - Layout.alignment: Qt.AlignVCenter - } - - NText { - text: modelData.text - pointSize: Style.fontSizeS * scaling - color: root.hoveredItem === index ? Color.mOnTertiary : Color.mOnSurfaceVariant - Layout.alignment: Qt.AlignVCenter - elide: Text.ElideRight + NIcon { + icon: modelData.icon + pointSize: Style.fontSizeL * scaling + color: root.hoveredItem === index ? Color.mOnTertiary : Color.mOnSurfaceVariant + Layout.alignment: Qt.AlignVCenter } - } - } + + NText { + text: modelData.text + pointSize: Style.fontSizeS * scaling + color: root.hoveredItem === index ? Color.mOnTertiary : Color.mOnSurfaceVariant + Layout.alignment: Qt.AlignVCenter + elide: Text.ElideRight + } + } + } } } } diff --git a/Modules/Settings/Tabs/ColorSchemeTab.qml b/Modules/Settings/Tabs/ColorSchemeTab.qml index 43e05da1..d8e8f338 100644 --- a/Modules/Settings/Tabs/ColorSchemeTab.qml +++ b/Modules/Settings/Tabs/ColorSchemeTab.qml @@ -405,7 +405,7 @@ ColumnLayout { AppThemeService.generate() } } - + NCheckbox { label: "KColorScheme" description: I18n.tr("settings.color-scheme.templates.ui.kcolorscheme.description", { diff --git a/Services/AppThemeService.qml b/Services/AppThemeService.qml index c3e60a22..0113216b 100644 --- a/Services/AppThemeService.qml +++ b/Services/AppThemeService.qml @@ -44,8 +44,8 @@ Singleton { "kcolorscheme": { "input": "kcolorscheme.colors", "outputs": [{ - "path": "~/.local/share/color-schemes/noctalia.colors" - }], + "path": "~/.local/share/color-schemes/noctalia.colors" + }] }, "fuzzel": { "input": "fuzzel.conf", diff --git a/Services/MatugenTemplates.qml b/Services/MatugenTemplates.qml index 3bd5072c..c7da9c3c 100644 --- a/Services/MatugenTemplates.qml +++ b/Services/MatugenTemplates.qml @@ -91,14 +91,14 @@ Singleton { "output": "~/.config/qt6ct/colors/noctalia.conf" }], "input": "qtct.conf" - },{ - "name": "kcolorscheme", - "templates":[{ - "version": "kcolorscheme", - "output": "~/.local/share/color-schemes/noctalia.colors" - }], - "input":"kcolorscheme.colors" - },{ + }, { + "name": "kcolorscheme", + "templates": [{ + "version": "kcolorscheme", + "output": "~/.local/share/color-schemes/noctalia.colors" + }], + "input": "kcolorscheme.colors" + }, { "name": "fuzzel", "templates": [{ "version": "fuzzel",