[cr138][Android] Backport OverflowMenuButton style
This fixes menu footer buttons. Chromium change: https://source.chromium.org/chromium/chromium/src/+/fa431a3660de796f7aa18130fd8a6da39f1cc1d7 [Icon Button] Migrate app menu icon buttons Migrated the app menu top row icons from ChromeImageButtons to Material Buttons. The highlight (ripple) is now a perfect circle instead of rectangle. Bug: 405189559 Change-Id: I0376bf0ecf7f5b734dad2d7e8c69200834c54248 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6477118
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file.
|
||||
-->
|
||||
<!-- Copyright (c) 2018 The Brave Authors. All rights reserved.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
<org.chromium.chrome.browser.app.appmenu.AppMenuIconRowFooter
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
@@ -22,38 +21,38 @@
|
||||
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/forward_menu_id"
|
||||
style="@style/OverflowMenuButton"
|
||||
style="@style/BraveOverflowMenuButton"
|
||||
android:src="@drawable/btn_forward"
|
||||
android:contentDescription="@string/accessibility_menu_forward" />
|
||||
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/share_menu_id"
|
||||
style="@style/OverflowMenuButton"
|
||||
style="@style/BraveOverflowMenuButton"
|
||||
android:src="@drawable/share_icon"
|
||||
android:contentDescription="@string/share" />
|
||||
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/home_menu_id"
|
||||
style="@style/OverflowMenuButton"
|
||||
style="@style/BraveOverflowMenuButton"
|
||||
android:src="@drawable/btn_toolbar_home"
|
||||
android:contentDescription="@string/accessibility_toolbar_btn_home" />
|
||||
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/bookmark_this_page_id"
|
||||
style="@style/OverflowMenuButton"
|
||||
style="@style/BraveOverflowMenuButton"
|
||||
android:src="@drawable/star_outline_24dp"
|
||||
android:contentDescription="@string/accessibility_menu_bookmark" />
|
||||
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/offline_page_id"
|
||||
style="@style/OverflowMenuButton"
|
||||
style="@style/BraveOverflowMenuButton"
|
||||
android:src="@drawable/ic_file_download_white_24dp"
|
||||
android:contentDescription="@string/download_page" />
|
||||
|
||||
<!-- The src will be set in onFinishInflate. -->
|
||||
<org.chromium.ui.widget.ChromeImageButton
|
||||
android:id="@+id/reload_menu_id"
|
||||
style="@style/OverflowMenuButton"
|
||||
style="@style/BraveOverflowMenuButton"
|
||||
android:contentDescription="@string/accessibility_btn_refresh"
|
||||
tools:src="@drawable/btn_reload_stop" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -509,4 +509,20 @@
|
||||
<item name="android:typeface">monospace</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Styling for an icon in an app menu icon row.
|
||||
This is a backport taken from upstream's
|
||||
chrome/browser/ui/android/appmenu/java/res/values/styles.xml of the
|
||||
revision previous to fa431a3660de796f7aa18130fd8a6da39f1cc1d7
|
||||
to fix buttons align and colors at
|
||||
brave/android/java/res/layout/icon_row_menu_footer.xml
|
||||
-->
|
||||
<style name="BraveOverflowMenuButton">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:background">?attr/listChoiceBackgroundIndicator</item>
|
||||
<item name="android:scaleType">center</item>
|
||||
<item name="tint">@color/default_icon_color_tint_list</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user