Skip to content

Commit

Permalink
🔀 Fix global border colors on old UI in bridge (#205)
Browse files Browse the repository at this point in the history
Fix global border colors
  • Loading branch information
rock3r authored Oct 25, 2023
1 parent e19a094 commit af7feeb
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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() =
Expand Down

0 comments on commit af7feeb

Please sign in to comment.