Fix Pill not following the local text style

Closes mihonapp/mihon#2009

(cherry picked from commit f8cb506137a3619f828dac94557b5448b2a7fa24)
This commit is contained in:
AntsyLich 2025-05-04 23:54:02 +06:00 committed by Cuong-Tran
parent 4fe7ef9abb
commit 23565be68c
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
2 changed files with 2 additions and 2 deletions

View file

@ -47,6 +47,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- Fix content under source browse screen top appbar is interactable ([@AntsyLich](https://github.com/AntsyLich)) ([#2026](https://github.com/mihonapp/mihon/pull/2026)) - Fix content under source browse screen top appbar is interactable ([@AntsyLich](https://github.com/AntsyLich)) ([#2026](https://github.com/mihonapp/mihon/pull/2026))
- Fix crash when trying use source sort filter without a pre-selection ([@AntsyLich](https://github.com/AntsyLich)) ([#2036](https://github.com/mihonapp/mihon/pull/2036)) - Fix crash when trying use source sort filter without a pre-selection ([@AntsyLich](https://github.com/AntsyLich)) ([#2036](https://github.com/mihonapp/mihon/pull/2036))
- Fix empty layout not appearing in browse source screen in some cases ([@NarwhalHorns](https://github.com/NarwhalHorns)) ([#2043](https://github.com/mihonapp/mihon/pull/2043)) - Fix empty layout not appearing in browse source screen in some cases ([@NarwhalHorns](https://github.com/NarwhalHorns)) ([#2043](https://github.com/mihonapp/mihon/pull/2043))
- Fix Pill not following the local text style ([@AntsyLich](https://github.com/AntsyLich))
### Removed ### Removed
- Remove Okhttp networking from WebView Screen ([@AwkwardPeak7](https://github.com/AwkwardPeak7)) ([#2020](https://github.com/mihonapp/mihon/pull/2020)) - Remove Okhttp networking from WebView Screen ([@AwkwardPeak7](https://github.com/AwkwardPeak7)) ([#2020](https://github.com/mihonapp/mihon/pull/2020))

View file

@ -51,12 +51,11 @@ fun Pill(
contentColor: Color = MaterialTheme.colorScheme.onSurface, contentColor: Color = MaterialTheme.colorScheme.onSurface,
fontSize: TextUnit = LocalTextStyle.current.fontSize, fontSize: TextUnit = LocalTextStyle.current.fontSize,
) { ) {
val style = LocalTextStyle.current
Pill( Pill(
text = text, text = text,
modifier = modifier, modifier = modifier,
color = color, color = color,
contentColor = contentColor, contentColor = contentColor,
style = MaterialTheme.typography.bodyMedium.copy(fontSize = fontSize), style = LocalTextStyle.current.merge(fontSize = fontSize),
) )
} }