Skip to content

Commit

Permalink
fix disabled state dropdown menu item color in IDE
Browse files Browse the repository at this point in the history
reference #717

closes JetBrains/intellij-community#2904

GitOrigin-RevId: 025558652bb64c35aad8e725d7186e564bc99684
  • Loading branch information
hamen authored and intellij-monorepo-bot committed Jan 15, 2025
1 parent 149297d commit fd417a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Menu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import org.jetbrains.jewel.foundation.state.FocusableComponentState
import org.jetbrains.jewel.foundation.state.SelectableComponentState
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.foundation.theme.LocalContentColor
import org.jetbrains.jewel.foundation.theme.LocalTextStyle
import org.jetbrains.jewel.foundation.theme.OverrideDarkMode
import org.jetbrains.jewel.ui.Orientation
import org.jetbrains.jewel.ui.component.styling.LocalMenuStyle
Expand Down Expand Up @@ -397,7 +398,11 @@ internal fun MenuItem(
val itemColors = style.colors.itemColors
val itemMetrics = style.metrics.itemMetrics

CompositionLocalProvider(LocalContentColor provides itemColors.contentFor(itemState).value) {
val updatedTextStyle = LocalTextStyle.current.copy(color = itemColors.contentFor(itemState).value)
CompositionLocalProvider(
LocalContentColor provides itemColors.contentFor(itemState).value,
LocalTextStyle provides updatedTextStyle,
) {
val backgroundColor by itemColors.backgroundFor(itemState)

Row(
Expand Down

0 comments on commit fd417a6

Please sign in to comment.