Clean up themes

* Remove transparent, white, white alt themes
* Rename white blue to white
* Remove unused drawables
pull/25/merge
Alex Baker 11 years ago
parent 6689f1f8a1
commit 6b8b672246

@ -179,11 +179,7 @@ public class TagSettingsActivity extends SherlockFragmentActivity {
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar();
if (Preferences.getBoolean(R.string.p_save_and_cancel, false)) {
if (ThemeService.getTheme() == R.style.Theme_White_Alt) {
actionBar.setLogo(R.drawable.ic_menu_save_blue_alt);
} else {
actionBar.setLogo(R.drawable.ic_action_save);
}
actionBar.setLogo(R.drawable.ic_action_save);
} else {
actionBar.setLogo(null);
}

@ -27,11 +27,7 @@ public class TaskEditActivity extends AstridActivity {
ThemeService.applyTheme(this);
ActionBar actionBar = getSupportActionBar();
if (Preferences.getBoolean(R.string.p_save_and_cancel, false)) {
if (ThemeService.getTheme() == R.style.Theme_White_Alt) {
actionBar.setLogo(R.drawable.ic_menu_save_blue_alt);
} else {
actionBar.setLogo(R.drawable.ic_action_save);
}
actionBar.setLogo(R.drawable.ic_action_save);
} else {
actionBar.setLogo(null);
}

@ -55,7 +55,7 @@ public class ThemeService {
if(THEME_BLACK.equals(setting)) {
return R.style.Theme;
} else {
return R.style.Theme_White_Blue;
return R.style.Theme_White;
}
}
@ -64,7 +64,7 @@ public class ThemeService {
switch(theme) {
case R.style.Theme:
return R.color.blue_theme_color;
case R.style.Theme_White_Blue:
case R.style.Theme_White:
default:
return R.color.dark_blue_theme_color;
}
@ -74,7 +74,7 @@ public class ThemeService {
boolean ics = AndroidUtilities.getSdkVersion() >= 14;
int themeSetting = getTheme();
int theme;
if (themeSetting == R.style.Theme || themeSetting == R.style.Theme_Transparent) {
if (themeSetting == R.style.Theme) {
if (ics) {
theme = R.style.TEA_Dialog_ICS;
} else {
@ -93,7 +93,7 @@ public class ThemeService {
public static int getDialogTheme() {
int themeSetting = getTheme();
int theme;
if (themeSetting == R.style.Theme || themeSetting == R.style.Theme_Transparent) {
if (themeSetting == R.style.Theme) {
theme = R.style.Theme_Dialog;
} else {
theme = R.style.Theme_Dialog_White;
@ -104,7 +104,7 @@ public class ThemeService {
public static int getDialogTextColor() {
if (AndroidUtilities.getSdkVersion() >= 11) {
int theme = getTheme();
if (theme == R.style.Theme || theme == R.style.Theme_Transparent) {
if (theme == R.style.Theme) {
return android.R.color.white;
} else {
return android.R.color.black;
@ -169,7 +169,6 @@ public class ThemeService {
return lightDrawable;
}
switch(lightDrawable) {
case R.drawable.ic_action_mic:
return R.drawable.ic_action_mic_light;
@ -188,8 +187,6 @@ public class ThemeService {
return R.drawable.icn_menu_refresh_dark;
case R.drawable.icn_menu_filters:
return R.drawable.icn_menu_filters_dark;
case R.drawable.icn_featured_lists:
return R.drawable.icn_featured_lists_dark;
case R.drawable.icn_menu_sort_by_size:
return R.drawable.icn_menu_sort_by_size_dark;
case R.drawable.icn_menu_search:
@ -198,14 +195,8 @@ public class ThemeService {
return R.drawable.icn_menu_friends_dark;
case R.drawable.icn_menu_lists:
return R.drawable.icn_menu_lists_dark;
case R.drawable.icn_menu_plugins:
return R.drawable.icn_menu_plugins_dark;
case R.drawable.icn_menu_settings:
return R.drawable.icn_menu_settings_dark;
case R.drawable.icn_menu_support:
return R.drawable.icn_menu_support_dark;
case R.drawable.icn_menu_tutorial:
return R.drawable.icn_menu_tutorial_dark;
case R.drawable.filter_assigned:
return R.drawable.filter_assigned_dark;
case R.drawable.filter_calendar:
@ -224,19 +215,19 @@ public class ThemeService {
ContextManager.getResources().getResourceName(lightDrawable));
}
public static int getDarkVsLight(int resForWhite, int resForDark, boolean altIsDark) {
public static int getDarkVsLight(int resForWhite, int resForDark) {
int theme = getTheme();
if (theme == R.style.Theme || (theme == R.style.Theme_White_Alt && altIsDark) || theme == R.style.Theme_TransparentWhite) {
if (theme == R.style.Theme) {
return resForDark;
} else {
return resForWhite;
}
}
public static int getTaskEditDrawable(int regularDrawable, int lightBlueDrawable) {
return getDarkVsLight(regularDrawable, lightBlueDrawable, true);
return getDarkVsLight(regularDrawable, lightBlueDrawable);
}
public static int getTaskEditThemeColor() {
return getDarkVsLight(R.color.task_edit_selected, R.color.blue_theme_color, true);
return getDarkVsLight(R.color.task_edit_selected, R.color.blue_theme_color);
}
}

@ -5,9 +5,6 @@
*/
package com.todoroo.astrid.ui;
import java.util.LinkedList;
import java.util.List;
import android.app.Activity;
import android.util.DisplayMetrics;
import android.view.View;
@ -16,11 +13,15 @@ import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.ToggleButton;
import org.tasks.R;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.helper.TaskEditControlSet;
import com.todoroo.astrid.service.ThemeService;
import org.tasks.R;
import java.util.LinkedList;
import java.util.List;
/**
* Control Set for setting task importance
*
@ -47,7 +48,7 @@ public class ImportanceControlSet extends TaskEditControlSet {
for(CompoundButton b : buttons) {
if(b.getTag() == i) {
b.setChecked(true);
b.setBackgroundResource(ThemeService.getDarkVsLight(R.drawable.importance_background_selected, R.drawable.importance_background_selected_dark, false));
b.setBackgroundResource(ThemeService.getDarkVsLight(R.drawable.importance_background_selected, R.drawable.importance_background_selected_dark));
} else {
b.setChecked(false);
b.setBackgroundResource(0);

@ -314,7 +314,7 @@ public class TasksWidget extends AppWidgetProvider {
private boolean isDarkTheme() {
int theme = ThemeService.getWidgetTheme();
return (theme == R.style.Theme || theme == R.style.Theme_Transparent);
return theme == R.style.Theme;
}
/**
@ -336,19 +336,11 @@ public class TasksWidget extends AppWidgetProvider {
int buttonDrawable;
if (isDarkTheme()) {
layout = (theme == R.style.Theme_Transparent ? R.layout.widget_initialized_dark_transparent : R.layout.widget_initialized_dark);
layout = R.layout.widget_initialized_dark;
titleColor = r.getColor(R.color.widget_text_color_dark);
buttonDrawable = R.drawable.plus_button_blue;
} else if (theme == R.style.Theme_White) {
layout = R.layout.widget_initialized_red;
titleColor = r.getColor(R.color.widget_text_color_light);
buttonDrawable = R.drawable.plus_button_red;
} else if (theme == R.style.Theme_White_Alt) {
layout = R.layout.widget_initialized;
titleColor = r.getColor(R.color.widget_text_color_light);
buttonDrawable = R.drawable.plus_button_blue;
} else {
layout = (theme == R.style.Theme_TransparentWhite ? R.layout.widget_initialized_transparent : R.layout.widget_initialized);
layout = R.layout.widget_initialized;
titleColor = r.getColor(R.color.widget_text_color_light);
buttonDrawable = R.drawable.plus_button_dark_blue;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent">
<LinearLayout
android:id="@+id/widget_header"
android:layout_width="fill_parent"
android:layout_height="39dip"
android:orientation="horizontal"
android:padding="3dp"
android:background="@android:color/transparent">
<TextView
android:id="@+id/widget_title"
android:layout_width="fill_parent"
android:layout_height="39dip"
android:layout_gravity="left|center_vertical"
android:paddingLeft="2dip"
android:textColor="@color/widget_text_color_light"
android:textSize="16sp"
android:textStyle="bold"
android:maxLines="2"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:ellipsize="end" />
<ImageButton
android:id="@+id/widget_button"
android:layout_width="33dip"
android:layout_height="39dip"
android:layout_gravity="right|center_vertical"
android:background="@android:color/transparent"
android:src="@drawable/plus_button_dark_blue"
android:scaleType="fitCenter"/>
</LinearLayout>
<ImageView
android:id="@+id/widget_header_separator"
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="@color/dark_blue_theme_color"/>
<LinearLayout android:id="@+id/taskbody"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent">
<LinearLayout
android:id="@+id/widget_header"
android:layout_width="fill_parent"
android:layout_height="39dip"
android:orientation="horizontal"
android:padding="3dp"
android:background="@color/widget_header_light">
<TextView
android:id="@+id/widget_title"
android:layout_width="fill_parent"
android:layout_height="39dip"
android:layout_gravity="left|center_vertical"
android:paddingLeft="2dip"
android:textColor="@color/widget_text_color_light"
android:textSize="16sp"
android:textStyle="bold"
android:maxLines="2"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:ellipsize="end" />
<ImageButton
android:id="@+id/widget_button"
android:layout_width="33dip"
android:layout_height="39dip"
android:layout_gravity="right|center_vertical"
android:background="@android:color/transparent"
android:src="@drawable/plus_button_dark_blue"
android:scaleType="fitCenter"/>
</LinearLayout>
<ImageView
android:id="@+id/widget_header_separator"
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="@color/red_theme_color"/>
<LinearLayout android:id="@+id/taskbody"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/widget_body_light"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent">
<LinearLayout
android:id="@+id/widget_header"
android:layout_width="fill_parent"
android:layout_height="39dip"
android:orientation="horizontal"
android:padding="3dp"
android:background="@android:color/transparent">
<TextView
android:id="@+id/widget_title"
android:layout_width="fill_parent"
android:layout_height="39dip"
android:layout_gravity="left|center_vertical"
android:paddingLeft="2dip"
android:textColor="@color/widget_text_color_light"
android:textSize="16sp"
android:textStyle="bold"
android:maxLines="2"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:ellipsize="end" />
<ImageButton
android:id="@+id/widget_button"
android:layout_width="33dip"
android:layout_height="39dip"
android:layout_gravity="right|center_vertical"
android:background="@android:color/transparent"
android:src="@drawable/plus_button_dark_blue"
android:scaleType="fitCenter"/>
</LinearLayout>
<ImageView
android:id="@+id/widget_header_separator"
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="@color/dark_blue_theme_color"/>
<LinearLayout android:id="@+id/taskbody"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/transparent"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>

@ -59,29 +59,6 @@
<item name="logo">@drawable/home_button_blue</item>
</style>
<style name="AstridV11ActionBarStyle.Transparent">
<item name="android:background">#aa000000</item>
</style>
<style name="AstridActionBarStyle.Transparent">
<item name="background">#aa000000</item>
</style>
<style name="Theme.Transparent" parent="Theme">
<item name="asContentBackground">#22000000</item>
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.Transparent</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.Transparent</item>
<item name="asQuickaddBackgroundColor">#22000000</item>
<item name="asEditBackground">#33272327</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_black</item>
<item name="asMembersHeaderBackground">@android:color/transparent</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
</style>
<style name="Theme.White" parent="@style/Theme.Sherlock.Light">
<item name="asContentBackground">@android:color/white</item>
<item name="asEditBackground">#e5e5e5</item>
@ -94,38 +71,12 @@
<item name="asFilterHeaderBackground">@drawable/edit_titlebar_white</item>
<item name="asMembersHeaderBackground">#d0d0d0</item>
<item name="asListDividerColor">#dddddd</item>
<item name="asAddButtonImg">@drawable/plus_button_red</item>
<item name="asMicButtonImg">@drawable/mic_button_red</item>
<item name="asEditRowBackground">@drawable/task_edit_background_white</item>
<item name="asMainMenu">@drawable/menu_button_red</item>
<item name="asPeopleMenu">@drawable/people_menu_button_red</item>
<item name="asThemeTextColor">@color/red_theme_color</item>
<item name="asListsDisclosure">@drawable/lists_disclosure_red</item>
<item name="asAbBackgroundColor">#ffffff</item>
<item name="asListPopoverBg">@drawable/list_popover_bg</item>
<item name="asListArrowUp">@drawable/list_arrow_up</item>
<item name="asFilterSelectedIcon">@drawable/filter_selected_icon_black</item>
<item name="asTaskRowSelector">@drawable/task_row_bg_white</item>
<item name="asReadonlyTaskBackground">#fff6d7</item>
<!-- actionbar-styling -->
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White</item>
</style>
<style name="AstridV11ActionBarStyle.White">
<item name="android:background">@drawable/header_red</item>
<item name="android:displayOptions">useLogo|showHome|showTitle</item>
<item name="android:logo">@drawable/home_button_red</item>
</style>
<style name="AstridActionBarStyle.White">
<item name="background">@drawable/header_red</item>
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="logo">@drawable/home_button_red</item>
</style>
<style name="Theme.White.Blue">
<item name="asAddButtonImg">@drawable/plus_button_dark_blue</item>
<item name="asMicButtonImg">@drawable/mic_button_dark_blue</item>
<item name="asMainMenu">@drawable/menu_button_dark_blue</item>
@ -133,65 +84,22 @@
<item name="asThemeTextColor">@color/dark_blue_theme_color</item>
<item name="asListsDisclosure">@drawable/lists_disclosure_dark_blue</item>
<item name="asAbBackgroundColor">#e9e9e9</item>
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White.Blue</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White.Blue</item>
<!-- actionbar-styling -->
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White</item>
</style>
<style name="AstridV11ActionBarStyle.White.Blue">
<style name="AstridV11ActionBarStyle.White">
<item name="android:displayOptions">useLogo|showHome|showTitle</item>
<item name="android:background">@drawable/header_day_blue</item>
<item name="android:logo">@drawable/home_button_dark_blue</item>
</style>
<style name="AstridActionBarStyle.White.Blue">
<style name="AstridActionBarStyle.White">
<item name="displayOptions">useLogo|showHome|showTitle</item>
<item name="background">@drawable/header_day_blue</item>
<item name="logo">@drawable/home_button_dark_blue</item>
</style>
<style name="Theme.White.Alt">
<item name="asAddButtonImg">@drawable/plus_button_blue</item>
<item name="asMicButtonImg">@drawable/mic_button_blue</item>
<item name="asPeopleMenu">@drawable/people_menu_button_blue</item>
<item name="asMainMenu">@drawable/menu_button_blue_alt</item>
<item name="asListsDisclosure">@drawable/lists_disclosure_blue_alt</item>
<item name="asThemeTextColor">@color/blue_theme_color</item>
<item name="asAbBackgroundColor">#eee</item>
<item name="asHeaderTextColor">@android:color/white</item>
<item name="asHeaderTextColorInverse">?attr/asThemeTextColor</item>
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White.Alt</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White.Alt</item>
</style>
<style name="AstridV11ActionBarStyle.White.Alt">
<item name="android:logo">@drawable/home_button_blue_alt</item>
<item name="android:background">@drawable/header_blue_alt</item>
</style>
<style name="AstridActionBarStyle.White.Alt">
<item name="logo">@drawable/home_button_blue_alt</item>
<item name="background">@drawable/header_blue_alt</item>
</style>
<style name="Theme.TransparentWhite" parent="Theme.White.Blue">
<item name="asContentBackground">#22000000</item>
<item name="asQuickaddBackgroundColor">#22000000</item>
<item name="asEditBackground">#33272327</item>
<item name="asEditRowBackground">@drawable/task_edit_background_transparent_black</item>
<item name="asMembersHeaderBackground">@android:color/transparent</item>
<item name="android:actionBarStyle">@style/AstridV11ActionBarStyle.White.Blue.Transparent</item>
<item name="actionBarStyle">@style/AstridActionBarStyle.White.Blue.Transparent</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
</style>
<style name="AstridV11ActionBarStyle.White.Blue.Transparent">
<item name="android:background">#aa000000</item>
</style>
<style name="AstridActionBarStyle.White.Blue.Transparent">
<item name="background">#aa000000</item>
</style>
<style name="Theme.FullTransparent" parent="@style/Theme.Sherlock">
<item name="android:windowIsTranslucent">true</item>
@ -200,7 +108,7 @@
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsFloating">true</item>
</style>
<style name="Theme.Dialog" parent="@android:style/Theme.Dialog">
<!--<item name="android:windowBackground">@null</item>-->
<item name="asContentBackground">@android:color/black</item>

Loading…
Cancel
Save