From 9abd2554308521c72bd0c3b60f6e7f5e7a129a8b Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Mon, 18 May 2026 16:42:50 +0800
Subject: [PATCH] Fix built-in app grouping and bubble hover settings
---
Apptag/PreferencesView.swift | 46 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/Apptag/PreferencesView.swift b/Apptag/PreferencesView.swift
index cd28edb..2ed9218 100644
--- a/Apptag/PreferencesView.swift
+++ b/Apptag/PreferencesView.swift
@@ -219,6 +219,25 @@
return FileManager.default.fileExists(atPath: path)
}
+ private func bubbleScopeOption(
+ _ title: String,
+ isSelected: Bool,
+ action: @escaping () -> Void
+ ) -> some View {
+ Button(action: action) {
+ HStack(spacing: 6) {
+ Image(systemName: isSelected ? "largecircle.fill.circle" : "circle")
+ .font(.system(size: 13, weight: .medium))
+ .frame(width: 16, height: 16)
+ Text(title)
+ .font(.system(size: 13, weight: .medium))
+ }
+ .foregroundStyle(isSelected ? Color.accentColor : Color.primary)
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ }
+
private func syncSelectedLanguage() {
let code = L10n.currentCode
guard selectedLanguage != code else { return }
@@ -580,15 +599,28 @@
Spacer(minLength: 22)
- VStack(alignment: .leading, spacing: 5) {
- Toggle(tr("settings.uncommonBubble"), isOn: $showUncommonAppBubbles)
+ HStack(alignment: .center, spacing: 14) {
+ Text(tr("settings.bubbleDisplayScope"))
.font(.system(size: 13, weight: .medium))
- Text(tr("settings.uncommonBubbleDesc"))
- .font(.caption)
- .foregroundStyle(.secondary)
- .fixedSize(horizontal: false, vertical: true)
+ .frame(width: 190, alignment: .trailing)
+
+ HStack(spacing: 20) {
+ bubbleScopeOption(
+ tr("settings.bubbleAllApps"),
+ isSelected: !showUncommonAppBubbles
+ ) {
+ showUncommonAppBubbles = false
+ }
+ bubbleScopeOption(
+ tr("settings.bubbleUncommonOnly"),
+ isSelected: showUncommonAppBubbles
+ ) {
+ showUncommonAppBubbles = true
+ }
+ }
+ .frame(width: 300, alignment: .leading)
}
- .frame(width: 420, alignment: .leading)
+ .frame(width: 520, alignment: .center)
Spacer(minLength: 18)
}
--
Gitblit v1.9.3