From 03287a31baad4c15261ea325c5adf40cf54ee2f7 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Mon, 16 Jan 2023 16:49:25 +0530 Subject: [PATCH] Change accent and switch according to our palette --- build/e_patches_list.txt | 1 + ...-and-switch-according-to-our-palette.patch | 140 ++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 build/patches/0028-Change-accent-and-switch-according-to-our-palette.patch diff --git a/build/e_patches_list.txt b/build/e_patches_list.txt index dbb024d4..55cecbfe 100644 --- a/build/e_patches_list.txt +++ b/build/e_patches_list.txt @@ -25,3 +25,4 @@ 0025-Handle-web-search-action-in-browser.patch 0026-Browser-Enable-unified-autoplay-by-default.patch 0027-Browser-Replace-default-tab-favicon.patch +0028-Change-accent-and-switch-according-to-our-palette.patch diff --git a/build/patches/0028-Change-accent-and-switch-according-to-our-palette.patch b/build/patches/0028-Change-accent-and-switch-according-to-our-palette.patch new file mode 100644 index 00000000..40a06513 --- /dev/null +++ b/build/patches/0028-Change-accent-and-switch-according-to-our-palette.patch @@ -0,0 +1,140 @@ +From 62b305599db7e1e1327e93bd8468176df478b1de Mon Sep 17 00:00:00 2001 +From: Nishith Khanna +Date: Mon, 16 Jan 2023 16:46:35 +0530 +Subject: [PATCH] Change accent and switch according to our palette + +--- + components/browser_ui/styles/android/BUILD.gn | 4 ++++ + .../android/java/res/color/e_switch_thumb_color.xml | 5 +++++ + .../android/java/res/color/e_switch_track_color.xml | 6 ++++++ + .../styles/android/java/res/drawable/e_switch_thumb.xml | 9 +++++++++ + .../styles/android/java/res/drawable/e_switch_track.xml | 9 +++++++++ + .../browser_ui/styles/android/java/res/values/styles.xml | 4 ++-- + ui/android/java/res/values/color_palette.xml | 9 +++++++-- + 7 files changed, 42 insertions(+), 4 deletions(-) + create mode 100644 components/browser_ui/styles/android/java/res/color/e_switch_thumb_color.xml + create mode 100644 components/browser_ui/styles/android/java/res/color/e_switch_track_color.xml + create mode 100644 components/browser_ui/styles/android/java/res/drawable/e_switch_thumb.xml + create mode 100644 components/browser_ui/styles/android/java/res/drawable/e_switch_track.xml + +diff --git a/components/browser_ui/styles/android/BUILD.gn b/components/browser_ui/styles/android/BUILD.gn +index 96e38ed230699..f512201fe2ff4 100644 +--- a/components/browser_ui/styles/android/BUILD.gn ++++ b/components/browser_ui/styles/android/BUILD.gn +@@ -53,6 +53,8 @@ android_resources("java_resources") { + "java/res/color/switch_track_tint.xml", + "java/res/color/switch_track_tint_incognito_baseline_list.xml", + "java/res/color/text_highlight_color.xml", ++ "java/res/color/e_switch_thumb_color.xml", ++ "java/res/color/e_switch_track_color.xml", + "java/res/drawable-hdpi/btn_star_filled.png", + "java/res/drawable-hdpi/ic_chrome.png", + "java/res/drawable-hdpi/ic_delete_white_24dp.png", +@@ -214,6 +216,8 @@ android_resources("java_resources") { + "java/res/drawable/ic_web_asset_24dp.xml", + "java/res/drawable/smartphone_black_24dp.xml", + "java/res/drawable/toolbar_hairline.xml", ++ "java/res/drawable/e_switch_thumb.xml", ++ "java/res/drawable/e_switch_track.xml", + "java/res/values-night/colors.xml", + "java/res/values-night/dimens.xml", + "java/res/values-night/drawables.xml", +diff --git a/components/browser_ui/styles/android/java/res/color/e_switch_thumb_color.xml b/components/browser_ui/styles/android/java/res/color/e_switch_thumb_color.xml +new file mode 100644 +index 0000000000000..32d4f07465128 +--- /dev/null ++++ b/components/browser_ui/styles/android/java/res/color/e_switch_thumb_color.xml +@@ -0,0 +1,5 @@ ++ ++ ++ ++ ++ +diff --git a/components/browser_ui/styles/android/java/res/color/e_switch_track_color.xml b/components/browser_ui/styles/android/java/res/color/e_switch_track_color.xml +new file mode 100644 +index 0000000000000..89e09db4091c3 +--- /dev/null ++++ b/components/browser_ui/styles/android/java/res/color/e_switch_track_color.xml +@@ -0,0 +1,6 @@ ++ ++ ++ ++ ++ ++ +diff --git a/components/browser_ui/styles/android/java/res/drawable/e_switch_thumb.xml b/components/browser_ui/styles/android/java/res/drawable/e_switch_thumb.xml +new file mode 100644 +index 0000000000000..48dfa90e45cf4 +--- /dev/null ++++ b/components/browser_ui/styles/android/java/res/drawable/e_switch_thumb.xml +@@ -0,0 +1,9 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/components/browser_ui/styles/android/java/res/drawable/e_switch_track.xml b/components/browser_ui/styles/android/java/res/drawable/e_switch_track.xml +new file mode 100644 +index 0000000000000..f5b1eed6f2e6f +--- /dev/null ++++ b/components/browser_ui/styles/android/java/res/drawable/e_switch_track.xml +@@ -0,0 +1,9 @@ ++ ++ ++ ++ ++ +diff --git a/components/browser_ui/styles/android/java/res/values/styles.xml b/components/browser_ui/styles/android/java/res/values/styles.xml +index d0f6bb913458d..9a85a9fa4e262 100644 +--- a/components/browser_ui/styles/android/java/res/values/styles.xml ++++ b/components/browser_ui/styles/android/java/res/values/styles.xml +@@ -20,8 +20,8 @@ found in the LICENSE file. + @style/TextAppearance.TextMedium.Primary + + +