Adding yellow theme

This commit is contained in:
LucasGGamerM
2022-12-04 11:42:41 -03:00
parent 29abf70cec
commit b6178681b0
9 changed files with 119 additions and 1 deletions

View File

@@ -56,7 +56,8 @@ public class GlobalUserPreferences{
PURPLE,
GREEN,
BLUE,
ORANGE
ORANGE,
YELLOW
}
public enum ThemePreference{

View File

@@ -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;
});
}
}

View File

@@ -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;
}
}