Skip to content

Commit

Permalink
Fix scrollbar color when have 0f alpha (#262)
Browse files Browse the repository at this point in the history
* Fix Scrollbar color value handling in IntUiBridge.kt

* Fix #259 Scrollbar color resolution from LAF in corner case
  • Loading branch information
fscarponi authored Dec 1, 2023
1 parent 079b0b5 commit cafd9e5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,11 @@ private fun readScrollbarStyle(isDark: Boolean) =
colors = ScrollbarColors(
// See ScrollBarPainter.THUMB_OPAQUE_BACKGROUND
thumbBackground = retrieveColorOrUnspecified("ScrollBar.Mac.Transparent.thumbColor")
.let { if (it.alpha == 0f) Color.Unspecified else it } // See https://github.com/JetBrains/jewel/issues/259
.takeOrElse { if (isDark) Color(0x59808080) else Color(0x33000000) },
// See ScrollBarPainter.THUMB_OPAQUE_HOVERED_BACKGROUND
thumbBackgroundHovered = retrieveColorOrUnspecified("ScrollBar.Mac.Transparent.hoverThumbColor")
.let { if (it.alpha == 0f) Color.Unspecified else it } // See https://github.com/JetBrains/jewel/issues/259
.takeOrElse { if (isDark) Color(0x8C808080) else Color(0x80000000) },
),
metrics = ScrollbarMetrics(
Expand Down

0 comments on commit cafd9e5

Please sign in to comment.