From 74628450fc9032eacaf4eddf166c8c2399579030 Mon Sep 17 00:00:00 2001 From: purian23 Date: Mon, 5 Oct 2026 02:47:03 -0400 Subject: [PATCH] settings: fix the dot behavior card shadowing its own store --- quickshell/Modules/Settings/DankDotTab.qml | 2 +- quickshell/Modules/Settings/Widgets/IslandBehaviorCard.qml | 4 ++-- quickshell/translations/extract_settings_index.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quickshell/Modules/Settings/DankDotTab.qml b/quickshell/Modules/Settings/DankDotTab.qml index b519f7a10..37cb6c496 100644 --- a/quickshell/Modules/Settings/DankDotTab.qml +++ b/quickshell/Modules/Settings/DankDotTab.qml @@ -177,7 +177,7 @@ Item { store: dot keyPrefix: "dot" docked: false - dot: true + isDot: true } IslandNotificationsCard { diff --git a/quickshell/Modules/Settings/Widgets/IslandBehaviorCard.qml b/quickshell/Modules/Settings/Widgets/IslandBehaviorCard.qml index 4a42bca45..feb4bac52 100644 --- a/quickshell/Modules/Settings/Widgets/IslandBehaviorCard.qml +++ b/quickshell/Modules/Settings/Widgets/IslandBehaviorCard.qml @@ -10,7 +10,7 @@ SettingsCard { property bool hosted: false property bool docked: true // A dot's compact face is a circle, so it never shows the media face. - property bool dot: false + property bool isDot: false readonly property var routingValues: ["normal", "always", "last-used"] readonly property var interactionModeValues: ["click", "hybrid"] @@ -169,7 +169,7 @@ SettingsCard { SettingsToggleRow { settingKey: root.keyPrefix + "MediaClockVisible" tags: ["island", "media", "clock", "compact", "time"] - visible: !root.dot + visible: !root.isDot resetStore: root.store resetKeys: ["islandMediaClockVisible"] text: I18n.tr("Keep clock with media", "island settings: clock in media face toggle") diff --git a/quickshell/translations/extract_settings_index.py b/quickshell/translations/extract_settings_index.py index 9df6c5c52..0f44b68bb 100644 --- a/quickshell/translations/extract_settings_index.py +++ b/quickshell/translations/extract_settings_index.py @@ -369,12 +369,12 @@ SHARED_CARD_ROW_PATTERN = re.compile(r"\b(?:Settings\w*Row|Loader)\s*\{") def strip_hidden_rows(card_content, hosted, docked, dot): - """Drop rows the instance hides for good: `visible: !root.hosted` on a hosted page, `visible: root.docked` on an undocked one, `visible: !root.dot` on the dot.""" + """Drop rows the instance hides for good: `visible: !root.hosted` on a hosted page, `visible: root.docked` on an undocked one, `visible: !root.isDot` on the dot.""" result = card_content for match in reversed(list(SHARED_CARD_ROW_PATTERN.finditer(card_content))): block = parse_component_block(card_content, match.start(), "") visible = extract_property(block, "visible") or "" - if (hosted and "!root.hosted" in visible) or (not docked and "root.docked" in visible) or (dot and "!root.dot" in visible): + if (hosted and "!root.hosted" in visible) or (not docked and "root.docked" in visible) or (dot and "!root.isDot" in visible): result = result[: match.start()] + result[match.start() + len(block):] return result @@ -391,7 +391,7 @@ def inline_shared_cards(root_dir, content): prefix = prefix_match.group(1) if prefix_match else "island" hosted = "hosted: true" in instance docked = "docked: false" not in instance - dot = "dot: true" in instance + dot = "isDot: true" in instance card = strip_hidden_rows(card_file.read_text(encoding="utf-8"), hosted, docked, dot) content += "\n" + card.replace('settingKey: root.keyPrefix + "', f'settingKey: "{prefix}') return content