2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-17 15:26:23 +00:00

For #26061: Make sure favicons are cropped correctly

This commit is contained in:
Roger Yang 2022-07-27 17:00:23 -04:00 committed by mergify[bot]
parent 11a7085e46
commit 015b79f833
5 changed files with 7 additions and 5 deletions

View File

@ -67,7 +67,7 @@ fun Favicon(
modifier = modifier
.size(size)
.clip(RoundedCornerShape(2.dp)),
contentScale = ContentScale.Fit
contentScale = ContentScale.Crop,
)
}
}

View File

@ -164,7 +164,7 @@ private fun RecentBookmarkImage(bookmark: RecentBookmark) {
modifier = Modifier
.size(36.dp)
.clip(RoundedCornerShape(8.dp)),
contentScale = ContentScale.Fit
contentScale = ContentScale.Crop,
)
}
}

View File

@ -159,7 +159,8 @@ private fun RecentTabItem(
RecentTabIcon(
url = tab.state.content.url,
modifier = Modifier.size(18.dp).clip(RoundedCornerShape(2.dp)),
icon = tab.state.content.icon
contentScale = ContentScale.Crop,
icon = tab.state.content.icon,
)
Spacer(modifier = Modifier.width(8.dp))

View File

@ -19,11 +19,12 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/favicon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
android:scaleType="centerCrop"
android:importantForAccessibility="no"
tools:src="@drawable/ic_folder_icon" />
<ImageView

View File

@ -679,7 +679,7 @@
<style name="topSiteFavicon">
<item name="android:layout_width">@dimen/top_sites_favicon_size</item>
<item name="android:layout_height">@dimen/top_sites_favicon_size</item>
<item name="android:scaleType">fitCenter</item>
<item name="android:scaleType">centerCrop</item>
<item name="android:layout_gravity">center</item>
<item name="shapeAppearanceOverlay">@style/topSiteFaviconShape</item>
</style>