Skip to content

Commit

Permalink
Fix #259 Scrollbar color resolution from LAF in corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Dec 1, 2023
1 parent f280692 commit e740123
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,11 +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 }
.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 }
.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 e740123

Please sign in to comment.