Skip to content

Commit 6bd0333

Browse files
committed
fix: 修复次要主题色(暗色模式)相关问题 #1308
1 parent fd3382d commit 6bd0333

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

FCL/src/main/java/com/tungsten/fcl/ui/setting/LauncherSettingPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public void onNegative(int initColor) {
393393
dialog.show();
394394
}
395395
if (v == theme2) {
396-
FCLColorPickerDialog dialog = new FCLColorPickerDialog(getContext(), ThemeEngine.getInstance().getTheme().getColor2(), new FCLColorPickerDialog.Listener() {
396+
FCLColorPickerDialog dialog = new FCLColorPickerDialog(getContext(), ThemeEngine.getInstance().getTheme()._getColor2(), new FCLColorPickerDialog.Listener() {
397397
@Override
398398
public void onColorChanged(int color) {
399399
ThemeEngine.getInstance().applyColor2(color);

FCLLibrary/src/main/java/com/tungsten/fcllibrary/component/theme/Theme.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ public int getColor2() {
6767
return isNightMode ? color2Dark.get() : color2.get();
6868
}
6969

70+
public int _getColor2() {
71+
return color2.get();
72+
}
7073
public int getColor2Dark() {
7174
return color2Dark.get();
7275
}
@@ -221,7 +224,7 @@ public static void saveTheme(Context context, Theme theme) {
221224
sharedPreferences = context.getSharedPreferences("theme", MODE_PRIVATE);
222225
editor = sharedPreferences.edit();
223226
editor.putInt("theme_color", theme.getColor());
224-
editor.putInt("theme_color2", theme.getColor2());
227+
editor.putInt("theme_color2", theme._getColor2());
225228
editor.putInt("theme_color2_dark", theme.getColor2Dark());
226229
editor.putBoolean("fullscreen", theme.isFullscreen());
227230
editor.putInt("animation_speed", theme.getAnimationSpeed());

0 commit comments

Comments
 (0)