From 755ca63e4d37c1a54db7fc6475152319a4e46ceb Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sun, 28 Jun 2026 20:53:56 +0800
Subject: [PATCH] Freeze 8.1.7 colorful theme tuning

---
 src/Apptag/ContentView.swift |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/Apptag/ContentView.swift b/src/Apptag/ContentView.swift
index 2560bb9..743ec5f 100644
--- a/src/Apptag/ContentView.swift
+++ b/src/Apptag/ContentView.swift
@@ -448,6 +448,8 @@
     @AppStorage("showUncommonAppBubbles") private var showUncommonAppBubbles = AppDefaults.showUncommonAppBubbles
     @AppStorage("hideUsageTips") private var hideUsageTips = AppDefaults.hideUsageTips
     @AppStorage(AppGridTheme.storageKey) private var appGridThemeID = AppDefaults.appGridThemeID
+    @AppStorage(AppGridTheme.deepBlueTuningStorageKey) private var deepBlueThemeTuning = AppGridTheme.deepBlue.defaultColorTuning
+    @AppStorage(AppGridTheme.colorfulTuningStorageKey) private var colorfulThemeTuning = AppGridTheme.colorful.defaultColorTuning
     @AppStorage("useAppKitTagNavigation") private var useAppKitTagNavigation = AppDefaults.useAppKitTagNavigation
     @AppStorage("skipTagRemovalDropConfirm") private var skipTagRemovalDropConfirm = false
     @AppStorage("skipUncategorizedDropConfirm") private var skipUncategorizedDropConfirm = false
@@ -487,6 +489,25 @@
         editPhase == .none
             ? ProEntitlementPolicy.effectiveTheme(for: appGridTheme)
             : .defaultLight
+    }
+
+    private var renderedAppGridThemeTuning: Double? {
+        guard editPhase == .none else { return nil }
+        return ProEntitlementPolicy.effectiveThemeTuning(
+            for: appGridTheme,
+            storedTuning: storedThemeTuning(for: appGridTheme)
+        )
+    }
+
+    private func storedThemeTuning(for theme: AppGridTheme) -> Double? {
+        switch theme {
+        case .deepBlue:
+            return deepBlueThemeTuning
+        case .colorful:
+            return colorfulThemeTuning
+        case .defaultLight, .black, .pink, .purple, .green, .blue:
+            return nil
+        }
     }
 
     private var isSideLayout: Bool {
@@ -992,6 +1013,7 @@
 
     private var appGridBackground: some View {
         let theme = renderedAppGridTheme
+        let tuning = renderedAppGridThemeTuning
         return ZStack {
             if theme.usesVisualEffectBackdrop {
                 VisualEffectView(
@@ -1004,12 +1026,12 @@
             }
             if !theme.isDefaultLight {
                 LinearGradient(
-                    colors: theme.backgroundBaseColors,
+                    colors: theme.backgroundBaseColors(tuning: tuning),
                     startPoint: .topLeading,
                     endPoint: .bottomTrailing
                 )
                 LinearGradient(
-                    colors: theme.backgroundAccentColors,
+                    colors: theme.backgroundAccentColors(tuning: tuning),
                     startPoint: .topTrailing,
                     endPoint: .bottomLeading
                 )

--
Gitblit v1.9.3