From c08ca050388b2226c7b69bfd21df1f4be54e2323 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Sat, 21 Oct 2023 00:19:47 +0200 Subject: [PATCH] Get rid of BaseIntUiTheme and IntUiTheme One theme to rule them all! --- .../kotlin/org/jetbrains/jewel/JewelTheme.kt | 1 + int-ui/int-ui-core/api/int-ui-core.api | 60 ----- .../jewel/intui/core/BaseIntUiTheme.kt | 162 ------------ .../IntUiDecoratedWindowResourceResolver.kt | 4 +- .../api/int-ui-standalone.api | 44 +--- .../jewel/intui/standalone/IntUiTheme.kt | 244 +++++++++--------- .../styling/IntUiDropdownStyling.kt | 11 +- .../styling/IntUiLabelledTextFieldStyling.kt | 15 +- .../standalone/styling/IntUiLinkStyling.kt | 11 +- .../styling/IntUiTextAreaStyling.kt | 7 +- .../styling/IntUiTextFieldStyling.kt | 7 +- .../jewel/samples/standalone/Main.kt | 35 ++- .../samples/standalone/components/Borders.kt | 10 +- .../standalone/components/ChipsAndTree.kt | 8 +- .../samples/standalone/components/Tabs.kt | 11 +- .../samples/standalone/components/Tooltips.kt | 4 +- 16 files changed, 198 insertions(+), 436 deletions(-) diff --git a/core/src/main/kotlin/org/jetbrains/jewel/JewelTheme.kt b/core/src/main/kotlin/org/jetbrains/jewel/JewelTheme.kt index 5702d9279..b3daa1a0e 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/JewelTheme.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/JewelTheme.kt @@ -198,6 +198,7 @@ interface JewelTheme { @Composable @ReadOnlyComposable get() = LocalTooltipStyle.current + val iconButtonStyle: IconButtonStyle @Composable @ReadOnlyComposable diff --git a/int-ui/int-ui-core/api/int-ui-core.api b/int-ui/int-ui-core/api/int-ui-core.api index 472b0259c..70f683730 100644 --- a/int-ui/int-ui-core/api/int-ui-core.api +++ b/int-ui/int-ui-core/api/int-ui-core.api @@ -1,63 +1,3 @@ -public abstract interface class org/jetbrains/jewel/intui/core/BaseIntUiTheme : org/jetbrains/jewel/JewelTheme { - public abstract fun getCheckboxStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/CheckboxStyle; - public abstract fun getChipStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ChipStyle; - public abstract fun getCircularProgressStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/CircularProgressStyle; - public abstract fun getColorPalette (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ThemeColorPalette; - public abstract fun getContentColor (Landroidx/compose/runtime/Composer;I)J - public abstract fun getDefaultButtonStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ButtonStyle; - public abstract fun getDefaultTabStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TabStyle; - public abstract fun getDividerStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/DividerStyle; - public abstract fun getDropdownStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/DropdownStyle; - public abstract fun getEditorTabStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TabStyle; - public abstract fun getGlobalColors (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/GlobalColors; - public abstract fun getGlobalMetrics (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/GlobalMetrics; - public abstract fun getGroupHeaderStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/GroupHeaderStyle; - public abstract fun getHorizontalProgressBarStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle; - public abstract fun getIconData (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ThemeIconData; - public abstract fun getLabelledTextFieldStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle; - public abstract fun getLinkStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LinkStyle; - public abstract fun getMenuStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/MenuStyle; - public abstract fun getOutlinedButtonStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ButtonStyle; - public abstract fun getRadioButtonStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/RadioButtonStyle; - public abstract fun getScrollbarStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ScrollbarStyle; - public abstract fun getTextAreaStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TextAreaStyle; - public abstract fun getTextFieldStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TextFieldStyle; - public abstract fun getTextStyle (Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/text/TextStyle; - public abstract fun getTreeStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LazyTreeStyle; - public abstract fun isDark (Landroidx/compose/runtime/Composer;I)Z - public abstract fun isSwingCompatMode (Landroidx/compose/runtime/Composer;I)Z -} - -public final class org/jetbrains/jewel/intui/core/BaseIntUiTheme$DefaultImpls { - public static fun getCheckboxStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/CheckboxStyle; - public static fun getChipStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ChipStyle; - public static fun getCircularProgressStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/CircularProgressStyle; - public static fun getColorPalette (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ThemeColorPalette; - public static fun getContentColor (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)J - public static fun getDefaultButtonStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ButtonStyle; - public static fun getDefaultTabStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TabStyle; - public static fun getDividerStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/DividerStyle; - public static fun getDropdownStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/DropdownStyle; - public static fun getEditorTabStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TabStyle; - public static fun getGlobalColors (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/GlobalColors; - public static fun getGlobalMetrics (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/GlobalMetrics; - public static fun getGroupHeaderStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/GroupHeaderStyle; - public static fun getHorizontalProgressBarStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle; - public static fun getIconData (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ThemeIconData; - public static fun getLabelledTextFieldStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle; - public static fun getLinkStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LinkStyle; - public static fun getMenuStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/MenuStyle; - public static fun getOutlinedButtonStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ButtonStyle; - public static fun getRadioButtonStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/RadioButtonStyle; - public static fun getScrollbarStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ScrollbarStyle; - public static fun getTextAreaStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TextAreaStyle; - public static fun getTextFieldStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TextFieldStyle; - public static fun getTextStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/text/TextStyle; - public static fun getTreeStyle (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LazyTreeStyle; - public static fun isDark (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Z - public static fun isSwingCompatMode (Lorg/jetbrains/jewel/intui/core/BaseIntUiTheme;Landroidx/compose/runtime/Composer;I)Z -} - public final class org/jetbrains/jewel/intui/core/BaseIntUiThemeKt { public static final fun BaseIntUiTheme (Lorg/jetbrains/jewel/ThemeDefinition;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V public static final fun BaseIntUiTheme (Lorg/jetbrains/jewel/ThemeDefinition;Lkotlin/jvm/functions/Function2;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V diff --git a/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt b/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt index b442d0d10..98b60edb0 100644 --- a/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt +++ b/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt @@ -4,173 +4,11 @@ import androidx.compose.foundation.LocalIndication import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.ProvidedValue -import androidx.compose.runtime.ReadOnlyComposable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import org.jetbrains.jewel.GlobalColors -import org.jetbrains.jewel.GlobalMetrics import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.LocalColorPalette import org.jetbrains.jewel.LocalIconData import org.jetbrains.jewel.NoIndication -import org.jetbrains.jewel.ThemeColorPalette import org.jetbrains.jewel.ThemeDefinition -import org.jetbrains.jewel.ThemeIconData -import org.jetbrains.jewel.styling.ButtonStyle -import org.jetbrains.jewel.styling.CheckboxStyle -import org.jetbrains.jewel.styling.ChipStyle -import org.jetbrains.jewel.styling.CircularProgressStyle -import org.jetbrains.jewel.styling.DividerStyle -import org.jetbrains.jewel.styling.DropdownStyle -import org.jetbrains.jewel.styling.GroupHeaderStyle -import org.jetbrains.jewel.styling.HorizontalProgressBarStyle -import org.jetbrains.jewel.styling.LabelledTextFieldStyle -import org.jetbrains.jewel.styling.LazyTreeStyle -import org.jetbrains.jewel.styling.LinkStyle -import org.jetbrains.jewel.styling.MenuStyle -import org.jetbrains.jewel.styling.RadioButtonStyle -import org.jetbrains.jewel.styling.ScrollbarStyle -import org.jetbrains.jewel.styling.TabStyle -import org.jetbrains.jewel.styling.TextAreaStyle -import org.jetbrains.jewel.styling.TextFieldStyle - -interface BaseIntUiTheme : JewelTheme { - - val globalColors: GlobalColors - @Composable - @ReadOnlyComposable - get() = JewelTheme.globalColors - - val globalMetrics: GlobalMetrics - @Composable - @ReadOnlyComposable - get() = JewelTheme.globalMetrics - - val textStyle: TextStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.textStyle - - val contentColor: Color - @Composable - @ReadOnlyComposable - get() = JewelTheme.contentColor - - val isDark: Boolean - @Composable - @ReadOnlyComposable - get() = JewelTheme.isDark - - val isSwingCompatMode: Boolean - @Composable - @ReadOnlyComposable - get() = JewelTheme.isSwingCompatMode - - val iconData: ThemeIconData - @Composable - @ReadOnlyComposable - get() = JewelTheme.iconData - - val colorPalette: ThemeColorPalette - @Composable - @ReadOnlyComposable - get() = JewelTheme.colorPalette - - val defaultButtonStyle: ButtonStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.defaultButtonStyle - - val outlinedButtonStyle: ButtonStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.outlinedButtonStyle - - val checkboxStyle: CheckboxStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.checkboxStyle - - val chipStyle: ChipStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.chipStyle - - val dividerStyle: DividerStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.dividerStyle - - val dropdownStyle: DropdownStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.dropdownStyle - - val groupHeaderStyle: GroupHeaderStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.groupHeaderStyle - - val labelledTextFieldStyle: LabelledTextFieldStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.labelledTextFieldStyle - - val linkStyle: LinkStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.linkStyle - - val menuStyle: MenuStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.menuStyle - - val horizontalProgressBarStyle: HorizontalProgressBarStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.horizontalProgressBarStyle - - val radioButtonStyle: RadioButtonStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.radioButtonStyle - - val scrollbarStyle: ScrollbarStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.scrollbarStyle - - val textAreaStyle: TextAreaStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.textAreaStyle - - val textFieldStyle: TextFieldStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.textFieldStyle - - val treeStyle: LazyTreeStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.treeStyle - - val defaultTabStyle: TabStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.defaultTabStyle - - val editorTabStyle: TabStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.editorTabStyle - - val circularProgressStyle: CircularProgressStyle - @Composable - @ReadOnlyComposable - get() = JewelTheme.circularProgressStyle -} @Composable fun BaseIntUiTheme( diff --git a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt b/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt index d7e30065b..3e08a5789 100644 --- a/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt +++ b/int-ui/int-ui-decorated-window/src/main/kotlin/org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResourceResolver.kt @@ -1,6 +1,6 @@ package org.jetbrains.jewel.intui.window -import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.painter.ResourcePainterProvider import org.jetbrains.jewel.window.styling.DecoratedWindowStyle @@ -8,4 +8,4 @@ import org.jetbrains.jewel.window.styling.DecoratedWindowStyle * Create [PainterProvider][org.jetbrains.jewel.painter.PainterProvider] for decorated window module resource. */ fun decoratedWindowPainterProvider(path: String) = - ResourcePainterProvider(path, DecoratedWindowStyle::class.java.classLoader, IntUiTheme::class.java.classLoader) + ResourcePainterProvider(path, DecoratedWindowStyle::class.java.classLoader, JewelTheme::class.java.classLoader) diff --git a/int-ui/int-ui-standalone/api/int-ui-standalone.api b/int-ui/int-ui-standalone/api/int-ui-standalone.api index cfb462e95..43a2809a8 100644 --- a/int-ui/int-ui-standalone/api/int-ui-standalone.api +++ b/int-ui/int-ui-standalone/api/int-ui-standalone.api @@ -12,46 +12,14 @@ public final class org/jetbrains/jewel/intui/standalone/IntUiGlobalMetricsKt { public static synthetic fun defaults-VpY3zN4$default (Lorg/jetbrains/jewel/GlobalMetrics$Companion;FFILjava/lang/Object;)Lorg/jetbrains/jewel/GlobalMetrics; } -public final class org/jetbrains/jewel/intui/standalone/IntUiTheme : org/jetbrains/jewel/intui/core/BaseIntUiTheme { - public static final field $stable I - public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/IntUiTheme; - public final fun darkComponentStyling (Lorg/jetbrains/jewel/styling/CheckboxStyle;Lorg/jetbrains/jewel/styling/ChipStyle;Lorg/jetbrains/jewel/styling/CircularProgressStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/DividerStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/styling/LazyTreeStyle;Lorg/jetbrains/jewel/styling/LinkStyle;Lorg/jetbrains/jewel/styling/MenuStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/RadioButtonStyle;Lorg/jetbrains/jewel/styling/ScrollbarStyle;Lorg/jetbrains/jewel/styling/TextAreaStyle;Lorg/jetbrains/jewel/styling/TextFieldStyle;Lorg/jetbrains/jewel/styling/TooltipStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ComponentStyling; - public final fun darkThemeDefinition-V-9fs2A (Lorg/jetbrains/jewel/GlobalColors;Lorg/jetbrains/jewel/GlobalMetrics;Lorg/jetbrains/jewel/ThemeColorPalette;Lorg/jetbrains/jewel/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ThemeDefinition; - public final fun defaultComponentStyling (Lorg/jetbrains/jewel/ThemeDefinition;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ComponentStyling; - public fun getCheckboxStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/CheckboxStyle; - public fun getChipStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ChipStyle; - public fun getCircularProgressStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/CircularProgressStyle; - public fun getColorPalette (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ThemeColorPalette; - public fun getContentColor (Landroidx/compose/runtime/Composer;I)J - public fun getDefaultButtonStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ButtonStyle; - public fun getDefaultTabStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TabStyle; - public final fun getDefaultTextStyle ()Landroidx/compose/ui/text/TextStyle; - public fun getDividerStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/DividerStyle; - public fun getDropdownStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/DropdownStyle; - public fun getEditorTabStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TabStyle; - public fun getGlobalColors (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/GlobalColors; - public fun getGlobalMetrics (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/GlobalMetrics; - public fun getGroupHeaderStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/GroupHeaderStyle; - public fun getHorizontalProgressBarStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle; - public fun getIconData (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ThemeIconData; - public fun getLabelledTextFieldStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle; - public fun getLinkStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LinkStyle; - public fun getMenuStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/MenuStyle; - public fun getOutlinedButtonStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ButtonStyle; - public fun getRadioButtonStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/RadioButtonStyle; - public fun getScrollbarStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/ScrollbarStyle; - public fun getTextAreaStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TextAreaStyle; - public fun getTextFieldStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/TextFieldStyle; - public fun getTextStyle (Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/text/TextStyle; - public fun getTreeStyle (Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/styling/LazyTreeStyle; - public fun isDark (Landroidx/compose/runtime/Composer;I)Z - public fun isSwingCompatMode (Landroidx/compose/runtime/Composer;I)Z - public final fun lightComponentStyling (Lorg/jetbrains/jewel/styling/CheckboxStyle;Lorg/jetbrains/jewel/styling/ChipStyle;Lorg/jetbrains/jewel/styling/CircularProgressStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/DividerStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/styling/LazyTreeStyle;Lorg/jetbrains/jewel/styling/LinkStyle;Lorg/jetbrains/jewel/styling/MenuStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/RadioButtonStyle;Lorg/jetbrains/jewel/styling/ScrollbarStyle;Lorg/jetbrains/jewel/styling/TextAreaStyle;Lorg/jetbrains/jewel/styling/TextFieldStyle;Lorg/jetbrains/jewel/styling/TooltipStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ComponentStyling; - public final fun lightThemeDefinition-V-9fs2A (Lorg/jetbrains/jewel/GlobalColors;Lorg/jetbrains/jewel/GlobalMetrics;Lorg/jetbrains/jewel/ThemeColorPalette;Lorg/jetbrains/jewel/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ThemeDefinition; -} - public final class org/jetbrains/jewel/intui/standalone/IntUiThemeKt { public static final fun IntUiTheme (Lorg/jetbrains/jewel/ThemeDefinition;Lkotlin/jvm/functions/Function2;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V + public static final fun darkComponentStyling (Lorg/jetbrains/jewel/JewelTheme$Companion;Lorg/jetbrains/jewel/styling/CheckboxStyle;Lorg/jetbrains/jewel/styling/ChipStyle;Lorg/jetbrains/jewel/styling/CircularProgressStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/DividerStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/styling/LazyTreeStyle;Lorg/jetbrains/jewel/styling/LinkStyle;Lorg/jetbrains/jewel/styling/MenuStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/RadioButtonStyle;Lorg/jetbrains/jewel/styling/ScrollbarStyle;Lorg/jetbrains/jewel/styling/TextAreaStyle;Lorg/jetbrains/jewel/styling/TextFieldStyle;Lorg/jetbrains/jewel/styling/TooltipStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ComponentStyling; + public static final fun darkThemeDefinition-RFMEUTM (Lorg/jetbrains/jewel/JewelTheme$Companion;Lorg/jetbrains/jewel/GlobalColors;Lorg/jetbrains/jewel/GlobalMetrics;Lorg/jetbrains/jewel/ThemeColorPalette;Lorg/jetbrains/jewel/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ThemeDefinition; + public static final fun defaultComponentStyling (Lorg/jetbrains/jewel/JewelTheme$Companion;Lorg/jetbrains/jewel/ThemeDefinition;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ComponentStyling; + public static final fun getDefaultTextStyle (Lorg/jetbrains/jewel/JewelTheme$Companion;)Landroidx/compose/ui/text/TextStyle; + public static final fun lightComponentStyling (Lorg/jetbrains/jewel/JewelTheme$Companion;Lorg/jetbrains/jewel/styling/CheckboxStyle;Lorg/jetbrains/jewel/styling/ChipStyle;Lorg/jetbrains/jewel/styling/CircularProgressStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/DividerStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Lorg/jetbrains/jewel/styling/TabStyle;Lorg/jetbrains/jewel/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;Lorg/jetbrains/jewel/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/styling/LazyTreeStyle;Lorg/jetbrains/jewel/styling/LinkStyle;Lorg/jetbrains/jewel/styling/MenuStyle;Lorg/jetbrains/jewel/styling/ButtonStyle;Lorg/jetbrains/jewel/styling/RadioButtonStyle;Lorg/jetbrains/jewel/styling/ScrollbarStyle;Lorg/jetbrains/jewel/styling/TextAreaStyle;Lorg/jetbrains/jewel/styling/TextFieldStyle;Lorg/jetbrains/jewel/styling/TooltipStyle;Lorg/jetbrains/jewel/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ComponentStyling; + public static final fun lightThemeDefinition-RFMEUTM (Lorg/jetbrains/jewel/JewelTheme$Companion;Lorg/jetbrains/jewel/GlobalColors;Lorg/jetbrains/jewel/GlobalMetrics;Lorg/jetbrains/jewel/ThemeColorPalette;Lorg/jetbrains/jewel/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ThemeDefinition; } public final class org/jetbrains/jewel/intui/standalone/InterFontKt { diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt index 15db34721..c770db641 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt @@ -12,13 +12,13 @@ import androidx.compose.ui.unit.sp import org.jetbrains.jewel.ComponentStyling import org.jetbrains.jewel.GlobalColors import org.jetbrains.jewel.GlobalMetrics +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.ThemeColorPalette import org.jetbrains.jewel.ThemeDefinition import org.jetbrains.jewel.ThemeIconData import org.jetbrains.jewel.intui.core.BaseIntUiTheme import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.IntUiTheme.defaultComponentStyling import org.jetbrains.jewel.intui.standalone.styling.Default import org.jetbrains.jewel.intui.standalone.styling.Editor import org.jetbrains.jewel.intui.standalone.styling.Outlined @@ -46,137 +46,135 @@ import org.jetbrains.jewel.styling.TextAreaStyle import org.jetbrains.jewel.styling.TextFieldStyle import org.jetbrains.jewel.styling.TooltipStyle -object IntUiTheme : BaseIntUiTheme { - - val defaultTextStyle = TextStyle.Default.copy( +val JewelTheme.Companion.defaultTextStyle + get() = TextStyle.Default.copy( fontFamily = FontFamily.Inter, fontSize = 13.sp, fontWeight = FontWeight.Normal, fontStyle = FontStyle.Normal, ) - @Composable - fun lightThemeDefinition( - colors: GlobalColors = GlobalColors.light(), - metrics: GlobalMetrics = GlobalMetrics.defaults(), - palette: ThemeColorPalette = IntUiLightTheme.colors, - iconData: ThemeIconData = IntUiLightTheme.iconData, - defaultTextStyle: TextStyle = this.defaultTextStyle, - contentColor: Color = IntUiLightTheme.colors.grey(1), - ) = ThemeDefinition(isDark = false, colors, metrics, defaultTextStyle, contentColor, palette, iconData) +@Composable +fun JewelTheme.Companion.lightThemeDefinition( + colors: GlobalColors = GlobalColors.light(), + metrics: GlobalMetrics = GlobalMetrics.defaults(), + palette: ThemeColorPalette = IntUiLightTheme.colors, + iconData: ThemeIconData = IntUiLightTheme.iconData, + defaultTextStyle: TextStyle = JewelTheme.defaultTextStyle, + contentColor: Color = IntUiLightTheme.colors.grey(1), +) = ThemeDefinition(isDark = false, colors, metrics, defaultTextStyle, contentColor, palette, iconData) - @Composable - fun darkThemeDefinition( - colors: GlobalColors = GlobalColors.dark(), - metrics: GlobalMetrics = GlobalMetrics.defaults(), - palette: ThemeColorPalette = IntUiDarkTheme.colors, - iconData: ThemeIconData = IntUiDarkTheme.iconData, - defaultTextStyle: TextStyle = this.defaultTextStyle, - contentColor: Color = IntUiDarkTheme.colors.grey(12), - ) = ThemeDefinition(isDark = true, colors, metrics, defaultTextStyle, contentColor, palette, iconData) +@Composable +fun JewelTheme.Companion.darkThemeDefinition( + colors: GlobalColors = GlobalColors.dark(), + metrics: GlobalMetrics = GlobalMetrics.defaults(), + palette: ThemeColorPalette = IntUiDarkTheme.colors, + iconData: ThemeIconData = IntUiDarkTheme.iconData, + defaultTextStyle: TextStyle = JewelTheme.defaultTextStyle, + contentColor: Color = IntUiDarkTheme.colors.grey(12), +) = ThemeDefinition(isDark = true, colors, metrics, defaultTextStyle, contentColor, palette, iconData) - @Composable - fun defaultComponentStyling(theme: ThemeDefinition): ComponentStyling = - if (theme.isDark) darkComponentStyling() else lightComponentStyling() +@Composable +fun JewelTheme.Companion.defaultComponentStyling(theme: ThemeDefinition): ComponentStyling = + if (theme.isDark) darkComponentStyling() else lightComponentStyling() - @Composable - fun darkComponentStyling( - checkboxStyle: CheckboxStyle = CheckboxStyle.dark(), - chipStyle: ChipStyle = ChipStyle.dark(), - circularProgressStyle: CircularProgressStyle = CircularProgressStyle.dark(), - defaultButtonStyle: ButtonStyle = ButtonStyle.Default.dark(), - defaultTabStyle: TabStyle = TabStyle.Default.dark(), - dividerStyle: DividerStyle = DividerStyle.dark(), - dropdownStyle: DropdownStyle = DropdownStyle.Default.dark(), - editorTabStyle: TabStyle = TabStyle.Editor.dark(), - groupHeaderStyle: GroupHeaderStyle = GroupHeaderStyle.dark(), - horizontalProgressBarStyle: HorizontalProgressBarStyle = HorizontalProgressBarStyle.dark(), - iconButtonStyle: IconButtonStyle = IconButtonStyle.dark(), - labelledTextFieldStyle: LabelledTextFieldStyle = LabelledTextFieldStyle.dark(), - lazyTreeStyle: LazyTreeStyle = LazyTreeStyle.dark(), - linkStyle: LinkStyle = LinkStyle.dark(), - menuStyle: MenuStyle = MenuStyle.dark(), - outlinedButtonStyle: ButtonStyle = ButtonStyle.Outlined.dark(), - radioButtonStyle: RadioButtonStyle = RadioButtonStyle.dark(), - scrollbarStyle: ScrollbarStyle = ScrollbarStyle.dark(), - textAreaStyle: TextAreaStyle = TextAreaStyle.dark(), - textFieldStyle: TextFieldStyle = TextFieldStyle.dark(), - tooltipStyle: TooltipStyle = TooltipStyle.dark(), - undecoratedDropdownStyle: DropdownStyle = DropdownStyle.Undecorated.dark(), - ) = ComponentStyling( - checkboxStyle = checkboxStyle, - chipStyle = chipStyle, - circularProgressStyle = circularProgressStyle, - defaultButtonStyle = defaultButtonStyle, - defaultDropdownStyle = dropdownStyle, - defaultTabStyle = defaultTabStyle, - dividerStyle = dividerStyle, - editorTabStyle = editorTabStyle, - groupHeaderStyle = groupHeaderStyle, - horizontalProgressBarStyle = horizontalProgressBarStyle, - iconButtonStyle = iconButtonStyle, - labelledTextFieldStyle = labelledTextFieldStyle, - lazyTreeStyle = lazyTreeStyle, - linkStyle = linkStyle, - menuStyle = menuStyle, - outlinedButtonStyle = outlinedButtonStyle, - radioButtonStyle = radioButtonStyle, - scrollbarStyle = scrollbarStyle, - textAreaStyle = textAreaStyle, - textFieldStyle = textFieldStyle, - tooltipStyle = tooltipStyle, - undecoratedDropdownStyle = undecoratedDropdownStyle, - ) +@Composable +fun JewelTheme.Companion.darkComponentStyling( + checkboxStyle: CheckboxStyle = CheckboxStyle.dark(), + chipStyle: ChipStyle = ChipStyle.dark(), + circularProgressStyle: CircularProgressStyle = CircularProgressStyle.dark(), + defaultButtonStyle: ButtonStyle = ButtonStyle.Default.dark(), + defaultTabStyle: TabStyle = TabStyle.Default.dark(), + dividerStyle: DividerStyle = DividerStyle.dark(), + dropdownStyle: DropdownStyle = DropdownStyle.Default.dark(), + editorTabStyle: TabStyle = TabStyle.Editor.dark(), + groupHeaderStyle: GroupHeaderStyle = GroupHeaderStyle.dark(), + horizontalProgressBarStyle: HorizontalProgressBarStyle = HorizontalProgressBarStyle.dark(), + iconButtonStyle: IconButtonStyle = IconButtonStyle.dark(), + labelledTextFieldStyle: LabelledTextFieldStyle = LabelledTextFieldStyle.dark(), + lazyTreeStyle: LazyTreeStyle = LazyTreeStyle.dark(), + linkStyle: LinkStyle = LinkStyle.dark(), + menuStyle: MenuStyle = MenuStyle.dark(), + outlinedButtonStyle: ButtonStyle = ButtonStyle.Outlined.dark(), + radioButtonStyle: RadioButtonStyle = RadioButtonStyle.dark(), + scrollbarStyle: ScrollbarStyle = ScrollbarStyle.dark(), + textAreaStyle: TextAreaStyle = TextAreaStyle.dark(), + textFieldStyle: TextFieldStyle = TextFieldStyle.dark(), + tooltipStyle: TooltipStyle = TooltipStyle.dark(), + undecoratedDropdownStyle: DropdownStyle = DropdownStyle.Undecorated.dark(), +) = ComponentStyling( + checkboxStyle = checkboxStyle, + chipStyle = chipStyle, + circularProgressStyle = circularProgressStyle, + defaultButtonStyle = defaultButtonStyle, + defaultDropdownStyle = dropdownStyle, + defaultTabStyle = defaultTabStyle, + dividerStyle = dividerStyle, + editorTabStyle = editorTabStyle, + groupHeaderStyle = groupHeaderStyle, + horizontalProgressBarStyle = horizontalProgressBarStyle, + iconButtonStyle = iconButtonStyle, + labelledTextFieldStyle = labelledTextFieldStyle, + lazyTreeStyle = lazyTreeStyle, + linkStyle = linkStyle, + menuStyle = menuStyle, + outlinedButtonStyle = outlinedButtonStyle, + radioButtonStyle = radioButtonStyle, + scrollbarStyle = scrollbarStyle, + textAreaStyle = textAreaStyle, + textFieldStyle = textFieldStyle, + tooltipStyle = tooltipStyle, + undecoratedDropdownStyle = undecoratedDropdownStyle, +) - @Composable - fun lightComponentStyling( - checkboxStyle: CheckboxStyle = CheckboxStyle.light(), - chipStyle: ChipStyle = ChipStyle.light(), - circularProgressStyle: CircularProgressStyle = CircularProgressStyle.light(), - defaultButtonStyle: ButtonStyle = ButtonStyle.Default.light(), - defaultTabStyle: TabStyle = TabStyle.Default.light(), - dividerStyle: DividerStyle = DividerStyle.light(), - dropdownStyle: DropdownStyle = DropdownStyle.Default.light(), - editorTabStyle: TabStyle = TabStyle.Editor.light(), - groupHeaderStyle: GroupHeaderStyle = GroupHeaderStyle.light(), - horizontalProgressBarStyle: HorizontalProgressBarStyle = HorizontalProgressBarStyle.light(), - iconButtonStyle: IconButtonStyle = IconButtonStyle.light(), - labelledTextFieldStyle: LabelledTextFieldStyle = LabelledTextFieldStyle.light(), - lazyTreeStyle: LazyTreeStyle = LazyTreeStyle.light(), - linkStyle: LinkStyle = LinkStyle.light(), - menuStyle: MenuStyle = MenuStyle.light(), - outlinedButtonStyle: ButtonStyle = ButtonStyle.Outlined.light(), - radioButtonStyle: RadioButtonStyle = RadioButtonStyle.light(), - scrollbarStyle: ScrollbarStyle = ScrollbarStyle.light(), - textAreaStyle: TextAreaStyle = TextAreaStyle.light(), - textFieldStyle: TextFieldStyle = TextFieldStyle.light(), - tooltipStyle: TooltipStyle = TooltipStyle.light(), - undecoratedDropdownStyle: DropdownStyle = DropdownStyle.Undecorated.light(), - ) = ComponentStyling( - checkboxStyle = checkboxStyle, - chipStyle = chipStyle, - circularProgressStyle = circularProgressStyle, - defaultButtonStyle = defaultButtonStyle, - defaultDropdownStyle = dropdownStyle, - defaultTabStyle = defaultTabStyle, - dividerStyle = dividerStyle, - editorTabStyle = editorTabStyle, - groupHeaderStyle = groupHeaderStyle, - horizontalProgressBarStyle = horizontalProgressBarStyle, - iconButtonStyle = iconButtonStyle, - labelledTextFieldStyle = labelledTextFieldStyle, - lazyTreeStyle = lazyTreeStyle, - linkStyle = linkStyle, - menuStyle = menuStyle, - outlinedButtonStyle = outlinedButtonStyle, - radioButtonStyle = radioButtonStyle, - scrollbarStyle = scrollbarStyle, - textAreaStyle = textAreaStyle, - textFieldStyle = textFieldStyle, - tooltipStyle = tooltipStyle, - undecoratedDropdownStyle = undecoratedDropdownStyle, - ) -} +@Composable +fun JewelTheme.Companion.lightComponentStyling( + checkboxStyle: CheckboxStyle = CheckboxStyle.light(), + chipStyle: ChipStyle = ChipStyle.light(), + circularProgressStyle: CircularProgressStyle = CircularProgressStyle.light(), + defaultButtonStyle: ButtonStyle = ButtonStyle.Default.light(), + defaultTabStyle: TabStyle = TabStyle.Default.light(), + dividerStyle: DividerStyle = DividerStyle.light(), + dropdownStyle: DropdownStyle = DropdownStyle.Default.light(), + editorTabStyle: TabStyle = TabStyle.Editor.light(), + groupHeaderStyle: GroupHeaderStyle = GroupHeaderStyle.light(), + horizontalProgressBarStyle: HorizontalProgressBarStyle = HorizontalProgressBarStyle.light(), + iconButtonStyle: IconButtonStyle = IconButtonStyle.light(), + labelledTextFieldStyle: LabelledTextFieldStyle = LabelledTextFieldStyle.light(), + lazyTreeStyle: LazyTreeStyle = LazyTreeStyle.light(), + linkStyle: LinkStyle = LinkStyle.light(), + menuStyle: MenuStyle = MenuStyle.light(), + outlinedButtonStyle: ButtonStyle = ButtonStyle.Outlined.light(), + radioButtonStyle: RadioButtonStyle = RadioButtonStyle.light(), + scrollbarStyle: ScrollbarStyle = ScrollbarStyle.light(), + textAreaStyle: TextAreaStyle = TextAreaStyle.light(), + textFieldStyle: TextFieldStyle = TextFieldStyle.light(), + tooltipStyle: TooltipStyle = TooltipStyle.light(), + undecoratedDropdownStyle: DropdownStyle = DropdownStyle.Undecorated.light(), +) = ComponentStyling( + checkboxStyle = checkboxStyle, + chipStyle = chipStyle, + circularProgressStyle = circularProgressStyle, + defaultButtonStyle = defaultButtonStyle, + defaultDropdownStyle = dropdownStyle, + defaultTabStyle = defaultTabStyle, + dividerStyle = dividerStyle, + editorTabStyle = editorTabStyle, + groupHeaderStyle = groupHeaderStyle, + horizontalProgressBarStyle = horizontalProgressBarStyle, + iconButtonStyle = iconButtonStyle, + labelledTextFieldStyle = labelledTextFieldStyle, + lazyTreeStyle = lazyTreeStyle, + linkStyle = linkStyle, + menuStyle = menuStyle, + outlinedButtonStyle = outlinedButtonStyle, + radioButtonStyle = radioButtonStyle, + scrollbarStyle = scrollbarStyle, + textAreaStyle = textAreaStyle, + textFieldStyle = textFieldStyle, + tooltipStyle = tooltipStyle, + undecoratedDropdownStyle = undecoratedDropdownStyle, +) @Composable fun IntUiTheme( @@ -187,7 +185,7 @@ fun IntUiTheme( ) { BaseIntUiTheme( theme, - componentStyling = { defaultComponentStyling(theme).providedStyles() + componentStyling() }, + componentStyling = { JewelTheme.defaultComponentStyling(theme).providedStyles() + componentStyling() }, swingCompatMode, ) { CompositionLocalProvider( diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt index ca136bae7..403da1b70 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownStyling.kt @@ -8,9 +8,10 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.intui.standalone.defaultTextStyle import org.jetbrains.jewel.intui.standalone.standalonePainterProvider import org.jetbrains.jewel.painter.PainterProvider import org.jetbrains.jewel.styling.DropdownColors @@ -29,7 +30,7 @@ object IntUiDefaultDropdownStyleFactory { colors: DropdownColors = DropdownColors.Default.light(), metrics: DropdownMetrics = DropdownMetrics.default(), icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, menuStyle: MenuStyle = MenuStyle.light(), ) = DropdownStyle(colors, metrics, icons, textStyle, menuStyle) @@ -38,7 +39,7 @@ object IntUiDefaultDropdownStyleFactory { colors: DropdownColors = DropdownColors.Default.dark(), metrics: DropdownMetrics = DropdownMetrics.default(), icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, menuStyle: MenuStyle = MenuStyle.dark(), ) = DropdownStyle(colors, metrics, icons, textStyle, menuStyle) } @@ -53,7 +54,7 @@ object IntUiUndecoratedDropdownStyleFactory { colors: DropdownColors = DropdownColors.Undecorated.light(), metrics: DropdownMetrics = DropdownMetrics.undecorated(), icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, menuStyle: MenuStyle = MenuStyle.light(), ) = DropdownStyle(colors, metrics, icons, textStyle, menuStyle) @@ -62,7 +63,7 @@ object IntUiUndecoratedDropdownStyleFactory { colors: DropdownColors = DropdownColors.Undecorated.dark(), metrics: DropdownMetrics = DropdownMetrics.undecorated(), icons: DropdownIcons = DropdownIcons.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, menuStyle: MenuStyle = MenuStyle.dark(), ) = DropdownStyle(colors, metrics, icons, textStyle, menuStyle) } diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStyling.kt index 537665a9b..73086422b 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStyling.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStyling.kt @@ -9,9 +9,10 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.intui.standalone.defaultTextStyle import org.jetbrains.jewel.styling.LabelledTextFieldColors import org.jetbrains.jewel.styling.LabelledTextFieldMetrics import org.jetbrains.jewel.styling.LabelledTextFieldStyle @@ -21,7 +22,7 @@ import org.jetbrains.jewel.styling.LabelledTextFieldTextStyles fun LabelledTextFieldStyle.Companion.light( colors: LabelledTextFieldColors = LabelledTextFieldColors.light(), metrics: LabelledTextFieldMetrics = LabelledTextFieldMetrics.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, textStyles: LabelledTextFieldTextStyles = LabelledTextFieldTextStyles.light(), ) = LabelledTextFieldStyle(colors, metrics, textStyle, textStyles) @@ -29,7 +30,7 @@ fun LabelledTextFieldStyle.Companion.light( fun LabelledTextFieldStyle.Companion.dark( colors: LabelledTextFieldColors = LabelledTextFieldColors.dark(), metrics: LabelledTextFieldMetrics = LabelledTextFieldMetrics.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, textStyles: LabelledTextFieldTextStyles = LabelledTextFieldTextStyles.dark(), ) = LabelledTextFieldStyle(colors, metrics, textStyle, textStyles) @@ -145,16 +146,16 @@ fun LabelledTextFieldMetrics.Companion.defaults( ) = LabelledTextFieldMetrics(borderWidth, contentPadding, cornerSize, minSize, labelSpacing, hintSpacing) fun LabelledTextFieldTextStyles.Companion.light( - label: TextStyle = IntUiTheme.defaultTextStyle, - hint: TextStyle = IntUiTheme.defaultTextStyle.copy( + label: TextStyle = JewelTheme.defaultTextStyle, + hint: TextStyle = JewelTheme.defaultTextStyle.copy( fontSize = 12.sp, lineHeight = 16.sp, ), ) = LabelledTextFieldTextStyles(label, hint) fun LabelledTextFieldTextStyles.Companion.dark( - label: TextStyle = IntUiTheme.defaultTextStyle, - hint: TextStyle = IntUiTheme.defaultTextStyle.copy( + label: TextStyle = JewelTheme.defaultTextStyle, + hint: TextStyle = JewelTheme.defaultTextStyle.copy( fontSize = 12.sp, lineHeight = 16.sp, ), diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt index 0bd878cab..f0774a1f6 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiLinkStyling.kt @@ -8,9 +8,10 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.intui.standalone.defaultTextStyle import org.jetbrains.jewel.intui.standalone.standalonePainterProvider import org.jetbrains.jewel.painter.PainterProvider import org.jetbrains.jewel.styling.LinkColors @@ -82,8 +83,8 @@ fun LinkIcons.Companion.defaults( @Composable fun LinkTextStyles.Companion.light( - normal: TextStyle = IntUiTheme.defaultTextStyle.copy(textDecoration = TextDecoration.Underline), - disabled: TextStyle = IntUiTheme.defaultTextStyle, + normal: TextStyle = JewelTheme.defaultTextStyle.copy(textDecoration = TextDecoration.Underline), + disabled: TextStyle = JewelTheme.defaultTextStyle, focused: TextStyle = normal, pressed: TextStyle = normal, hovered: TextStyle = normal, @@ -92,8 +93,8 @@ fun LinkTextStyles.Companion.light( @Composable fun LinkTextStyles.Companion.dark( - normal: TextStyle = IntUiTheme.defaultTextStyle.copy(textDecoration = TextDecoration.Underline), - disabled: TextStyle = IntUiTheme.defaultTextStyle, + normal: TextStyle = JewelTheme.defaultTextStyle.copy(textDecoration = TextDecoration.Underline), + disabled: TextStyle = JewelTheme.defaultTextStyle, focused: TextStyle = normal, pressed: TextStyle = normal, hovered: TextStyle = normal, diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt index df4441624..9231b43a7 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextAreaStyling.kt @@ -8,9 +8,10 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.intui.standalone.defaultTextStyle import org.jetbrains.jewel.styling.TextAreaColors import org.jetbrains.jewel.styling.TextAreaMetrics import org.jetbrains.jewel.styling.TextAreaStyle @@ -19,14 +20,14 @@ import org.jetbrains.jewel.styling.TextAreaStyle fun TextAreaStyle.Companion.light( colors: TextAreaColors = TextAreaColors.light(), metrics: TextAreaMetrics = TextAreaMetrics.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, ) = TextAreaStyle(colors, metrics, textStyle) @Composable fun TextAreaStyle.Companion.dark( colors: TextAreaColors = TextAreaColors.dark(), metrics: TextAreaMetrics = TextAreaMetrics.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, ) = TextAreaStyle(colors, metrics, textStyle) @Composable diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt index 1c4fe15e5..72817ce07 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiTextFieldStyling.kt @@ -8,9 +8,10 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.intui.core.theme.IntUiDarkTheme import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme -import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.intui.standalone.defaultTextStyle import org.jetbrains.jewel.styling.TextFieldColors import org.jetbrains.jewel.styling.TextFieldMetrics import org.jetbrains.jewel.styling.TextFieldStyle @@ -19,14 +20,14 @@ import org.jetbrains.jewel.styling.TextFieldStyle fun TextFieldStyle.Companion.light( colors: TextFieldColors = TextFieldColors.light(), metrics: TextFieldMetrics = TextFieldMetrics.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, ) = TextFieldStyle(colors, metrics, textStyle) @Composable fun TextFieldStyle.Companion.dark( colors: TextFieldColors = TextFieldColors.dark(), metrics: TextFieldMetrics = TextFieldMetrics.defaults(), - textStyle: TextStyle = IntUiTheme.defaultTextStyle, + textStyle: TextStyle = JewelTheme.defaultTextStyle, ) = TextFieldStyle(colors, metrics, textStyle) @Composable diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt index 104bdc6ba..e28cf47d5 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/Main.kt @@ -36,11 +36,14 @@ import org.jetbrains.jewel.Divider import org.jetbrains.jewel.Dropdown import org.jetbrains.jewel.Icon import org.jetbrains.jewel.IconButton +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.Orientation import org.jetbrains.jewel.Text import org.jetbrains.jewel.Tooltip import org.jetbrains.jewel.VerticalScrollbar import org.jetbrains.jewel.intui.standalone.IntUiTheme +import org.jetbrains.jewel.intui.standalone.darkThemeDefinition +import org.jetbrains.jewel.intui.standalone.lightThemeDefinition import org.jetbrains.jewel.intui.window.decoratedWindowComponentStyling import org.jetbrains.jewel.intui.window.styling.dark import org.jetbrains.jewel.intui.window.styling.light @@ -70,12 +73,18 @@ import java.net.URI fun main() { val icon = svgResource("icons/jewel-logo.svg") application { - var intUiTheme by remember { mutableStateOf(IntUiThemes.Light) } + var theme by remember { mutableStateOf(IntUiThemes.Light) } var swingCompat by remember { mutableStateOf(false) } - val theme = if (intUiTheme.isDark()) IntUiTheme.darkThemeDefinition() else IntUiTheme.lightThemeDefinition() + val themeDefinition = + if (theme.isDark()) { + JewelTheme.darkThemeDefinition() + } else { + JewelTheme.lightThemeDefinition() + } + val projectColor by rememberUpdatedState( - if (intUiTheme.isLightHeader()) { + if (theme.isLightHeader()) { Color(0xFFF5D4C1) } else { Color(0xFF654B40) @@ -83,10 +92,10 @@ fun main() { ) IntUiTheme( - theme, - { - theme.decoratedWindowComponentStyling( - titleBarStyle = when (intUiTheme) { + themeDefinition, + componentStyling = { + themeDefinition.decoratedWindowComponentStyling( + titleBarStyle = when (theme) { IntUiThemes.Light -> TitleBarStyle.light() IntUiThemes.LightWithLightHeader -> TitleBarStyle.lightWithLightHeader() IntUiThemes.Dark -> TitleBarStyle.dark() @@ -100,10 +109,10 @@ fun main() { title = "Jewel component catalog", icon = icon, ) { - val windowBackground = if (intUiTheme.isDark()) { - IntUiTheme.colorPalette.grey(1) + val windowBackground = if (theme.isDark()) { + JewelTheme.colorPalette.grey(1) } else { - IntUiTheme.colorPalette.grey(14) + JewelTheme.colorPalette.grey(14) } TitleBar(Modifier.newFullscreenControls(), gradientStartColor = projectColor) { Row(Modifier.align(Alignment.Start)) { @@ -147,20 +156,20 @@ fun main() { } Tooltip({ - when (intUiTheme) { + when (theme) { IntUiThemes.Light -> Text("Switch to light theme with light header") IntUiThemes.LightWithLightHeader -> Text("Switch to dark theme") IntUiThemes.Dark -> Text("Switch to light theme") } }) { IconButton({ - intUiTheme = when (intUiTheme) { + theme = when (theme) { IntUiThemes.Light -> IntUiThemes.LightWithLightHeader IntUiThemes.LightWithLightHeader -> IntUiThemes.Dark IntUiThemes.Dark -> IntUiThemes.Light } }, Modifier.size(40.dp).padding(5.dp)) { - if (intUiTheme.isDark()) { + if (theme.isDark()) { Icon("icons/darkTheme@20x20.svg", "Themes", StandaloneSampleIcons::class.java) } else { Icon("icons/lightTheme@20x20.svg", "Themes", StandaloneSampleIcons::class.java) diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Borders.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Borders.kt index 5d465a9d1..1452d108e 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Borders.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Borders.kt @@ -16,12 +16,12 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.unit.dp import org.jetbrains.jewel.GroupHeader +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.OutlinedButton import org.jetbrains.jewel.RadioButtonRow import org.jetbrains.jewel.Text import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border -import org.jetbrains.jewel.intui.standalone.IntUiTheme @Composable internal fun Borders() { @@ -84,7 +84,7 @@ internal fun Borders() { .border( borderAlignment, width, - IntUiTheme.colorPalette.blue(4), + JewelTheme.colorPalette.blue(4), CircleShape, expand, ), @@ -94,7 +94,7 @@ internal fun Borders() { .border( borderAlignment, width, - IntUiTheme.colorPalette.blue(4), + JewelTheme.colorPalette.blue(4), RectangleShape, expand, ), @@ -104,7 +104,7 @@ internal fun Borders() { .border( borderAlignment, width, - IntUiTheme.colorPalette.blue(4), + JewelTheme.colorPalette.blue(4), RoundedCornerShape(4.dp), expand, ), @@ -114,7 +114,7 @@ internal fun Borders() { .border( borderAlignment, width, - IntUiTheme.colorPalette.blue(4), + JewelTheme.colorPalette.blue(4), RoundedCornerShape(4.dp, 0.dp, 4.dp, 0.dp), expand, ), diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt index 7782975f4..93d785ede 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt @@ -24,13 +24,13 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import org.jetbrains.jewel.Chip import org.jetbrains.jewel.GroupHeader +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.LazyTree import org.jetbrains.jewel.RadioButtonChip import org.jetbrains.jewel.Text import org.jetbrains.jewel.ToggleableChip import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn import org.jetbrains.jewel.foundation.tree.buildTree -import org.jetbrains.jewel.intui.standalone.IntUiTheme @Composable fun ChipsAndTree() { @@ -171,10 +171,10 @@ fun TreeSample(modifier: Modifier = Modifier) { } val borderColor = - if (IntUiTheme.isDark) { - IntUiTheme.colorPalette.grey(3) + if (JewelTheme.isDark) { + JewelTheme.colorPalette.grey(3) } else { - IntUiTheme.colorPalette.grey(12) + JewelTheme.colorPalette.grey(12) } Box(modifier.border(1.dp, borderColor, RoundedCornerShape(2.dp))) { diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tabs.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tabs.kt index 4ce924d82..d95c7d021 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tabs.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tabs.kt @@ -31,7 +31,6 @@ import org.jetbrains.jewel.NoIndication import org.jetbrains.jewel.TabData import org.jetbrains.jewel.TabStrip import org.jetbrains.jewel.Text -import org.jetbrains.jewel.intui.standalone.IntUiTheme import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons import kotlin.math.max @@ -140,9 +139,9 @@ private fun TabStripWithAddButton( // TODO create an IconButton instead of this hack val backgroundColor = if (isHovered) { - IntUiTheme.defaultTabStyle.colors.backgroundHovered + JewelTheme.defaultTabStyle.colors.backgroundHovered } else { - IntUiTheme.defaultTabStyle.colors.background + JewelTheme.defaultTabStyle.colors.background } Box( @@ -157,7 +156,11 @@ private fun TabStripWithAddButton( .background(backgroundColor), contentAlignment = Alignment.Center, ) { - Icon(resource = "expui/general/add.svg", contentDescription = "Add a tab", StandaloneSampleIcons::class.java) + Icon( + resource = "expui/general/add.svg", + contentDescription = "Add a tab", + StandaloneSampleIcons::class.java, + ) } } } diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tooltips.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tooltips.kt index 0b3c38e06..119471962 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tooltips.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/Tooltips.kt @@ -6,9 +6,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import org.jetbrains.jewel.GroupHeader +import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.Text import org.jetbrains.jewel.Tooltip -import org.jetbrains.jewel.intui.standalone.IntUiTheme @Composable fun Tooltips() { @@ -16,6 +16,6 @@ fun Tooltips() { Tooltip(tooltip = { Text("This is a tooltip") }) { - Text(modifier = Modifier.border(1.dp, IntUiTheme.globalColors.borders.normal).padding(4.dp), text = "Hover Me!") + Text(modifier = Modifier.border(1.dp, JewelTheme.globalColors.borders.normal).padding(4.dp), text = "Hover Me!") } }