Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

fix: remove unused code

fatDuckd56fd8611719
diff --git a/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs b/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
index cbf129e..fa4e3ab 100644
--- a/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
@@ -400,31 +400,6 @@ public partial class SettingsViewModel(
return;
ApplicationThemeManager.Apply(newValue, updateAccent: false);
- if (newValue == ApplicationTheme.Light)
- {
- // 2. Định nghĩa màu CHỮ ĐEN cứu cánh cho nền vàng Light
- Color textDarkColor = Color.FromRgb(30, 30, 30); // Màu xám đen lịch lãm, không bị sắc quá như đen tuyền
- SolidColorBrush textDarkBrush = new SolidColorBrush(textDarkColor);
- textDarkBrush.Freeze(); // Tối ưu hóa bộ nhớ WPF
-
- // 3. Ghi đè TẬN GỐC tất cả các biến thể chữ trên nền Accent (Cả Color lẫn Brush)
- var appResources = Wpf.Ui.UiApplication.Current.Resources;
-
- // Cập nhật các bản dạng Color
- appResources["TextOnAccentFillColorPrimary"] = textDarkColor;
- appResources["TextOnAccentFillColorSecondary"] = Color.FromArgb(0xCC, 30, 30, 30);
- appResources["TextOnAccentFillColorDisabled"] = Color.FromArgb(0x66, 30, 30, 30);
- appResources["TextOnAccentFillColorSelectedText"] = textDarkColor;
-
- // Cập nhật các bản dạng Brush (Đây là thứ mà XAML thực tế đang liên kết tới)
- appResources["TextOnAccentFillColorPrimaryBrush"] = textDarkBrush;
- appResources["TextOnAccentFillColorSecondaryBrush"] = new SolidColorBrush(Color.FromArgb(0xCC, 30, 30, 30));
- appResources["TextOnAccentFillColorDisabledBrush"] = new SolidColorBrush(Color.FromArgb(0x66, 30, 30, 30));
-
- // Đảm bảo nút bấm trạng thái Default/Hover/Pressed cũng dùng chữ đen trên nền vàng nhạt
- appResources["AccentTextFillColorPrimaryBrush"] = textDarkBrush;
- }
-
_ = SaveConfigAsync(
async () =>
{