Issue #19989: Add rounded corners to recently tabs' icon

upstream-sync
Roger Yang 3 years ago committed by mergify[bot]
parent 1251894933
commit 80721e2d73

@ -12,7 +12,7 @@
android:elevation="@dimen/home_item_elevation"
android:foreground="?android:attr/selectableItemBackground">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/recent_tab_icon"
android:layout_width="0dp"
android:layout_height="0dp"
@ -20,7 +20,7 @@
android:layout_marginVertical="12dp"
android:adjustViewBounds="true"
android:importantForAccessibility="no"
android:scaleType="fitCenter"
style="@style/recentTabIcon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="parent"

@ -101,6 +101,8 @@
<dimen name="recent_bookmark_item_height">128dp</dimen>
<dimen name="recent_bookmark_item_width">152dp</dimen>
<dimen name="recent_bookmark_item_favicon_height">72dp</dimen>
<dimen name="recent_bookmark_item_favicon_elevation">0dp</dimen>
<dimen name="recent_bookmark_item_favicon_corner_size">4dp</dimen>
<!-- Browser Fragment -->
<!--The size of the gap between the tab preview and content layout.-->
@ -227,6 +229,10 @@
<dimen name="top_sites_card_radius">8dp</dimen>
<dimen name="top_sites_card_stroke_width">1dp</dimen>
<!-- Recent tabs -->
<dimen name="recent_tabs_icon_elevation">0dp</dimen>
<dimen name="recent_tabs_icon_corner_size">4dp</dimen>
<!-- Credit Cards Fragment -->
<dimen name="credit_cards_saved_cards_item_margin_start">16dp</dimen>
<dimen name="credit_cards_saved_cards_item_margin_end">48dp</dimen>

@ -652,6 +652,18 @@
<item name="cornerSize">@dimen/top_sites_favicon_corner_size</item>
</style>
<style name="recentTabIcon">
<item name="android:scaleType">fitCenter</item>
<item name="android:layout_gravity">center</item>
<item name="shapeAppearanceOverlay">@style/recentTabIconShape</item>
</style>
<style name="recentTabIconShape">
<item name="cornerFamily">rounded</item>
<item name="elevation">@dimen/recent_tabs_icon_elevation</item>
<item name="cornerSize">@dimen/recent_tabs_icon_corner_size</item>
</style>
<style name="RecentBookmarks.FaviconCard" parent="Mozac.Widgets.Favicon">
<item name="android:layout_width">@dimen/recent_bookmark_item_width</item>
<item name="android:layout_height">@dimen/recent_bookmark_item_height</item>
@ -671,8 +683,8 @@
<style name="recentBookmarkFaviconShape">
<item name="cornerFamily">rounded</item>
<item name="elevation">1dp</item>
<item name="cornerSize">4dp</item>
<item name="elevation">@dimen/recent_bookmark_item_favicon_elevation</item>
<item name="cornerSize">@dimen/recent_bookmark_item_favicon_corner_size</item>
</style>
<style name="recentBookmarkItemTitleText" parent="Body16TextStyle">

Loading…
Cancel
Save