Rename themes

* Change base 'Theme' to 'Tasks'
* Change White to Light
pull/46/merge
Alex Baker 11 years ago
parent e7d629e365
commit bf654a8de4

@ -87,7 +87,7 @@
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/Theme"
android:theme="@style/Tasks"
android:hardwareAccelerated="false"
android:manageSpaceActivity="com.todoroo.astrid.core.OldTaskPreferences">
@ -337,19 +337,19 @@
<activity
android:name="com.todoroo.astrid.core.CustomFilterActivity"
android:theme="@style/Theme.Dialog" />
android:theme="@style/Tasks.Dialog" />
<activity
android:name="com.todoroo.astrid.core.CustomFilterExposer$DeleteActivity"
android:theme="@style/Theme.FullTransparent" />
android:theme="@style/Tasks.FullTransparent" />
<activity
android:name="com.todoroo.astrid.tags.TagFilterExposer$DeleteTagActivity"
android:theme="@style/Theme.FullTransparent" />
android:theme="@style/Tasks.FullTransparent" />
<activity
android:name="com.todoroo.astrid.tags.TagFilterExposer$RenameTagActivity"
android:theme="@style/Theme.FullTransparent" />
android:theme="@style/Tasks.FullTransparent" />
<!-- alarms -->
<receiver android:name="com.todoroo.astrid.alarms.AlarmTaskRepeatListener">
@ -369,7 +369,7 @@
<!-- actfm -->
<activity
android:name="com.todoroo.astrid.actfm.ActFmGoogleAuthActivity"
android:theme="@style/Theme"
android:theme="@style/Tasks"
android:configChanges="orientation|keyboardHidden" />
<activity
@ -379,7 +379,7 @@
<activity
android:name="com.todoroo.astrid.actfm.TagSettingsActivityTablet"
android:windowSoftInputMode="stateHidden"
android:theme="@style/Theme.Dialog" />
android:theme="@style/Tasks.Dialog" />
<activity
android:name="com.todoroo.astrid.actfm.CommentsActivity"
@ -389,7 +389,7 @@
<activity
android:name="com.todoroo.astrid.gtasks.GtasksListFragment"
android:windowSoftInputMode="stateHidden|adjustResize"
android:theme="@style/Theme">
android:theme="@style/Tasks">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
@ -398,7 +398,7 @@
<activity
android:name="com.todoroo.astrid.gtasks.auth.GtasksLoginActivity"
android:theme="@style/Theme"
android:theme="@style/Tasks"
android:configChanges="orientation|keyboardHidden" />
<receiver android:name="com.todoroo.astrid.gtasks.GtasksCustomFilterCriteriaExposer">

@ -118,7 +118,7 @@ public class TagSettingsActivity extends SherlockFragmentActivity {
} else {
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar();
if(ThemeService.getTheme() == R.style.Theme) {
if(ThemeService.getTheme() == R.style.Tasks) {
actionBar.setLogo(R.drawable.ic_action_save_light);
} else {
actionBar.setLogo(R.drawable.ic_action_save);

@ -23,7 +23,7 @@ public class TaskEditActivity extends AstridActivity {
protected void onCreate(Bundle savedInstanceState) {
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar();
if(ThemeService.getTheme() == R.style.Theme) {
if(ThemeService.getTheme() == R.style.Tasks) {
actionBar.setLogo(R.drawable.ic_action_save_light);
} else {
actionBar.setLogo(R.drawable.ic_action_save);

@ -54,18 +54,18 @@ public class ThemeService {
private static int getStyleForSetting(String setting) {
if(THEME_BLACK.equals(setting)) {
return R.style.Theme;
return R.style.Tasks;
} else {
return R.style.Theme_White;
return R.style.Tasks_Light;
}
}
public static int getThemeColor() {
int theme = getTheme();
switch(theme) {
case R.style.Theme:
case R.style.Tasks:
return R.color.blue_theme_color;
case R.style.Theme_White:
case R.style.Tasks_Light:
default:
return R.color.dark_blue_theme_color;
}
@ -75,7 +75,7 @@ public class ThemeService {
boolean ics = AndroidUtilities.getSdkVersion() >= 14;
int themeSetting = getTheme();
int theme;
if (themeSetting == R.style.Theme) {
if (themeSetting == R.style.Tasks) {
if (ics) {
theme = R.style.TEA_Dialog_ICS;
} else {
@ -83,9 +83,9 @@ public class ThemeService {
}
} else {
if (ics) {
theme = R.style.TEA_Dialog_White_ICS;
theme = R.style.TEA_Dialog_Light_ICS;
} else {
theme = R.style.TEA_Dialog_White;
theme = R.style.TEA_Dialog_Light;
}
}
return theme;
@ -94,10 +94,10 @@ public class ThemeService {
public static int getDialogTheme() {
int themeSetting = getTheme();
int theme;
if (themeSetting == R.style.Theme) {
theme = R.style.Theme_Dialog;
if (themeSetting == R.style.Tasks) {
theme = R.style.Tasks_Dialog;
} else {
theme = R.style.Theme_Dialog_White;
theme = R.style.Tasks_Dialog_Light;
}
return theme;
}
@ -105,7 +105,7 @@ public class ThemeService {
public static int getDialogTextColor() {
if (AndroidUtilities.getSdkVersion() >= 11) {
int theme = getTheme();
if (theme == R.style.Theme) {
if (theme == R.style.Tasks) {
return android.R.color.white;
} else {
return android.R.color.black;
@ -146,7 +146,7 @@ public class ThemeService {
public static int getDrawable(int lightDrawable, int alter) {
int theme = getTheme();
boolean darkTheme = theme == R.style.Theme;
boolean darkTheme = theme == R.style.Tasks;
switch(alter) {
case FLAG_FORCE_DARK:
darkTheme = true;
@ -205,12 +205,12 @@ public class ThemeService {
return lightDrawable;
}
public static int getDarkVsLight(int resForWhite, int resForDark) {
public static int getDarkVsLight(int resForLight, int resForDark) {
int theme = getTheme();
if (theme == R.style.Theme) {
if (theme == R.style.Tasks) {
return resForDark;
} else {
return resForWhite;
return resForLight;
}
}
public static int getTaskEditDrawable(int regularDrawable, int lightBlueDrawable) {

@ -310,7 +310,7 @@ public class TasksWidget extends AppWidgetProvider {
private boolean isDarkTheme() {
int theme = ThemeService.getWidgetTheme();
return theme == R.style.Theme;
return theme == R.style.Tasks;
}
/**

@ -8,7 +8,7 @@
<!-- ========================================================== General -->
<style name="Theme" parent="@style/Theme.Sherlock">
<style name="Tasks" parent="@style/Theme.Sherlock">
<item name="android:windowBackground">@null</item>
<item name="asContentBackground">@android:color/black</item>
<item name="asTextColor">#ffffff</item>
@ -61,7 +61,7 @@
<item name="android:src">@drawable/ic_action_overflow_light</item>
</style>
<style name="Theme.White" parent="@style/Theme.Sherlock.Light">
<style name="Tasks.Light" parent="@style/Theme.Sherlock.Light">
<item name="asContentBackground">@android:color/white</item>
<item name="asEditBackground">#e5e5e5</item>
<item name="asTextColor">#000000</item>
@ -86,28 +86,28 @@
<item name="drawer_background">#efefef</item>
<item name="drawer_text">#000</item>
<!-- actionbar-styling -->
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White</item>
<item name="android:actionOverflowButtonStyle">@style/AstridOverflowStyle.White</item>
<item name="actionOverflowButtonStyle">@style/AstridOverflowStyle.White</item>
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Light</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Light</item>
<item name="android:actionOverflowButtonStyle">@style/AstridOverflowStyle.Light</item>
<item name="actionOverflowButtonStyle">@style/AstridOverflowStyle.Light</item>
</style>
<style name="AstridV11ActionBarStyle.White">
<style name="AstridV11ActionBarStyle.Light">
<item name="android:displayOptions">showHome|showTitle</item>
<item name="android:background">@drawable/header_day_blue</item>
</style>
<style name="AstridActionBarStyle.White">
<style name="AstridActionBarStyle.Light">
<item name="displayOptions">showHome|showTitle</item>
<item name="background">@drawable/header_day_blue</item>
</style>
<style name="AstridOverflowStyle.White" parent="Widget.Sherlock.ActionButton.Overflow">
<style name="AstridOverflowStyle.Light" parent="Widget.Sherlock.ActionButton.Overflow">
<item name="android:src">@drawable/ic_action_overflow</item>
</style>
<style name="Theme.FullTransparent" parent="@style/Theme.Sherlock">
<style name="Tasks.FullTransparent" parent="@style/Theme.Sherlock">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
@ -115,7 +115,7 @@
<item name="android:windowIsFloating">true</item>
</style>
<style name="Theme.Dialog" parent="@android:style/Theme.Dialog">
<style name="Tasks.Dialog" parent="@android:style/Theme.Dialog">
<!--<item name="android:windowBackground">@null</item>-->
<item name="asContentBackground">@android:color/black</item>
<item name="asTextColor">#ffffffff</item>
@ -158,27 +158,27 @@
<item name="displayOptions">showHome|showTitle</item>
</style>
<style name="Theme.Dialog.White">
<style name="Tasks.Dialog.Light">
<item name="asContentBackground">@android:color/white</item>
<item name="asTextColor">#ff000000</item>
<item name="asDetailsColor">#ff6666aa</item>
<item name="asDueDateColor">#878787</item>
<item name="asFilterHeaderColor">#ffffff</item>
<!-- actionbar-styling -->
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Dialog.White</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Dialog.White</item>
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Dialog.Light</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Dialog.Light</item>
<item name="asEditBackground">#dddddd</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_white</item>
<item name="asThemeTextColor">@color/blue_theme_color</item>
</style>
<style name="AstridV11ActionBarStyle.Dialog.White">
<style name="AstridV11ActionBarStyle.Dialog.Light">
<item name="android:background">@android:color/white</item>
<item name="android:displayOptions">showHome|showTitle</item>
</style>
<style name="AstridActionBarStyle.Dialog.White">
<style name="AstridActionBarStyle.Dialog.Light">
<item name="background">@android:color/white</item>
<item name="displayOptions">showHome|showTitle</item>
</style>
@ -294,11 +294,11 @@
<item name="android:textSize">18sp</item>
</style>
<style name="Theme.WhenDialog">
<style name="Tasks.WhenDialog">
<item name="android:windowAnimationStyle">@style/TEA_WhenDialog_Anim</item>
</style>
<style name="Theme.White.WhenDialog">
<style name="Tasks.Light.WhenDialog">
<item name="android:windowAnimationStyle">@style/TEA_WhenDialog_Anim</item>
</style>
@ -318,7 +318,7 @@
<item name="asTextColor">#ffffff</item>
</style>
<style name="TEA_Dialog.White">
<style name="TEA_Dialog.Light">
<item name="android:windowBackground">@drawable/dialog_full_holo_light</item>
<item name="asTextColor">#000000</item>
</style>
@ -333,7 +333,7 @@
<item name="asTextColor">#ffffff</item>
</style>
<style name="TEA_Dialog_White_ICS" parent="@android:style/Theme.Holo.Light.Dialog">
<style name="TEA_Dialog_Light_ICS" parent="@android:style/Theme.Holo.Light.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowTitleStyle">@style/TEA_DialogWindowTitle</item>
<item name="android:windowIsFloating">true</item>

Loading…
Cancel
Save