Skip to content

Commit

Permalink
fix: try to reduce image size on more places
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph5610 committed Feb 5, 2024
1 parent d7fa26c commit f1fb1ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/online/hudacek/fxradio/ui/util/FlagIcon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ class FlagIcon(isoCountryCode: String) {
private val flagPath = "/flags/${isoCountryCode.lowercase()}.png"

fun get(): Image? = runCatching {
Image(javaClass.getResourceAsStream(flagPath))
Image(javaClass.getResourceAsStream(flagPath), 16.0, 11.0, true, true)
}.getOrNull()
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class PlayerStationView : BaseView() {
.subscribe({
if (it.first.isSuccessful) {
it.first.body?.byteStream().use { i ->
image = Image(i)
image = Image(i, 150.0, 150.0, true, true)
}
} else {
image = it.second
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class StationsInfoView : BaseView() {
.subscribe {
if (it.isSuccessful) {
it.body?.byteStream().use { i ->
image = Image(i)
image = Image(i, 80.0, 80.0, true, true)
}
}
}
Expand Down

0 comments on commit f1fb1ba

Please sign in to comment.