Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Bug 1807131: Fix ripples for snackbar and alert dialogs #1226

Merged
merged 2 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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/. -->
Comment on lines +2 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czlucius I added the licenses to each files, also squashed the commits into a single one.

<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