Skip to content

Commit

Permalink
Final cleanup pass
Browse files Browse the repository at this point in the history
  • Loading branch information
rock3r committed Oct 20, 2023
1 parent 284e68c commit f85d23c
Show file tree
Hide file tree
Showing 18 changed files with 408 additions and 796 deletions.
329 changes: 189 additions & 140 deletions core/api/core.api

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion core/src/main/kotlin/org/jetbrains/jewel/Outline.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import org.jetbrains.jewel.util.thenIf
enum class Outline {
None,
Warning,
Error;
Error,
;

companion object {

Expand Down
167 changes: 111 additions & 56 deletions decorated-window/api/decorated-window.api
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public final class org/jetbrains/jewel/window/DecoratedWindowState$Companion {
}

public final class org/jetbrains/jewel/window/ThemeKt {
public static final fun getDefaultDecoratedWindowStyle (Lorg/jetbrains/jewel/IntelliJTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;
public static final fun getDefaultTitleBarStyle (Lorg/jetbrains/jewel/IntelliJTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/window/styling/TitleBarStyle;
public static final fun getDefaultDecoratedWindowStyle (Lorg/jetbrains/jewel/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;
public static final fun getDefaultTitleBarStyle (Lorg/jetbrains/jewel/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/window/styling/TitleBarStyle;
}

public final class org/jetbrains/jewel/window/TitleBarKt {
Expand All @@ -109,72 +109,127 @@ public final class org/jetbrains/jewel/window/TitleBar_MacOSKt {
public static synthetic fun newFullscreenControls$default (Landroidx/compose/ui/Modifier;ZILjava/lang/Object;)Landroidx/compose/ui/Modifier;
}

public abstract interface class org/jetbrains/jewel/window/styling/DecoratedWindowColors {
public abstract fun borderFor-3hEOMOc (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
public abstract fun getBorder-0d7_KjU ()J
public abstract fun getBorderInactive-0d7_KjU ()J
public final class org/jetbrains/jewel/window/styling/DecoratedWindowColors {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion;
public synthetic fun <init> (JJLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun borderFor-3hEOMOc (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
public fun equals (Ljava/lang/Object;)Z
public final fun getBorder-0d7_KjU ()J
public final fun getBorderInactive-0d7_KjU ()J
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class org/jetbrains/jewel/window/styling/DecoratedWindowColors$Companion {
}

public final class org/jetbrains/jewel/window/styling/DecoratedWindowMetrics {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics$Companion;
public synthetic fun <init> (FLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getBorderWidth-D9Ej5fM ()F
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class org/jetbrains/jewel/window/styling/DecoratedWindowColors$DefaultImpls {
public static fun borderFor-3hEOMOc (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
public final class org/jetbrains/jewel/window/styling/DecoratedWindowMetrics$Companion {
}

public abstract interface class org/jetbrains/jewel/window/styling/DecoratedWindowMetrics {
public abstract fun getBorderWidth-D9Ej5fM ()F
public final class org/jetbrains/jewel/window/styling/DecoratedWindowStyle {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion;
public fun <init> (Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getColors ()Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;
public final fun getMetrics ()Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract interface class org/jetbrains/jewel/window/styling/DecoratedWindowStyle {
public abstract fun getColors ()Lorg/jetbrains/jewel/window/styling/DecoratedWindowColors;
public abstract fun getMetrics ()Lorg/jetbrains/jewel/window/styling/DecoratedWindowMetrics;
public final class org/jetbrains/jewel/window/styling/DecoratedWindowStyle$Companion {
}

public final class org/jetbrains/jewel/window/styling/DecoratedWindowStylingKt {
public static final fun getLocalDecoratedWindowStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public abstract interface class org/jetbrains/jewel/window/styling/TitleBarColors {
public abstract fun backgroundFor-3hEOMOc (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
public abstract fun getBackground-0d7_KjU ()J
public abstract fun getBorder-0d7_KjU ()J
public abstract fun getContent-0d7_KjU ()J
public abstract fun getDropdownHoveredBackground-0d7_KjU ()J
public abstract fun getDropdownPressedBackground-0d7_KjU ()J
public abstract fun getFullscreenControlButtonsBackground-0d7_KjU ()J
public abstract fun getIconButtonHoveredBackground-0d7_KjU ()J
public abstract fun getIconButtonPressedBackground-0d7_KjU ()J
public abstract fun getInactiveBackground-0d7_KjU ()J
public abstract fun getTitlePaneButtonHoveredBackground-0d7_KjU ()J
public abstract fun getTitlePaneButtonPressedBackground-0d7_KjU ()J
public abstract fun getTitlePaneCloseButtonHoveredBackground-0d7_KjU ()J
public abstract fun getTitlePaneCloseButtonPressedBackground-0d7_KjU ()J
}

public final class org/jetbrains/jewel/window/styling/TitleBarColors$DefaultImpls {
public static fun backgroundFor-3hEOMOc (Lorg/jetbrains/jewel/window/styling/TitleBarColors;JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
}

public abstract interface class org/jetbrains/jewel/window/styling/TitleBarIcons {
public abstract fun getCloseButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public abstract fun getMaximizeButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public abstract fun getMinimizeButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public abstract fun getRestoreButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
}

public abstract interface class org/jetbrains/jewel/window/styling/TitleBarMetrics {
public abstract fun getGradientEndX-D9Ej5fM ()F
public abstract fun getGradientStartX-D9Ej5fM ()F
public abstract fun getHeight-D9Ej5fM ()F
public abstract fun getTitlePaneButtonSize-MYxV2XQ ()J
}

public abstract interface class org/jetbrains/jewel/window/styling/TitleBarStyle {
public abstract fun getColors ()Lorg/jetbrains/jewel/window/styling/TitleBarColors;
public abstract fun getDropdownStyle ()Lorg/jetbrains/jewel/styling/DropdownStyle;
public abstract fun getIconButtonStyle ()Lorg/jetbrains/jewel/styling/IconButtonStyle;
public abstract fun getIcons ()Lorg/jetbrains/jewel/window/styling/TitleBarIcons;
public abstract fun getMetrics ()Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;
public abstract fun getPaneButtonStyle ()Lorg/jetbrains/jewel/styling/IconButtonStyle;
public abstract fun getPaneCloseButtonStyle ()Lorg/jetbrains/jewel/styling/IconButtonStyle;
public final class org/jetbrains/jewel/window/styling/TitleBarColors {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarColors$Companion;
public synthetic fun <init> (JJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun backgroundFor-3hEOMOc (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
public fun equals (Ljava/lang/Object;)Z
public final fun getBackground-0d7_KjU ()J
public final fun getBorder-0d7_KjU ()J
public final fun getContent-0d7_KjU ()J
public final fun getDropdownHoveredBackground-0d7_KjU ()J
public final fun getDropdownPressedBackground-0d7_KjU ()J
public final fun getFullscreenControlButtonsBackground-0d7_KjU ()J
public final fun getIconButtonHoveredBackground-0d7_KjU ()J
public final fun getIconButtonPressedBackground-0d7_KjU ()J
public final fun getInactiveBackground-0d7_KjU ()J
public final fun getTitlePaneButtonHoveredBackground-0d7_KjU ()J
public final fun getTitlePaneButtonPressedBackground-0d7_KjU ()J
public final fun getTitlePaneCloseButtonHoveredBackground-0d7_KjU ()J
public final fun getTitlePaneCloseButtonPressedBackground-0d7_KjU ()J
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class org/jetbrains/jewel/window/styling/TitleBarColors$Companion {
}

public final class org/jetbrains/jewel/window/styling/TitleBarIcons {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarIcons$Companion;
public fun <init> (Lorg/jetbrains/jewel/painter/PainterProvider;Lorg/jetbrains/jewel/painter/PainterProvider;Lorg/jetbrains/jewel/painter/PainterProvider;Lorg/jetbrains/jewel/painter/PainterProvider;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getCloseButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public final fun getMaximizeButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public final fun getMinimizeButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public final fun getRestoreButton ()Lorg/jetbrains/jewel/painter/PainterProvider;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class org/jetbrains/jewel/window/styling/TitleBarIcons$Companion {
}

public final class org/jetbrains/jewel/window/styling/TitleBarMetrics {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarMetrics$Companion;
public synthetic fun <init> (FFFJLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getGradientEndX-D9Ej5fM ()F
public final fun getGradientStartX-D9Ej5fM ()F
public final fun getHeight-D9Ej5fM ()F
public final fun getTitlePaneButtonSize-MYxV2XQ ()J
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class org/jetbrains/jewel/window/styling/TitleBarMetrics$Companion {
}

public final class org/jetbrains/jewel/window/styling/TitleBarStyle {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/window/styling/TitleBarStyle$Companion;
public fun <init> (Lorg/jetbrains/jewel/window/styling/TitleBarColors;Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;Lorg/jetbrains/jewel/window/styling/TitleBarIcons;Lorg/jetbrains/jewel/styling/DropdownStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;Lorg/jetbrains/jewel/styling/IconButtonStyle;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getColors ()Lorg/jetbrains/jewel/window/styling/TitleBarColors;
public final fun getDropdownStyle ()Lorg/jetbrains/jewel/styling/DropdownStyle;
public final fun getIconButtonStyle ()Lorg/jetbrains/jewel/styling/IconButtonStyle;
public final fun getIcons ()Lorg/jetbrains/jewel/window/styling/TitleBarIcons;
public final fun getMetrics ()Lorg/jetbrains/jewel/window/styling/TitleBarMetrics;
public final fun getPaneButtonStyle ()Lorg/jetbrains/jewel/styling/IconButtonStyle;
public final fun getPaneCloseButtonStyle ()Lorg/jetbrains/jewel/styling/IconButtonStyle;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class org/jetbrains/jewel/window/styling/TitleBarStyle$Companion {
}

public final class org/jetbrains/jewel/window/styling/TitleBarStylingKt {
Expand Down
39 changes: 13 additions & 26 deletions ide-laf-bridge/api/ide-laf-bridge.api
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
public final class org/jetbrains/jewel/bridge/BridgeResourceResolverKt {
public static final fun bridgePainterProvider (Ljava/lang/String;)Lorg/jetbrains/jewel/painter/ResourcePainterProvider;
public final class org/jetbrains/jewel/bridge/BridgeGlobalColorsKt {
public static final fun readFromLaF (Lorg/jetbrains/jewel/BorderColors$Companion;)Lorg/jetbrains/jewel/BorderColors;
public static final fun readFromLaF (Lorg/jetbrains/jewel/GlobalColors$Companion;)Lorg/jetbrains/jewel/GlobalColors;
public static final fun readFromLaF (Lorg/jetbrains/jewel/OutlineColors$Companion;)Lorg/jetbrains/jewel/OutlineColors;
}

public final class org/jetbrains/jewel/bridge/BridgeThemeColorPalette : org/jetbrains/jewel/intui/core/IntUiThemeColorPalette {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/bridge/BridgeThemeColorPalette$Companion;
public synthetic fun <init> (Ljava/util/Map;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun blue ()Ljava/util/List;
public fun blue-vNxB06k (I)J
public fun getRawMap ()Ljava/util/Map;
public fun green ()Ljava/util/List;
public fun green-vNxB06k (I)J
public fun grey ()Ljava/util/List;
public fun grey-vNxB06k (I)J
public fun lookup-ijrfgN4 (Ljava/lang/String;)Landroidx/compose/ui/graphics/Color;
public fun orange ()Ljava/util/List;
public fun orange-vNxB06k (I)J
public fun purple ()Ljava/util/List;
public fun purple-vNxB06k (I)J
public fun red ()Ljava/util/List;
public fun red-vNxB06k (I)J
public fun teal ()Ljava/util/List;
public fun teal-vNxB06k (I)J
public fun yellow ()Ljava/util/List;
public fun yellow-vNxB06k (I)J
public final class org/jetbrains/jewel/bridge/BridgeGlobalMetricsKt {
public static final fun readFromLaF (Lorg/jetbrains/jewel/GlobalMetrics$Companion;)Lorg/jetbrains/jewel/GlobalMetrics;
}

public final class org/jetbrains/jewel/bridge/BridgeResourceResolverKt {
public static final fun bridgePainterProvider (Ljava/lang/String;)Lorg/jetbrains/jewel/painter/ResourcePainterProvider;
}

public final class org/jetbrains/jewel/bridge/BridgeThemeColorPalette$Companion {
public final fun readFromLaF ()Lorg/jetbrains/jewel/bridge/BridgeThemeColorPalette;
public final class org/jetbrains/jewel/bridge/BridgeThemeColorPaletteKt {
public static final fun getWindowsPopupBorder (Lorg/jetbrains/jewel/ThemeColorPalette;)Landroidx/compose/ui/graphics/Color;
public static final fun readFromLaF (Lorg/jetbrains/jewel/ThemeColorPalette$Companion;)Lorg/jetbrains/jewel/ThemeColorPalette;
}

public final class org/jetbrains/jewel/bridge/BridgeUtilsKt {
Expand Down
5 changes: 3 additions & 2 deletions ide-laf-bridge/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import SupportedIJVersion.*
import SupportedIJVersion.IJ_232
import SupportedIJVersion.IJ_233

plugins {
jewel
Expand All @@ -8,7 +9,7 @@ plugins {
}

dependencies {
api(projects.intUi.intUiStandalone) {
api(projects.intUi.intUiCore) {
exclude(group = "org.jetbrains.kotlinx")
}
when (supportedIJVersion()) {
Expand Down
4 changes: 2 additions & 2 deletions ide-laf-bridge/ide-laf-bridge-232/api/ide-laf-bridge-232.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public final class org/jetbrains/jewel/bridge/BridgeIconData$Companion {
public final fun readFromLaF ()Lorg/jetbrains/jewel/bridge/BridgeIconData;
public final class org/jetbrains/jewel/bridge/BridgeIconDataKt {
public static final fun readFromLaF (Lorg/jetbrains/jewel/ThemeIconData$Companion;)Lorg/jetbrains/jewel/ThemeIconData;
}

public final class org/jetbrains/jewel/bridge/BridgePainterHintsProvider$Companion {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,18 @@
package org.jetbrains.jewel.bridge

import androidx.compose.runtime.Immutable
import com.intellij.ide.ui.UITheme
import com.intellij.ui.ColorUtil
import org.jetbrains.jewel.InternalJewelApi
import org.jetbrains.jewel.ThemeIconData

@Immutable
@InternalJewelApi
class BridgeIconData(
override val iconOverrides: Map<String, String>,
override val colorPalette: Map<String, String>,
override val selectionColorPalette: Map<String, Int>,
) : ThemeIconData {

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as BridgeIconData

if (iconOverrides != other.iconOverrides) return false
if (colorPalette != other.colorPalette) return false
if (selectionColorPalette != other.selectionColorPalette) return false

return true
}

override fun hashCode(): Int {
var result = iconOverrides.hashCode()
result = 31 * result + colorPalette.hashCode()
result = 31 * result + selectionColorPalette.hashCode()
return result
@OptIn(InternalJewelApi::class)
fun ThemeIconData.Companion.readFromLaF(): ThemeIconData {
val uiTheme = currentUiThemeOrNull()
val iconMap = uiTheme?.icons.orEmpty()
val selectedIconColorPalette = uiTheme?.selectedIconColorPalette.orEmpty().mapValues {
ColorUtil.fromHex(it.value).rgb
}

override fun toString(): String =
"BridgeIconData(iconOverrides=$iconOverrides, colorPalette=$colorPalette, " +
"selectionColorPalette=$selectionColorPalette)"

companion object {

@OptIn(InternalJewelApi::class)
fun readFromLaF(): BridgeIconData {
val uiTheme = currentUiThemeOrNull()
val iconMap = uiTheme?.icons.orEmpty()
val selectedIconColorPalette = uiTheme?.selectedIconColorPalette.orEmpty().mapValues {
ColorUtil.fromHex(it.value).rgb
}

val colorPalette = UITheme.getColorPalette()
return BridgeIconData(iconMap, colorPalette, selectedIconColorPalette)
}
}
val colorPalette = UITheme.getColorPalette()
return ThemeIconData(iconMap, colorPalette, selectedIconColorPalette)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalDensity
import com.intellij.ide.ui.UITheme
import com.intellij.openapi.diagnostic.thisLogger
import org.jetbrains.jewel.JewelTheme
import org.jetbrains.jewel.InternalJewelApi
import org.jetbrains.jewel.JewelTheme
import org.jetbrains.jewel.intui.core.IntUiPainterHintsProvider
import org.jetbrains.jewel.painter.PainterHint
import org.jetbrains.jewel.painter.hints.Dark
Expand Down
4 changes: 2 additions & 2 deletions ide-laf-bridge/ide-laf-bridge-233/api/ide-laf-bridge-233.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public final class org/jetbrains/jewel/bridge/BridgeIconData$Companion {
public final fun readFromLaF ()Lorg/jetbrains/jewel/bridge/BridgeIconData;
public final class org/jetbrains/jewel/bridge/BridgeIconDataKt {
public static final fun readFromLaF (Lorg/jetbrains/jewel/ThemeIconData$Companion;)Lorg/jetbrains/jewel/ThemeIconData;
}

public final class org/jetbrains/jewel/bridge/BridgePainterHintsProvider$Companion {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalDensity
import com.intellij.ide.ui.UITheme
import com.intellij.openapi.diagnostic.thisLogger
import org.jetbrains.jewel.JewelTheme
import org.jetbrains.jewel.InternalJewelApi
import org.jetbrains.jewel.JewelTheme
import org.jetbrains.jewel.intui.core.IntUiPainterHintsProvider
import org.jetbrains.jewel.painter.PainterHint
import org.jetbrains.jewel.painter.hints.Dark
Expand Down
Loading

0 comments on commit f85d23c

Please sign in to comment.