Implement a color picker (#124)
* Proper implementation on the color picker. * Disabling the icons for the color picker menu * Adding a green theme * Making the green theme more readable * More polishes over the green theme * Adding blue theme and refactoring styles.xml * Make badged settings icon follow accent colors * Adding an icon to the color picker setting * Fix readability issue on the light blue theme * Adding orange theme, tweaking the blue and green theme * Adding yellow theme * Making it so that the fab follows the theme * Fixing the TrueBlack themes for everything * Make it so that the publish button also follows the theme * Editing some drawable files to make them also follow the theme * Making it so that the boost icon is also following the theme when clicked * Make follow requests icon badge follow the color scheme and also make it that the profile top bar menu also follows the theme. This should be it Co-authored-by: sk <sk22@mailbox.org>
This commit is contained in:
@@ -14,10 +14,11 @@ public class GlobalUserPreferences{
|
||||
public static boolean showInteractionCounts;
|
||||
public static boolean alwaysExpandContentWarnings;
|
||||
public static boolean disableMarquee;
|
||||
public static ThemePreference theme;
|
||||
public static boolean voteButtonForSingleChoice;
|
||||
public static ThemePreference theme;
|
||||
public static ColorPreference color;
|
||||
|
||||
private static SharedPreferences getPrefs(){
|
||||
private static SharedPreferences getPrefs(){
|
||||
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ public class GlobalUserPreferences{
|
||||
disableMarquee=prefs.getBoolean("disableMarquee", false);
|
||||
voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true);
|
||||
theme=ThemePreference.values()[prefs.getInt("theme", 0)];
|
||||
color=ColorPreference.values()[prefs.getInt("color", 0)];
|
||||
}
|
||||
|
||||
public static void save(){
|
||||
@@ -50,12 +52,23 @@ public class GlobalUserPreferences{
|
||||
.putBoolean("alwaysExpandContentWarnings", alwaysExpandContentWarnings)
|
||||
.putBoolean("disableMarquee", disableMarquee)
|
||||
.putInt("theme", theme.ordinal())
|
||||
.putInt("color", color.ordinal())
|
||||
.apply();
|
||||
}
|
||||
|
||||
public enum ColorPreference{
|
||||
PINK,
|
||||
PURPLE,
|
||||
GREEN,
|
||||
BLUE,
|
||||
BROWN,
|
||||
YELLOW
|
||||
}
|
||||
|
||||
public enum ThemePreference{
|
||||
AUTO,
|
||||
LIGHT,
|
||||
DARK
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user