Adding blue theme and refactoring styles.xml
This commit is contained in:
@@ -54,7 +54,8 @@ public class GlobalUserPreferences{
|
||||
public enum ColorPreference{
|
||||
PINK,
|
||||
PURPLE,
|
||||
GREEN
|
||||
GREEN,
|
||||
BLUE
|
||||
}
|
||||
|
||||
public enum ThemePreference{
|
||||
|
||||
@@ -679,6 +679,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
pref = GlobalUserPreferences.ColorPreference.GREEN;
|
||||
onColorPreferenceClick(pref);
|
||||
}
|
||||
else if(id==R.id.blue_color) {
|
||||
pref = GlobalUserPreferences.ColorPreference.BLUE;
|
||||
onColorPreferenceClick(pref);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
@@ -694,6 +698,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
case PINK -> R.string.pink_color;
|
||||
case PURPLE -> R.string.purple_color;
|
||||
case GREEN -> R.string.green_color;
|
||||
case BLUE -> R.string.blue_color;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -688,7 +688,16 @@ public class UiUtils{
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Green : R.style.Theme_Mastodon_Dark_Green;
|
||||
});
|
||||
break;
|
||||
|
||||
case BLUE:
|
||||
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||
case AUTO ->
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Blue : R.style.Theme_Mastodon_AutoLightDark_Blue;
|
||||
case LIGHT ->
|
||||
R.style.Theme_Mastodon_Light_Blue;
|
||||
case DARK ->
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Blue : R.style.Theme_Mastodon_Dark_Blue;
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user