diff --git a/CHANGELOG.md b/CHANGELOG.md index abbddd3..c1b8845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ Notable changes to Syncshell for Omarchy are documented here. +## 0.2.3 - 2026-10-19 + +- qualify Omarchy palette references for compatibility with Omarchy 4.0.5 and + Qt 6.12 +- fix nested submenu dismissal and preserve unsaved folder-sharing selections + during background refreshes + ## 0.2.2 - 2026-10-06 - render unaccepted remote-device names as plain text in Illogical Impulse and diff --git a/README.md b/README.md index 59a5d1d..3de551c 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,8 @@ See [CHANGELOG.md](CHANGELOG.md) for details. | Release | Date | What changed | | ------- | ---------- | ------------------------------------------------------- | | Future | TBD | mature alpha DMS, II, Caelestia, and Waybar adapters | +| 0.2.3 | 2026-10-19 | support Omarchy 4.0.5 and Qt 6.12 palette references | +| | | fix submenu dismissal and preserve sharing selections | | 0.2.2 | 2026-10-06 | secure pending-device dismissal confirmations | | 0.2.1 | 2026-10-05 | render pending device names as plain text in adapters | | 0.2.0 | 2026-10-05 | improve multi-folder navigation, search, and filtering | diff --git a/hosts/omarchy/OmarchyPanel.qml b/hosts/omarchy/OmarchyPanel.qml index 9d542da..eba152e 100644 --- a/hosts/omarchy/OmarchyPanel.qml +++ b/hosts/omarchy/OmarchyPanel.qml @@ -4,6 +4,7 @@ import QtQuick import Quickshell import Quickshell.Io import qs.Commons +import qs.Commons as Commons import qs.Ui import "ui" import "ui/UiConstants.js" as UiConstants @@ -17,8 +18,8 @@ Panel { ipcTarget: moduleName readonly property var syncthing: bar && bar.shell && moduleName ? bar.shell.serviceFor(moduleName) : null - readonly property color foreground: bar ? bar.foreground : Color.foreground - readonly property color urgent: bar ? bar.urgent : Color.urgent + readonly property color foreground: bar ? bar.foreground : Commons.Color.foreground + readonly property color urgent: bar ? bar.urgent : Commons.Color.urgent readonly property color warning: syncthing ? syncthing.warning : ThemePaletteModel.DefaultYellow readonly property color success: syncthing ? syncthing.success : ThemePaletteModel.DefaultGreen readonly property color syncActivityColor: syncthing ? syncthing.syncActivityColor : ThemePaletteModel.DefaultCyan @@ -220,7 +221,7 @@ Panel { if (state === "SYNCING") return warning; if (state === "UNKNOWN") - return Color.muted; + return Commons.Color.muted; if (state === "ERROR") return urgent; return success; diff --git a/hosts/omarchy/controllers/SettingsController.qml b/hosts/omarchy/controllers/SettingsController.qml index 6be1760..e1af49a 100644 --- a/hosts/omarchy/controllers/SettingsController.qml +++ b/hosts/omarchy/controllers/SettingsController.qml @@ -2,6 +2,7 @@ import QtQuick import Quickshell import Quickshell.Io import qs.Commons +import qs.Commons as Commons import "../models/SettingsModel.js" as SettingsModel QtObject { @@ -437,7 +438,7 @@ QtObject { } property Connections themeConnections: Connections { - target: Color + target: Commons.Color function onBackgroundChanged() { root.scheduleThemeRefresh(); } diff --git a/hosts/omarchy/ui/AcceptRemoteDeviceForm.qml b/hosts/omarchy/ui/AcceptRemoteDeviceForm.qml index 94565a5..7601197 100644 --- a/hosts/omarchy/ui/AcceptRemoteDeviceForm.qml +++ b/hosts/omarchy/ui/AcceptRemoteDeviceForm.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -12,9 +13,9 @@ Item { property var device property bool submitting: false property string nameText: "" - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent property string fontFamily: Style.font.family signal canceled diff --git a/hosts/omarchy/ui/AddFolderForm.qml b/hosts/omarchy/ui/AddFolderForm.qml index 60142b5..7d0df13 100644 --- a/hosts/omarchy/ui/AddFolderForm.qml +++ b/hosts/omarchy/ui/AddFolderForm.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -10,9 +11,9 @@ Item { property var controller property var syncthing property bool folderPickerRunning: false - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent required property color warning property string fontFamily: Style.font.family property alias pathText: addPathField.text diff --git a/hosts/omarchy/ui/AddRemoteDeviceForm.qml b/hosts/omarchy/ui/AddRemoteDeviceForm.qml index 9a105fa..1c4d953 100644 --- a/hosts/omarchy/ui/AddRemoteDeviceForm.qml +++ b/hosts/omarchy/ui/AddRemoteDeviceForm.qml @@ -1,6 +1,7 @@ import QtQuick import QtQuick.Controls import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -12,9 +13,9 @@ Item { property string sourceId: "" property string deviceId: "" property string deviceName: "" - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent required property color warning property string fontFamily: Style.font.family readonly property bool popupOpen: sourceSelector.popupOpen diff --git a/hosts/omarchy/ui/BusyButton.qml b/hosts/omarchy/ui/BusyButton.qml index eaf1b49..f355e2e 100644 --- a/hosts/omarchy/ui/BusyButton.qml +++ b/hosts/omarchy/ui/BusyButton.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -16,12 +17,12 @@ Item { property bool bordered: false property bool focusable: false property bool hasCursor: false - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color busyForeground: foreground property color disabledForeground: Qt.darker(foreground, 1.6) - property color tooltipBackground: Color.tooltip.background - property color tooltipForeground: Color.tooltip.text - property color tooltipBorder: Color.tooltip.border + property color tooltipBackground: Commons.Color.tooltip.background + property color tooltipForeground: Commons.Color.tooltip.text + property color tooltipBorder: Commons.Color.tooltip.border property string fontFamily: Style.font.family property real fontSize: Style.font.body property real iconSize: Style.font.icon @@ -88,7 +89,7 @@ Item { visible: !root.interactive color: "transparent" radius: Style.cornerRadius - borderSpec: root.bordered ? Border.controlSpec("normal", root.inertForeground, Color.accent) : Border.none() + borderSpec: root.bordered ? Border.controlSpec("normal", root.inertForeground, Commons.Color.accent) : Border.none() HoverHandler { id: inertHover diff --git a/hosts/omarchy/ui/ChoiceDialog.qml b/hosts/omarchy/ui/ChoiceDialog.qml index 25abc22..9dec85a 100644 --- a/hosts/omarchy/ui/ChoiceDialog.qml +++ b/hosts/omarchy/ui/ChoiceDialog.qml @@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui FocusScope { @@ -16,8 +17,8 @@ FocusScope { property int initialChoice: 0 property string busyText: "Applying Syncthing setting..." property string fontFamily: Style.font.family - readonly property var cardBorderSpec: Border.surfaceSpec("menu", "border", Color.menu.border, Math.max(1, Style.space(1))) - readonly property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", Color.menu.selectedBorder, 0) + readonly property var cardBorderSpec: Border.surfaceSpec("menu", "border", Commons.Color.menu.border, Math.max(1, Style.space(1))) + readonly property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", Commons.Color.menu.selectedBorder, 0) signal actionRequested(int index) @@ -48,7 +49,7 @@ FocusScope { Rectangle { anchors.fill: parent - color: Color.menu.scrim + color: Commons.Color.menu.scrim MouseArea { anchors.fill: parent @@ -59,7 +60,7 @@ FocusScope { height: content.implicitHeight + Style.spacing.panelPadding * 2 anchors.centerIn: parent radius: Style.cornerRadius - color: Color.menu.background + color: Commons.Color.menu.background borderSpec: root.cardBorderSpec MouseArea { @@ -80,7 +81,7 @@ FocusScope { bottomPadding: Style.spacing.sm text: root.message textFormat: Text.PlainText - color: Color.menu.text + color: Commons.Color.menu.text font.family: root.fontFamily font.pixelSize: Style.font.body wrapMode: Text.Wrap @@ -98,7 +99,7 @@ FocusScope { width: content.width height: Math.max(Style.space(40), choiceText.implicitHeight + Style.spacing.md * 2) radius: Style.cornerRadius - color: root.selectedChoice === index ? Color.menu.selectedBackground : "transparent" + color: root.selectedChoice === index ? Commons.Color.menu.selectedBackground : "transparent" borderSpec: root.selectedChoice === index ? root.selectedBorderSpec : Border.none() Text { @@ -109,7 +110,7 @@ FocusScope { anchors.margins: Style.spacing.md text: choiceRow.modelData textFormat: Text.PlainText - color: root.selectedChoice === choiceRow.index ? Color.menu.selectedText : Color.menu.text + color: root.selectedChoice === choiceRow.index ? Commons.Color.menu.selectedText : Commons.Color.menu.text font.family: root.fontFamily font.pixelSize: Style.font.caption wrapMode: Text.Wrap @@ -132,7 +133,7 @@ FocusScope { topPadding: Style.spacing.sm text: root.busyText textFormat: Text.PlainText - color: Util.alpha(Color.menu.text, 0.66) + color: Util.alpha(Commons.Color.menu.text, 0.66) font.family: root.fontFamily font.pixelSize: Style.font.caption horizontalAlignment: Text.AlignRight diff --git a/hosts/omarchy/ui/CompactConfirmDialog.qml b/hosts/omarchy/ui/CompactConfirmDialog.qml index a544ab6..74a6576 100644 --- a/hosts/omarchy/ui/CompactConfirmDialog.qml +++ b/hosts/omarchy/ui/CompactConfirmDialog.qml @@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -15,11 +16,11 @@ Item { property bool confirmFirst: false property bool equalWidthActions: false property bool destructiveConfirmation: true - property color background: Color.background - property color foreground: Color.foreground + property color background: Commons.Color.background + property color foreground: Commons.Color.foreground property color scrim: Util.alpha(background, 0.7) - property color selectedBackground: Util.alpha(Color.foreground, 0.08) - property color selectedText: Color.accent + property color selectedBackground: Util.alpha(Commons.Color.foreground, 0.08) + property color selectedText: Commons.Color.accent property string fontFamily: Style.font.family signal canceled @@ -113,15 +114,15 @@ Item { width: root.equalWidthActions ? (actions.width - actions.spacing) / 2 : Style.space(76) height: Style.spacing.controlHeight - color: actionButton.selected ? (actionButton.destructive ? Util.alpha(Color.urgent, 0.22) : root.selectedBackground) : "transparent" - borderSpec: Border.flat(actionButton.destructive ? (actionButton.selected ? Color.urgent : Util.alpha(Color.urgent, 0.56)) : (actionButton.selected ? root.selectedText : Util.alpha(root.foreground, 0.38)), Style.normalBorderWidth) + color: actionButton.selected ? (actionButton.destructive ? Util.alpha(Commons.Color.urgent, 0.22) : root.selectedBackground) : "transparent" + borderSpec: Border.flat(actionButton.destructive ? (actionButton.selected ? Commons.Color.urgent : Util.alpha(Commons.Color.urgent, 0.56)) : (actionButton.selected ? root.selectedText : Util.alpha(root.foreground, 0.38)), Style.normalBorderWidth) radius: 0 Text { anchors.centerIn: parent text: actionButton.modelData.text textFormat: Text.PlainText - color: actionButton.destructive ? (actionButton.selected ? Color.urgent : root.foreground) : (actionButton.selected ? root.selectedText : root.foreground) + color: actionButton.destructive ? (actionButton.selected ? Commons.Color.urgent : root.foreground) : (actionButton.selected ? root.selectedText : root.foreground) font.family: root.fontFamily font.pixelSize: Style.font.caption } diff --git a/hosts/omarchy/ui/DeviceCard.qml b/hosts/omarchy/ui/DeviceCard.qml index ee14cb6..d6d57c6 100644 --- a/hosts/omarchy/ui/DeviceCard.qml +++ b/hosts/omarchy/ui/DeviceCard.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui BorderSurface { @@ -10,8 +11,8 @@ BorderSurface { property bool mutationBusy: false property bool actionBusy: false property string stateLabel: "DISCONNECTED" - property color stateColor: Color.muted - property color foreground: Color.foreground + property color stateColor: Commons.Color.muted + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) required property color warning property string fontFamily: Style.font.family @@ -33,7 +34,7 @@ BorderSurface { implicitHeight: nameActions.implicitHeight + details.implicitHeight + Style.space(14) color: "transparent" - borderSpec: Border.controlSpec("normal", cardBorderColor, Color.accent) + borderSpec: Border.controlSpec("normal", cardBorderColor, Commons.Color.accent) radius: Style.cornerRadius Row { @@ -95,7 +96,7 @@ BorderSurface { width: implicitWidth height: nameActions.height color: "transparent" - borderSpec: Border.withWidth(Border.controlSpec("normal", root.stateColor, Color.accent), "0 0 1 1") + borderSpec: Border.withWidth(Border.controlSpec("normal", root.stateColor, Commons.Color.accent), "0 0 1 1") radius: 0 Text { diff --git a/hosts/omarchy/ui/DeviceFoldersForm.qml b/hosts/omarchy/ui/DeviceFoldersForm.qml index cb2cc4c..554b7d7 100644 --- a/hosts/omarchy/ui/DeviceFoldersForm.qml +++ b/hosts/omarchy/ui/DeviceFoldersForm.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -10,8 +11,8 @@ Item { property var device property bool submitting: false property var draftFolderIds: [] - property color foreground: Color.foreground - property color urgent: Color.urgent + property color foreground: Commons.Color.foreground + property color urgent: Commons.Color.urgent required property color warning property string fontFamily: Style.font.family readonly property bool popupOpen: folderPicker.popupOpen diff --git a/hosts/omarchy/ui/FolderCard.qml b/hosts/omarchy/ui/FolderCard.qml index 110c992..d4fec24 100644 --- a/hosts/omarchy/ui/FolderCard.qml +++ b/hosts/omarchy/ui/FolderCard.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui BorderSurface { @@ -16,9 +17,9 @@ BorderSurface { property string activityDots: "" property string activityDetail: "" property string activityAction: "" - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent required property color warning required property color success required property color syncColor @@ -40,7 +41,7 @@ BorderSurface { implicitHeight: nameActions.implicitHeight + details.implicitHeight + Style.space(14) color: "transparent" - borderSpec: Border.controlSpec("normal", cardBorderColor, Color.accent) + borderSpec: Border.controlSpec("normal", cardBorderColor, Commons.Color.accent) radius: Style.cornerRadius Row { @@ -102,7 +103,7 @@ BorderSurface { width: implicitWidth height: nameActions.height color: "transparent" - borderSpec: Border.withWidth(Border.controlSpec("normal", root.stateColor, Color.accent), "0 0 1 1") + borderSpec: Border.withWidth(Border.controlSpec("normal", root.stateColor, Commons.Color.accent), "0 0 1 1") radius: 0 Text { diff --git a/hosts/omarchy/ui/FolderOverview.qml b/hosts/omarchy/ui/FolderOverview.qml index d9d33c0..e6abe35 100644 --- a/hosts/omarchy/ui/FolderOverview.qml +++ b/hosts/omarchy/ui/FolderOverview.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Layouts import qs.Commons +import qs.Commons as Commons import qs.Ui Column { @@ -12,9 +13,9 @@ Column { required property Item cardAnchor property Item addTrigger: addFolderButton property var syncthing: null - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent required property color warning required property color success required property color syncColor diff --git a/hosts/omarchy/ui/FolderSharingForm.qml b/hosts/omarchy/ui/FolderSharingForm.qml index 15ca373..0cb06e2 100644 --- a/hosts/omarchy/ui/FolderSharingForm.qml +++ b/hosts/omarchy/ui/FolderSharingForm.qml @@ -1,5 +1,6 @@ import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -7,16 +8,18 @@ Item { property var controller property var syncthing - property color foreground: Color.foreground - property color urgent: Color.urgent + property color foreground: Commons.Color.foreground + property color urgent: Commons.Color.urgent required property color warning property string fontFamily: Style.font.family property var draftDeviceIds: [] + property string draftFolderId: "" property bool submitting: false readonly property var folder: controller ? controller.currentFolderRow : null readonly property bool popupOpen: devicePicker.popupOpen function resetDraft() { + draftFolderId = folder ? String(folder.id || "") : ""; var selected = []; var members = folder && folder.devices ? folder.devices : []; for (var i = 0; i < members.length; i++) { @@ -33,7 +36,7 @@ Item { onVisibleChanged: if (visible) resetDraft() - onFolderChanged: if (visible) + onFolderChanged: if (visible && (folder ? String(folder.id || "") : "") !== draftFolderId) resetDraft() width: parent ? parent.width : implicitWidth diff --git a/hosts/omarchy/ui/FolderViewOptions.qml b/hosts/omarchy/ui/FolderViewOptions.qml index 23538da..d42878a 100644 --- a/hosts/omarchy/ui/FolderViewOptions.qml +++ b/hosts/omarchy/ui/FolderViewOptions.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -11,10 +12,10 @@ Item { required property var controller required property int resultCount required property int totalCount - property color foreground: Color.popups.text - property color background: Color.popups.background - property color popupBorder: Color.popups.border - property color accent: Color.accent + property color foreground: Commons.Color.popups.text + property color background: Commons.Color.popups.background + property color popupBorder: Commons.Color.popups.border + property color accent: Commons.Color.accent property string fontFamily: Style.font.family readonly property bool popupOpen: popup.opened readonly property bool filtersDefault: controller.folderShowReady && controller.folderShowActive && controller.folderShowErrors && controller.folderShowPaused && controller.folderShowUnknown @@ -68,7 +69,7 @@ Item { help: "Put folders needing attention first" } ] - readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth) + readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Commons.Color.popups.border, Style.normalBorderWidth) property int keyboardIndex: 0 signal closed @@ -244,7 +245,7 @@ Item { anchors.verticalCenter: parent.verticalCenter text: "(" + root.resultCount + " of " + root.totalCount + ")" textFormat: Text.PlainText - color: Color.muted + color: Commons.Color.muted font.family: root.fontFamily font.pixelSize: Style.font.caption diff --git a/hosts/omarchy/ui/IdCopyButton.qml b/hosts/omarchy/ui/IdCopyButton.qml index e76c0b1..31753db 100644 --- a/hosts/omarchy/ui/IdCopyButton.qml +++ b/hosts/omarchy/ui/IdCopyButton.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import Quickshell import qs.Commons +import qs.Commons as Commons import "UiConstants.js" as UiConstants Item { @@ -14,7 +15,7 @@ Item { property string helpText: "Copy ID" property string variant: "button" property real size: Style.spacing.controlHeight - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property string fontFamily: Style.font.family property int fontSize: Style.font.caption property int iconSize: Style.font.caption diff --git a/hosts/omarchy/ui/InlineFormHeader.qml b/hosts/omarchy/ui/InlineFormHeader.qml index 1c52ab1..6043fdd 100644 --- a/hosts/omarchy/ui/InlineFormHeader.qml +++ b/hosts/omarchy/ui/InlineFormHeader.qml @@ -1,6 +1,7 @@ import QtQuick import QtQuick.Layouts import qs.Commons +import qs.Commons as Commons import qs.Ui RowLayout { @@ -8,8 +9,8 @@ RowLayout { property string title: "" property string cancelText: "CANCEL" - property color foreground: Color.foreground - property color cancelColor: Color.urgent + property color foreground: Commons.Color.foreground + property color cancelColor: Commons.Color.urgent property string fontFamily: Style.font.family property bool cancelEnabled: true diff --git a/hosts/omarchy/ui/MoreDetails.qml b/hosts/omarchy/ui/MoreDetails.qml index cab6f10..b2d21d2 100644 --- a/hosts/omarchy/ui/MoreDetails.qml +++ b/hosts/omarchy/ui/MoreDetails.qml @@ -4,6 +4,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts import qs.Commons +import qs.Commons as Commons import qs.Ui Column { @@ -11,9 +12,9 @@ Column { property var controller property var syncthing - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent required property color warning required property color success property string fontFamily: Style.font.family diff --git a/hosts/omarchy/ui/PanelStatus.qml b/hosts/omarchy/ui/PanelStatus.qml index 41a6bf8..36b817d 100644 --- a/hosts/omarchy/ui/PanelStatus.qml +++ b/hosts/omarchy/ui/PanelStatus.qml @@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui import "UiConstants.js" as UiConstants @@ -10,8 +11,8 @@ Column { property var controller property var syncthing - property color foreground: Color.foreground - property color urgent: Color.urgent + property color foreground: Commons.Color.foreground + property color urgent: Commons.Color.urgent required property color warning required property color success property string fontFamily: Style.font.family diff --git a/hosts/omarchy/ui/RemoteDevices.qml b/hosts/omarchy/ui/RemoteDevices.qml index 78586bb..480e344 100644 --- a/hosts/omarchy/ui/RemoteDevices.qml +++ b/hosts/omarchy/ui/RemoteDevices.qml @@ -1,6 +1,7 @@ import QtQuick import QtQuick.Layouts import qs.Commons +import qs.Commons as Commons import qs.Ui Column { @@ -9,9 +10,9 @@ Column { property var controller required property Item cardAnchor property var syncthing - property color foreground: Color.foreground + property color foreground: Commons.Color.foreground property color dim: Qt.darker(foreground, 1.5) - property color urgent: Color.urgent + property color urgent: Commons.Color.urgent required property color warning required property color success property string fontFamily: Style.font.family @@ -64,7 +65,7 @@ Column { function deviceStateColor(device) { if (device && device.paused) return warning; - return device && device.connected ? success : Color.muted; + return device && device.connected ? success : Commons.Color.muted; } function deviceStateHelp(device) { diff --git a/hosts/omarchy/ui/SelfRemovalDialog.qml b/hosts/omarchy/ui/SelfRemovalDialog.qml index 3869980..ee718fd 100644 --- a/hosts/omarchy/ui/SelfRemovalDialog.qml +++ b/hosts/omarchy/ui/SelfRemovalDialog.qml @@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui FocusScope { @@ -12,8 +13,8 @@ FocusScope { property string error: "" property int selectedChoice: 2 property string fontFamily: Style.font.family - readonly property var cardBorderSpec: Border.surfaceSpec("menu", "border", Color.menu.border, Math.max(1, Style.space(1))) - readonly property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", Color.menu.selectedBorder, 0) + readonly property var cardBorderSpec: Border.surfaceSpec("menu", "border", Commons.Color.menu.border, Math.max(1, Style.space(1))) + readonly property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", Commons.Color.menu.selectedBorder, 0) signal removeRequested(bool deletePluginSettings) signal canceled @@ -35,14 +36,14 @@ FocusScope { Rectangle { anchors.fill: parent - color: Color.menu.scrim + color: Commons.Color.menu.scrim BorderSurface { width: Math.min(parent.width - Style.spacing.panelPadding * 2, Style.space(480)) height: confirmationColumn.implicitHeight + Style.spacing.panelPadding * 2 anchors.centerIn: parent radius: Style.cornerRadius - color: Color.menu.background + color: Commons.Color.menu.background borderSpec: root.cardBorderSpec Column { @@ -58,7 +59,7 @@ FocusScope { bottomPadding: Style.spacing.sm text: "Remove Syncthing plugin ?" textFormat: Text.PlainText - color: Color.menu.text + color: Commons.Color.menu.text font.family: root.fontFamily font.pixelSize: Style.font.heading font.bold: true @@ -70,7 +71,7 @@ FocusScope { text: root.error textFormat: Text.PlainText wrapMode: Text.Wrap - color: Color.urgent + color: Commons.Color.urgent font.family: root.fontFamily font.pixelSize: Style.font.body } @@ -86,7 +87,7 @@ FocusScope { width: confirmationColumn.width height: Style.space(40) radius: Style.cornerRadius - color: root.selectedChoice === index ? Color.menu.selectedBackground : "transparent" + color: root.selectedChoice === index ? Commons.Color.menu.selectedBackground : "transparent" borderSpec: root.selectedChoice === index ? root.selectedBorderSpec : Border.none() Rectangle { @@ -95,7 +96,7 @@ FocusScope { anchors.right: parent.right anchors.top: parent.top height: Math.max(1, Style.space(1)) - color: Util.alpha(Color.menu.text, 0.18) + color: Util.alpha(Commons.Color.menu.text, 0.18) } Text { @@ -104,7 +105,7 @@ FocusScope { anchors.verticalCenter: parent.verticalCenter text: choiceRow.modelData textFormat: Text.PlainText - color: root.selectedChoice === choiceRow.index ? Color.menu.selectedText : (choiceRow.index === 1 ? Color.urgent : Color.menu.text) + color: root.selectedChoice === choiceRow.index ? Commons.Color.menu.selectedText : (choiceRow.index === 1 ? Commons.Color.urgent : Commons.Color.menu.text) font.family: root.fontFamily font.pixelSize: Style.font.title } diff --git a/hosts/omarchy/ui/SettingsMenu.qml b/hosts/omarchy/ui/SettingsMenu.qml index 8be068e..9338e1e 100644 --- a/hosts/omarchy/ui/SettingsMenu.qml +++ b/hosts/omarchy/ui/SettingsMenu.qml @@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound import QtQuick import qs.Commons +import qs.Commons as Commons import qs.Ui Item { @@ -9,9 +10,9 @@ Item { property int selectedIndex: 0 property string fontFamily: Style.font.family - readonly property color foreground: Color.popups.text - readonly property color selectedBackground: Style.selectedFillFor(foreground, Color.accent, Color.urgent) - readonly property color selectedText: Style.selectedStateColor(foreground, Color.accent, Color.urgent) + readonly property color foreground: Commons.Color.popups.text + readonly property color selectedBackground: Style.selectedFillFor(foreground, Commons.Color.accent, Commons.Color.urgent) + readonly property color selectedText: Style.selectedStateColor(foreground, Commons.Color.accent, Commons.Color.urgent) signal highlightRequested(int index) signal activated(int index) @@ -85,7 +86,7 @@ Item { width: parent.width text: menuRow.modelData.title textFormat: Text.PlainText - color: root.selectedIndex === menuRow.index ? root.selectedText : (menuRow.modelData.dangerous ? Color.urgent : root.foreground) + color: root.selectedIndex === menuRow.index ? root.selectedText : (menuRow.modelData.dangerous ? Commons.Color.urgent : root.foreground) font.family: root.fontFamily font.pixelSize: Style.font.title font.bold: true diff --git a/hosts/omarchy/ui/SideCardMenu.qml b/hosts/omarchy/ui/SideCardMenu.qml index 0e61795..a279f71 100644 --- a/hosts/omarchy/ui/SideCardMenu.qml +++ b/hosts/omarchy/ui/SideCardMenu.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Controls import Quickshell import qs.Commons +import qs.Commons as Commons import qs.Ui Popup { @@ -38,8 +39,13 @@ Popup { } background: BorderSurface { - borderSpec: Border.surfaceSpec("popups", "border", Color.popups.border, Math.max(1, Style.space(2))) - color: Color.popups.background + borderSpec: Border.surfaceSpec("popups", "border", Commons.Color.popups.border, Math.max(1, Style.space(2))) + color: Commons.Color.popups.background radius: Style.cornerRadius + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.AllButtons + } } } diff --git a/hosts/omarchy/ui/SyncshellDropdown.qml b/hosts/omarchy/ui/SyncshellDropdown.qml index 48c9e7e..78ad9b0 100644 --- a/hosts/omarchy/ui/SyncshellDropdown.qml +++ b/hosts/omarchy/ui/SyncshellDropdown.qml @@ -3,11 +3,12 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls import qs.Commons +import qs.Commons as Commons import qs.Ui // Themed single-select dropdown. Trigger row paints with the kit's focus -// chrome; the popup anchors below and uses Color.popups.background + -// Color.popups.border so it reads as a panel surface rather than the +// chrome; the popup anchors below and uses Commons.Color.popups.background + +// Commons.Color.popups.border so it reads as a panel surface rather than the // platform-native ComboBox look. // // `options` accepts either a plain string[] or an array of @@ -32,11 +33,11 @@ Item { return matchesSearch(optionLabel(option), searchField.text); }) : options - property color foreground: Color.popups.text - property color background: Color.popups.background - property color popupBorder: Color.popups.border - property color accent: Color.accent - readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth) + property color foreground: Commons.Color.popups.text + property color background: Commons.Color.popups.background + property color popupBorder: Commons.Color.popups.border + property color accent: Commons.Color.accent + readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Commons.Color.popups.border, Style.normalBorderWidth) property string fontFamily: Style.font.family property int rowHeight: Style.spacing.controlHeight property int popupRowHeight: Style.spacing.popupRowHeight @@ -279,7 +280,7 @@ Item { topPadding: Border.top(root.popupBorderSpec) + Style.spacing.hairline bottomPadding: Border.bottom(root.popupBorderSpec) + Style.spacing.hairline focus: true - closePolicy: Popup.CloseOnPressOutsideParent | ((searchField.activeFocus || root.headerAccessoryOpen) ? 0 : Popup.CloseOnEscape) + closePolicy: Popup.CloseOnPressOutsideParent | (Popup.CloseMultiple || 0) | ((searchField.activeFocus || root.headerAccessoryOpen) ? 0 : Popup.CloseOnEscape) function handleKey(event, editing) { var key = event.text.toLowerCase(); diff --git a/hosts/omarchy/ui/SyncshellMultiSelect.qml b/hosts/omarchy/ui/SyncshellMultiSelect.qml index 1867f26..f931223 100644 --- a/hosts/omarchy/ui/SyncshellMultiSelect.qml +++ b/hosts/omarchy/ui/SyncshellMultiSelect.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls as QQC import qs.Commons +import qs.Commons as Commons import qs.Ui // Searchable multi-select for static Syncshell options. @@ -21,11 +22,11 @@ Item { property string triggerLabel: "" property bool showLabel: true - property color foreground: Color.popups.text - property color background: Color.popups.background - property color popupBorder: Color.popups.border - property color accent: Color.accent - readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth) + property color foreground: Commons.Color.popups.text + property color background: Commons.Color.popups.background + property color popupBorder: Commons.Color.popups.border + property color accent: Commons.Color.accent + readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Commons.Color.popups.border, Style.normalBorderWidth) property string fontFamily: Style.font.family property int rowHeight: Style.spacing.controlHeight property int popupRowHeight: Style.spacing.popupRowHeight @@ -254,7 +255,7 @@ Item { topPadding: Border.top(root.popupBorderSpec) + Style.spacing.hairline bottomPadding: Border.bottom(root.popupBorderSpec) + Style.spacing.hairline focus: true - closePolicy: QQC.Popup.CloseOnEscape | QQC.Popup.CloseOnPressOutsideParent + closePolicy: QQC.Popup.CloseOnEscape | QQC.Popup.CloseOnPressOutsideParent | (QQC.Popup.CloseMultiple || 0) background: BorderSurface { color: root.background diff --git a/hosts/omarchy/ui/SyncshellToolTip.qml b/hosts/omarchy/ui/SyncshellToolTip.qml index 9759a93..df12cca 100644 --- a/hosts/omarchy/ui/SyncshellToolTip.qml +++ b/hosts/omarchy/ui/SyncshellToolTip.qml @@ -1,19 +1,20 @@ import QtQuick import QtQuick.Controls as Controls import qs.Commons +import qs.Commons as Commons import qs.Ui import "UiConstants.js" as UiConstants Controls.ToolTip { id: root - property color tooltipBackground: Color.tooltip.background - property color tooltipForeground: Color.tooltip.text - property color tooltipBorder: Color.tooltip.border + property color tooltipBackground: Commons.Color.tooltip.background + property color tooltipForeground: Commons.Color.tooltip.text + property color tooltipBorder: Commons.Color.tooltip.border property string fontFamily: Style.font.family property int textFormat: Text.PlainText - readonly property var tooltipBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", tooltipBorder, Color.tooltip.border, Math.max(1, Style.normalBorderWidth)) + readonly property var tooltipBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", tooltipBorder, Commons.Color.tooltip.border, Math.max(1, Style.normalBorderWidth)) delay: UiConstants.TOOLTIP_DELAY_MS padding: 0 diff --git a/hosts/omarchy/ui/SyncthingPanelPopup.qml b/hosts/omarchy/ui/SyncthingPanelPopup.qml index 7ad35f2..2115efd 100644 --- a/hosts/omarchy/ui/SyncthingPanelPopup.qml +++ b/hosts/omarchy/ui/SyncthingPanelPopup.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls import qs.Commons +import qs.Commons as Commons import qs.Ui import "UiConstants.js" as UiConstants import "../models/PanelNavigation.js" as PanelNavigation @@ -677,8 +678,8 @@ KeyboardPanel { } confirmText: root.controller.folderConfirmAction === "create" ? "Create and add" : "Yes" cancelText: root.controller.folderConfirmAction === "create" ? "Cancel" : "No" - background: Color.popups.background - foreground: Color.popups.text + background: Commons.Color.popups.background + foreground: Commons.Color.popups.text selectedText: root.controller.folderConfirmAction === "create" ? root.controller.foreground : root.controller.urgent fontFamily: root.controller.fontFamily onCanceled: root.controller.cancelFolderAction() @@ -697,8 +698,8 @@ KeyboardPanel { message: root.controller.deviceConfirmAction === "dismiss" ? "Dismiss pending request from " + root.controller.deviceConfirmName + "?\n\n" + "It can reappear if the device connects again." : "Remove " + root.controller.deviceConfirmName + " from this device?\n\nFolder sharing with it will be " + "removed locally. Local folders and files remain.\n" + "The other device is unchanged." confirmText: "Yes" cancelText: "No" - background: Color.popups.background - foreground: Color.popups.text + background: Commons.Color.popups.background + foreground: Commons.Color.popups.text selectedText: root.controller.urgent fontFamily: root.controller.fontFamily onCanceled: root.controller.cancelDeviceAction() diff --git a/manifest.json b/manifest.json index e05797c..2a01087 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "id": "io.github.ilyazar.syncthing", "name": "Syncthing", - "version": "0.2.2", + "version": "0.2.3", "author": "ilyaZar", "license": "MIT AND MPL-2.0 AND OFL-1.1 AND BSD-3-Clause", "description": "An elegant Syncthing interface with intuitive multi-folder and multi-device management. Includes a redesigned web UI with optional Omarchy theme integration, while retaining support for Syncthing’s original Web UI. Monitor file activity and easily manage folder sharing across machines. Review pending device and folder-sharing invitations. The screenshot shows the modern webUI under the Nord theme (left) and the plugin with open folder addition view (right).", diff --git a/tests/folder-overview.qml b/tests/folder-overview.qml index bfc5adc..7c74729 100644 --- a/tests/folder-overview.qml +++ b/tests/folder-overview.qml @@ -3,6 +3,7 @@ import QtQuick.Window import QtTest import Quickshell import qs.Commons +import qs.Commons as Commons import "../hosts/omarchy" import "../hosts/omarchy/ui" import "../hosts/omarchy/models/PanelModel.js" as PanelModel @@ -218,7 +219,7 @@ ShellRoot { root.check(root.optionByValue(initial, "ready").statusVisible, "selector results retain folder statuses"); root.check(root.optionByValue(initial, "ready").group === "ready" && root.optionByValue(initial, "active").group === "active" && root.optionByValue(initial, "errors").group === "errors" && root.optionByValue(initial, "paused").group === "paused", "badge states map to exclusive groups"); root.check(PanelModel.folderStateGroup("UNKNOWN") === "unknown" && PanelModel.folderStateHelpText("SCAN+SYNC") === "SCAN+SYNC · Rescanning and syncing", "state metadata"); - root.check(String(panel.folderStateColor(null)) === String(Color.muted), "unknown state uses theme muted"); + root.check(String(panel.folderStateColor(null)) === String(Commons.Color.muted), "unknown state uses theme muted"); picker.open(); picker.headerAccessoryItem.toggle(); break; diff --git a/tests/plugin-acceptance.qml b/tests/plugin-acceptance.qml index 5a28671..3f3ae6a 100644 --- a/tests/plugin-acceptance.qml +++ b/tests/plugin-acceptance.qml @@ -2,6 +2,7 @@ import QtQuick import Quickshell import Quickshell.Io import qs.Commons +import qs.Commons as Commons import ".." as Plugin ShellRoot { @@ -23,8 +24,8 @@ ShellRoot { target: "shell" // Use the installed shell's palette entry point rather than file watching. function applyTheme(colorsB64: string, shellB64: string): string { - Color.loadColors(Qt.atob(colorsB64)); - Color.loadShell(Qt.atob(shellB64)); + Commons.Color.loadColors(Qt.atob(colorsB64)); + Commons.Color.loadShell(Qt.atob(shellB64)); Style.scheduleRefresh(); return "ok"; }