Adding a green theme
This commit is contained in:
@@ -53,7 +53,8 @@ public class GlobalUserPreferences{
|
||||
|
||||
public enum ColorPreference{
|
||||
PINK,
|
||||
PURPLE
|
||||
PURPLE,
|
||||
GREEN
|
||||
}
|
||||
|
||||
public enum ThemePreference{
|
||||
|
||||
@@ -675,6 +675,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
pref = GlobalUserPreferences.ColorPreference.PURPLE;
|
||||
onColorPreferenceClick(pref);
|
||||
}
|
||||
else if(id==R.id.green_color) {
|
||||
pref = GlobalUserPreferences.ColorPreference.GREEN;
|
||||
onColorPreferenceClick(pref);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
@@ -689,6 +693,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
button.setText(switch(GlobalUserPreferences.color){
|
||||
case PINK -> R.string.pink_color;
|
||||
case PURPLE -> R.string.purple_color;
|
||||
case GREEN -> R.string.green_color;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,6 +678,17 @@ public class UiUtils{
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Original : R.style.Theme_Mastodon_Dark_Original;
|
||||
});
|
||||
break;
|
||||
case GREEN:
|
||||
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||
case AUTO ->
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Green : R.style.Theme_Mastodon_AutoLightDark_Green;
|
||||
case LIGHT ->
|
||||
R.style.Theme_Mastodon_Light_Green;
|
||||
case DARK ->
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Green : R.style.Theme_Mastodon_Dark_Green;
|
||||
});
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user