Skip to content

Commit

Permalink
Bug 1807131 - Fix ripples for snackbar and alert dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
czlucius authored and mergify[bot] committed May 15, 2023
1 parent 341fef9 commit a071055
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions fenix/app/src/main/res/drawable/ripple_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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 http://mozilla.org/MPL/2.0/. -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#1F000000"/>
6 changes: 6 additions & 0 deletions fenix/app/src/main/res/drawable/ripple_button_dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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 http://mozilla.org/MPL/2.0/. -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#33FFFFFF"/>
2 changes: 1 addition & 1 deletion fenix/app/src/main/res/layout/fenix_snackbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:background="@drawable/ripple_button_dark"
android:letterSpacing="0.05"
android:minWidth="48dp"
android:minHeight="48dp"
Expand Down
4 changes: 2 additions & 2 deletions fenix/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@
</style>

<style name="DialogButtonStyleLight" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
<item name="android:background">@drawable/ripple_button</item>
<item name="android:textColor">?accentBright</item>
<item name="android:textFontWeight" tools:ignore="NewApi">@integer/font_weight_medium</item>
<item name="android:fontWeight" tools:ignore="NewApi">@integer/font_weight_medium</item>
</style>

<style name="DialogButtonStyleDark" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
<item name="android:background">@drawable/ripple_button_dark</item>
<item name="android:textColor">?accentHighContrast</item>
<item name="android:textFontWeight" tools:ignore="NewApi">@integer/font_weight_medium</item>
<item name="android:fontWeight" tools:ignore="NewApi">@integer/font_weight_medium</item> </style>
Expand Down

0 comments on commit a071055

Please sign in to comment.