From e740123058b67fa67f424a0cbd9435002f7cee97 Mon Sep 17 00:00:00 2001 From: fscarponi Date: Fri, 1 Dec 2023 11:55:19 +0100 Subject: [PATCH] Fix #259 Scrollbar color resolution from LAF in corner case --- .../kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt index 46fc9d8bc..fd192a014 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/IntUiBridge.kt @@ -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(