Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JEWEL-668] Fix disabled state dropdown menu item color in IDE #2904

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/jewel/decorated-window/api/decorated-window.api
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public abstract interface class com/jetbrains/DesktopActions$Handler {
public fun print (Ljava/io/File;)V
}

public class com/jetbrains/JBR {
public final class com/jetbrains/JBR {
public static fun getApiVersion ()Ljava/lang/String;
public static fun getDesktopActions ()Lcom/jetbrains/DesktopActions;
public static fun getRoundedCornersManager ()Lcom/jetbrains/RoundedCornersManager;
Expand Down
1 change: 1 addition & 0 deletions platform/jewel/foundation/api/foundation.api
Original file line number Diff line number Diff line change
Expand Up @@ -1023,3 +1023,4 @@ public final class org/jetbrains/jewel/foundation/util/JewelLogger$Companion {
public final fun getInstance (Ljava/lang/Class;)Lorg/jetbrains/jewel/foundation/util/JewelLogger;
public final fun getInstance (Ljava/lang/String;)Lorg/jetbrains/jewel/foundation/util/JewelLogger;
}

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ internal abstract class ContentSource<T : ContentItem> {
}
}

internal data class FilteredContentSource<T : ContentItem>(override val items: List<T>, val original: ContentSource<*>) :
ContentSource<T>() {
internal data class FilteredContentSource<T : ContentItem>(
override val items: List<T>,
val original: ContentSource<*>,
) : ContentSource<T>() {
override val displayName: String
get() = original.displayName
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the
// Apache 2.0 license.
package org.jetbrains.jewel.samples.standalone.view.component

import androidx.compose.foundation.border
Expand Down
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
Loading