Ariver
2026-05-06 7a55ef704cb2c4a9c67766105cafb9ce13186772
Apptag/ContentView.swift
@@ -212,6 +212,7 @@
    @AppStorage("tagPosition") private var tagPosition = "left"
    @State private var notchHeight: CGFloat = 0
    @AppStorage("displayMode") private var displayMode = "flat"
    @AppStorage("hideAppNames") private var hideAppNames = false
    private var isSideLayout: Bool {
        tagPosition == "left" || tagPosition == "right"
@@ -271,10 +272,10 @@
        if phase != .none {
            NotificationCenter.default.post(name: .apptagEditModeChanged, object: nil, userInfo: ["active": true])
            NSApp.activate(ignoringOtherApps: true)
            // Sync drag order from database when entering edit mode
            if draggedTagNames.isEmpty {
                draggedTagNames = TagEditor.orderedTagNames()
            }
            // Always sync tag list from database when entering edit mode
            let store = TagDatabase.load()
            tagColors = store.tags.mapValues { $0.color }
            draggedTagNames = TagEditor.orderedTagNames()
        }
        editPhase = phase
        if phase == .none {
@@ -382,7 +383,8 @@
                            group: group,
                            onSelectApp: { app in openApp(app) },
                            tagFontSize: tagFontSize,
                            iconSize: iconSize
                            iconSize: iconSize,
                            showNames: !hideAppNames
                        ).id(group.id)
                    }
                }.padding(20)
@@ -445,6 +447,8 @@
                Text(group.name)
                    .font(.system(size: tagFontSize, weight: .semibold))
                    .foregroundStyle(.secondary)
                    .lineLimit(1)
                    .truncationMode(.middle)
                    .padding(.horizontal, 10)
                Rectangle().fill(.secondary.opacity(0.25)).frame(height: 1)
            }
@@ -454,7 +458,7 @@
                spacing: 2
            ) {
                ForEach(group.apps) { app in
                    AppGridItem(app: app, iconSize: iconSize, onSelect: { openApp(app) })
                    AppGridItem(app: app, iconSize: iconSize, showName: !hideAppNames, onSelect: { openApp(app) })
                }
            }
        }