From 88d9ffe92e41ab8a4d24655a32aa87a20ee8bd01 Mon Sep 17 00:00:00 2001 From: Soitora Date: Tue, 1 Jun 2021 23:56:36 +0200 Subject: [PATCH] Add better library item selectors (#5240) * Add better library item selectors Inspired by the J2K method of library item selection. * Tweak theme selection colors It was missing for Hot Pink and Midnight Dusk. The selector color is 75% alpha of the color accent, this looked fitting for all themes. --- .../res/drawable/library_item_selector.xml | 35 +++++++++++++++---- .../layout/source_comfortable_grid_item.xml | 1 + .../res/layout/source_compact_grid_item.xml | 1 + app/src/main/res/values/colors.xml | 14 ++++---- app/src/main/res/values/themes.xml | 10 +++--- 5 files changed, 45 insertions(+), 16 deletions(-) diff --git a/app/src/main/res/drawable/library_item_selector.xml b/app/src/main/res/drawable/library_item_selector.xml index 8dc63c317..7de3c91ba 100644 --- a/app/src/main/res/drawable/library_item_selector.xml +++ b/app/src/main/res/drawable/library_item_selector.xml @@ -3,16 +3,39 @@ android:color="?attr/colorLibrarySelection"> - - + + + + + - - + + + + + - - + + + + + diff --git a/app/src/main/res/layout/source_comfortable_grid_item.xml b/app/src/main/res/layout/source_comfortable_grid_item.xml index 9a857bf03..409cf083e 100644 --- a/app/src/main/res/layout/source_comfortable_grid_item.xml +++ b/app/src/main/res/layout/source_comfortable_grid_item.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_margin="2dp" android:background="@drawable/library_item_selector" android:padding="4dp"> diff --git a/app/src/main/res/layout/source_compact_grid_item.xml b/app/src/main/res/layout/source_compact_grid_item.xml index 1dd7123aa..6cf084daf 100644 --- a/app/src/main/res/layout/source_compact_grid_item.xml +++ b/app/src/main/res/layout/source_compact_grid_item.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_margin="2dp" android:background="@drawable/library_item_selector" android:padding="4dp"> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 3eed70bda..98f4741de 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -26,12 +26,12 @@ @color/rippleColorLight @color/md_grey_50 @color/md_white_1000 - @color/md_blue_A400_38 + @color/md_blue_A400_75 #ED4A65 #0AED4A65 - #6FED4A65 + #BFED4A65 #3399FF @@ -50,7 +50,7 @@ #48E484 @color/md_black_1000 #0A48E484 - #8048E484 + #BF48E484 #F02475 @@ -61,7 +61,7 @@ #0FF02475 #16151D #201F27 - #80F02475 + #BFF02475 #3399FF @@ -74,7 +74,7 @@ @color/rippleColorAmoled @color/colorAmoledPrimary @color/colorAmoledPrimary - @color/md_blue_A200_50 + @color/md_blue_A200_75 #FF3399 @@ -82,7 +82,7 @@ @color/md_white_1000_70 @color/md_white_1000_50 #0AFF3399 - #80FF69B4 + #BFFF69B4 @color/colorDarkPrimary @@ -122,9 +122,11 @@ #BF212121 #448AFF + #BF448AFF #80448AFF #2979FF + #BF2979FF #612979FF #0A2979FF diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 7ab1fcc6a..fca875e08 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -307,9 +307,8 @@ @style/Theme.AlertDialog.Dark.MidnightDusk - - @color/selectorColorDark - @color/selectorColorDark + + @color/selectorColorDusk @@ -392,7 +391,7 @@ @dimen/dialog_radius - @color/selectorColorAmoled + ?attr/colorAccent @color/selectorColorAmoled @color/filterColorAmoled @@ -421,6 +420,9 @@ @style/Theme.AlertDialog.Amoled.HotPink + + + @color/selectorColorPink