CM3: Add support for dark themes

84a66d82d3 added support for light and
dark themes, but dark themes weren't enabled, as diff styles have
to be adjusted to correspond with dark colors.

101a8c4b65 reverted 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:
David Ostrovsky
2014-02-22 11:00:56 +01:00
parent f985847c38
commit 51b373679e
6 changed files with 49 additions and 1 deletions

View File

@@ -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) {