From af7feeb9b8e3ead540dfd3184d220f9325ce3640 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Wed, 25 Oct 2023 05:20:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20Fix=20global=20border=20colors?= =?UTF-8?q?=20on=20old=20UI=20in=20bridge=20(#205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix global border colors --- .../jetbrains/jewel/bridge/theme/BridgeGlobalColors.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/BridgeGlobalColors.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/BridgeGlobalColors.kt index 7dadbcf9b..cde1139a6 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/BridgeGlobalColors.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/theme/BridgeGlobalColors.kt @@ -1,6 +1,9 @@ package org.jetbrains.jewel.bridge.theme +import com.intellij.ide.ui.laf.darcula.DarculaUIUtil +import com.intellij.ui.JBColor import org.jetbrains.jewel.bridge.retrieveColorOrUnspecified +import org.jetbrains.jewel.bridge.toComposeColorOrUnspecified import org.jetbrains.jewel.foundation.BorderColors import org.jetbrains.jewel.foundation.GlobalColors import org.jetbrains.jewel.foundation.OutlineColors @@ -15,9 +18,9 @@ fun GlobalColors.Companion.readFromLaF() = fun BorderColors.Companion.readFromLaF() = BorderColors( - normal = retrieveColorOrUnspecified("Component.borderColor"), - focused = retrieveColorOrUnspecified("Component.focusedBorderColor"), - disabled = retrieveColorOrUnspecified("*.disabledBorderColor"), + normal = JBColor.border().toComposeColorOrUnspecified(), + focused = DarculaUIUtil.getOutlineColor(true, true).toComposeColorOrUnspecified(), + disabled = DarculaUIUtil.getOutlineColor(false, false).toComposeColorOrUnspecified(), ) fun OutlineColors.Companion.readFromLaF() =