Theme tweaks

* Fix keylines
* Update nav drawer colors
* Replace primary color black with dark grey
* Set dialog backgrounds
* Lighter snackbar background
pull/413/head
Alex Baker 8 years ago
parent 8675de48d3
commit 2b612a2edc

@ -49,10 +49,4 @@ public class DialogBuilder {
dialog.setCanceledOnTouchOutside(false);
return dialog;
}
private ContextThemeWrapper buildDialogWrapper() {
ContextThemeWrapper wrapper = new ContextThemeWrapper(activity, themeManager.getBaseTheme().getDialogThemeResId());
themeManager.applyThemeToContext(wrapper);
return wrapper;
}
}

@ -96,7 +96,7 @@ public class ThemeManager {
private int getColorResId(int index) {
switch (index) {
case 1:
return R.style.Black;
return R.style.DarkGrey;
case 2:
return R.style.Red;
case 3:

@ -73,8 +73,8 @@ public class RepeatConfirmationReceiver extends BroadcastReceiver {
String dueDateString = getRelativeDateAndTimeString(activity, newDueDate);
String snackbarText = activity.getString(R.string.repeat_snackbar, task.getTitle(), dueDateString);
Snackbar.make(view, snackbarText, Snackbar.LENGTH_LONG)
.setActionTextColor(activity.getResources().getColor(R.color.snackbar_undo))
Snackbar snackbar = Snackbar.make(view, snackbarText, Snackbar.LENGTH_LONG)
.setActionTextColor(activity.getResources().getColor(R.color.snackbar_text_color))
.setAction(R.string.DLG_undo, new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -82,8 +82,9 @@ public class RepeatConfirmationReceiver extends BroadcastReceiver {
task.setCompletionDate(0L);
taskService.save(task);
}
})
.show();
});
snackbar.getView().setBackgroundColor(activity.getResources().getColor(R.color.snackbar_background));
snackbar.show();
}
private String getRelativeDateAndTimeString(Context context, long date) {

@ -109,9 +109,6 @@ public class TasksWidget extends InjectingAppWidgetProvider {
getSolidBackground(color.getPrimaryColor()));
remoteViews.setInt(R.id.widget_background, "setAlpha", opacity);
remoteViews.setInt(R.id.widget_header_background, "setAlpha", opacity);
if (theme.getThemeIndex() != 1 || color.getThemeIndex() != 1) {
remoteViews.setInt(R.id.widget_header_separator, "setVisibility", View.GONE);
}
Filter filter = defaultFilterProvider.getFilterFromPreference(filterId);
remoteViews.setTextViewText(R.id.widget_title, filter.listingTitle);

@ -52,16 +52,8 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/widget_header_separator"
android:layout_below="@id/widget_header"
android:layout_width="match_parent"
android:layout_height="1px"
android:orientation="horizontal"
android:background="@android:color/white" />
<RelativeLayout
android:layout_below="@id/widget_header_separator"
android:layout_below="@id/widget_header"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="keyline_first">24dp</dimen>
<dimen name="keyline_content_inset">68dp</dimen>
<dimen name="keyline_content_inset">80dp</dimen>
</resources>

@ -76,7 +76,7 @@
<string-array name="colors">
<item>@string/theme_blue_grey</item>
<item>@string/theme_black</item>
<item>@string/theme_dark_grey</item>
<item>@string/theme_red</item>
<item>@string/theme_pink</item>
<item>@string/theme_purple</item>

@ -75,6 +75,8 @@
<color name="grey_500">#9e9e9e</color>
<color name="grey_700">#616161</color>
<color name="grey_800">#424242</color>
<color name="grey_900">#212121</color>
<color name="blue_grey_400">#78909c</color>
<color name="blue_grey_500">#607d8b</color>
@ -90,11 +92,14 @@
<color name="md_dark_background">#303030</color>
<color name="md_light_background">#fafafa</color>
<color name="dialog_dark_background">#424242</color>
<color name="dialog_light_background">#ffffff</color>
<color name="drawer_light_background">#f9f9f9</color>
<color name="drawer_dark_background">#303030</color>
<color name="drawer_selected_light">#e8e8e8</color>
<color name="drawer_selected_dark">#202020</color>
<color name="drawer_background">#f5f5f5</color>
<color name="drawer_background_dark">#212121</color>
<color name="drawer_background_selected">#dddddd</color>
<color name="drawer_background_selected_dark">#535353</color>
<color name="white_text">#fff</color>
<color name="white_text_hint">#eee</color>
<color name="black_text">#000</color>
@ -105,7 +110,8 @@
<color name="importance_3">@color/blue_500</color>
<color name="importance_4">@color/grey_500</color>
<color name="snackbar_undo">#f4b400</color>
<color name="snackbar_text_color">#f4b400</color>
<color name="snackbar_background">@color/grey_800</color>
<!-- deprecated -->
<color name="dark_blue_theme_color">#1f78b4</color>

@ -2,8 +2,8 @@
<resources>
<dimen name="navigation_drawer_width">260dp</dimen>
<dimen name="keyline_first">16dp</dimen>
<dimen name="keyline_second">20dp</dimen> <!-- 16dp + toolbar title margin -->
<dimen name="keyline_content_inset">60dp</dimen>
<dimen name="keyline_second">32dp</dimen>
<dimen name="keyline_content_inset">72dp</dimen>
<dimen name="widget_margin">0dp</dimen>
<dimen name="task_list_footer_height">88dp</dimen>

@ -888,6 +888,7 @@ File %1$s contained %2$s.\n\n
<string name="theme_grey">Grey</string>
<string name="theme_blue_grey">Blue Grey</string>
<string name="theme_black">Black</string>
<string name="theme_dark_grey">Dark Grey</string>
<string name="theme_light">Light</string>
<string name="theme_dark">Dark</string>
<string name="default_value">Default</string>

@ -5,8 +5,8 @@
<item name="popup_theme">@style/ThemeOverlay.AppCompat</item>
<item name="android:windowBackground">@color/md_dark_background</item>
<item name="windowActionModeOverlay">true</item>
<item name="drawer_background">@color/drawer_background_dark</item>
<item name="drawer_background_selected">@color/drawer_background_selected_dark</item>
<item name="drawer_background">@color/drawer_dark_background</item>
<item name="drawer_background_selected">@color/drawer_selected_dark</item>
<item name="asContentBackground">@color/md_dark_background</item>
<item name="asTextColor">@android:color/white</item>
<item name="asTextColorHint">@android:color/darker_gray</item>
@ -26,6 +26,7 @@
<style name="DialogBaseDark" parent="@style/Theme.AppCompat.Dialog">
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowBackground">@color/dialog_dark_background</item>
<item name="asTextColor">@android:color/white</item>
<item name="icon_tint">@android:color/white</item>
</style>

@ -5,8 +5,8 @@
<item name="popup_theme">@style/ThemeOverlay.AppCompat.Light</item>
<item name="android:windowBackground">@color/md_light_background</item>
<item name="windowActionModeOverlay">true</item>
<item name="drawer_background">@color/drawer_background</item>
<item name="drawer_background_selected">@color/drawer_background_selected</item>
<item name="drawer_background">@color/drawer_light_background</item>
<item name="drawer_background_selected">@color/drawer_selected_light</item>
<item name="asContentBackground">@color/md_light_background</item>
<item name="asTextColor">@android:color/black</item>
<item name="asTextColorHint">@android:color/darker_gray</item>
@ -26,6 +26,7 @@
<style name="LightDialogBase" parent="@style/Theme.AppCompat.Light.Dialog">
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowBackground">@color/dialog_light_background</item>
<item name="asTextColor">@android:color/black</item>
<item name="icon_tint">@android:color/black</item>
</style>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Black">
<item name="colorPrimary">@color/black_primary</item>
<item name="colorPrimaryDark">@color/black_primary_dark</item>
</style>
</resources>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="DarkGrey">
<item name="colorPrimary">@color/grey_900</item>
<item name="colorPrimaryDark">@android:color/black</item>
</style>
</resources>
Loading…
Cancel
Save