Adding yellow theme
This commit is contained in:
@@ -56,7 +56,8 @@ public class GlobalUserPreferences{
|
||||
PURPLE,
|
||||
GREEN,
|
||||
BLUE,
|
||||
ORANGE
|
||||
ORANGE,
|
||||
YELLOW
|
||||
}
|
||||
|
||||
public enum ThemePreference{
|
||||
|
||||
@@ -689,6 +689,10 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
pref = GlobalUserPreferences.ColorPreference.ORANGE;
|
||||
onColorPreferenceClick(pref);
|
||||
}
|
||||
else if(id==R.id.yellow_color) {
|
||||
pref = GlobalUserPreferences.ColorPreference.YELLOW;
|
||||
onColorPreferenceClick(pref);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
@@ -707,6 +711,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
|
||||
case GREEN -> R.string.green_color;
|
||||
case BLUE -> R.string.blue_color;
|
||||
case ORANGE -> R.string.orange_color;
|
||||
case YELLOW -> R.string.yellow_color;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,6 +708,16 @@ public class UiUtils{
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Orange : R.style.Theme_Mastodon_Dark_Orange;
|
||||
});
|
||||
break;
|
||||
case YELLOW:
|
||||
context.setTheme(switch(GlobalUserPreferences.theme){
|
||||
case AUTO ->
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_AutoLightDark_TrueBlack_Yellow : R.style.Theme_Mastodon_AutoLightDark_Yellow;
|
||||
case LIGHT ->
|
||||
R.style.Theme_Mastodon_Light_Yellow;
|
||||
case DARK ->
|
||||
GlobalUserPreferences.trueBlackTheme ? R.style.Theme_Mastodon_Dark_TrueBlack_Yellow : R.style.Theme_Mastodon_Dark_Yellow;
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user