CM3: Add support for dark themes
84a66d82d3added support for light and dark themes, but dark themes weren't enabled, as diff styles have to be adjusted to correspond with dark colors.101a8c4b65reverted the preparation for dark themes support. This change enables support for subset of dark themes and switch dynamicaly the diff styles to dark colors, when dark theme was selected. Change-Id: Ic220baf8f19366c04520b61e893a0d11912805ef
This commit is contained in:
@@ -56,10 +56,26 @@ public class AccountDiffPreference {
|
||||
}
|
||||
|
||||
public static enum Theme {
|
||||
// Light themes
|
||||
DEFAULT,
|
||||
ECLIPSE,
|
||||
ELEGANT,
|
||||
NEAT,
|
||||
// Dark themes
|
||||
MIDNIGHT,
|
||||
NIGHT,
|
||||
TWILIGHT;
|
||||
|
||||
public boolean isDark() {
|
||||
switch (this) {
|
||||
case MIDNIGHT:
|
||||
case NIGHT:
|
||||
case TWILIGHT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static AccountDiffPreference createDefault(Account.Id accountId) {
|
||||
|
||||
Reference in New Issue
Block a user