🔀 Stroke hint, ExtensionComponentStyling api and Unfocusable IconButton/Tab (#213)
* Make icon button and tabs unfocusable * Stroke hint with svg patcher * Stroke hint with svg patcher * Fix light header switching * Update api * DynamicComponentStyling support * Rename to LazyComponentStyling * Make ComponentStyling.defaultComponentStyle as a LazyComponentStyling * Simplify function name * Update api * Make ktlint happy * Update api * Update api * Activation, SelectableIconButton support and new standalone sample * Fix comment * Make linters happy * Fix comments * Update API * Make ktlint happy * Fix comments * Fix comments, outline button dark disabled style * Update api * Make ktlint happy GitOrigin-RevId: 6dfacea4195d9bcd275797e1d3fd1b2464d7ed7c
@@ -33,6 +33,7 @@ import androidx.compose.ui.window.rememberWindowState
|
||||
import com.jetbrains.JBR
|
||||
import org.jetbrains.jewel.foundation.Stroke
|
||||
import org.jetbrains.jewel.foundation.modifier.border
|
||||
import org.jetbrains.jewel.foundation.modifier.trackWindowActivation
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.window.styling.DecoratedWindowStyle
|
||||
import org.jetbrains.jewel.window.utils.DesktopPlatform
|
||||
@@ -155,7 +156,7 @@ import java.awt.event.WindowEvent
|
||||
override val window: ComposeWindow get() = this@Window.window
|
||||
}
|
||||
scope.content()
|
||||
}, modifier = undecoratedWindowBorder, measurePolicy = DecoratedWindowMeasurePolicy)
|
||||
}, modifier = undecoratedWindowBorder.trackWindowActivation(window), measurePolicy = DecoratedWindowMeasurePolicy)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.jetbrains.jewel.ui.component.IconButton
|
||||
import org.jetbrains.jewel.ui.component.styling.IconButtonStyle
|
||||
import org.jetbrains.jewel.ui.painter.PainterHint
|
||||
import org.jetbrains.jewel.ui.painter.PainterProvider
|
||||
import org.jetbrains.jewel.ui.painter.PainterProviderScope
|
||||
import org.jetbrains.jewel.ui.painter.PainterSuffixHint
|
||||
import org.jetbrains.jewel.window.styling.TitleBarStyle
|
||||
import java.awt.Frame
|
||||
@@ -104,7 +105,7 @@ private fun TitleBarScope.ControlButton(
|
||||
|
||||
private object Inactive : PainterSuffixHint() {
|
||||
|
||||
override fun suffix(): String = "Inactive"
|
||||
override fun PainterProviderScope.suffix(): String = "Inactive"
|
||||
|
||||
override fun toString(): String = "Inactive"
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ public final class org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/foundation/lazy/tree/TreeElementState : org/jetbrains/jewel/foundation/state/InteractiveComponentState, org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public final class org/jetbrains/jewel/foundation/lazy/tree/TreeElementState : org/jetbrains/jewel/foundation/state/FocusableComponentState, org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/foundation/lazy/tree/TreeElementState$Companion;
|
||||
public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/foundation/lazy/tree/TreeElementState;
|
||||
public fun chooseValue (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
@@ -682,6 +682,15 @@ public final class org/jetbrains/jewel/foundation/lazy/tree/TreeViewOnKeyEvent$D
|
||||
public static fun onSelectPreviousItem (Lorg/jetbrains/jewel/foundation/lazy/tree/TreeViewOnKeyEvent;Ljava/util/List;Lorg/jetbrains/jewel/foundation/lazy/SelectableLazyListState;)V
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/foundation/modifier/ActivationKt {
|
||||
public static final fun getModifierLocalActivated ()Landroidx/compose/ui/modifier/ProvidableModifierLocal;
|
||||
public static final fun onActivated (Landroidx/compose/ui/Modifier;ZLkotlin/jvm/functions/Function1;)Landroidx/compose/ui/Modifier;
|
||||
public static synthetic fun onActivated$default (Landroidx/compose/ui/Modifier;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Landroidx/compose/ui/Modifier;
|
||||
public static final fun trackActivation (Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier;
|
||||
public static final fun trackComponentActivation (Landroidx/compose/ui/Modifier;Ljava/awt/Component;)Landroidx/compose/ui/Modifier;
|
||||
public static final fun trackWindowActivation (Landroidx/compose/ui/Modifier;Ljava/awt/Window;)Landroidx/compose/ui/Modifier;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/foundation/modifier/BorderKt {
|
||||
public static final fun border (Landroidx/compose/ui/Modifier;Lorg/jetbrains/jewel/foundation/Stroke;Landroidx/compose/ui/graphics/Shape;)Landroidx/compose/ui/Modifier;
|
||||
public static final fun border-AkepmR4 (Landroidx/compose/ui/Modifier;Lorg/jetbrains/jewel/foundation/Stroke$Alignment;FLandroidx/compose/ui/graphics/Brush;Landroidx/compose/ui/graphics/Shape;F)Landroidx/compose/ui/Modifier;
|
||||
@@ -723,14 +732,10 @@ public abstract interface class org/jetbrains/jewel/foundation/state/Interactive
|
||||
public abstract fun isPressed ()Z
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/foundation/state/SelectableComponentState : org/jetbrains/jewel/foundation/state/FocusableComponentState {
|
||||
public abstract interface class org/jetbrains/jewel/foundation/state/SelectableComponentState : org/jetbrains/jewel/foundation/state/InteractiveComponentState {
|
||||
public abstract fun isSelected ()Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/foundation/state/SelectableComponentState$DefaultImpls {
|
||||
public static fun chooseValue (Lorg/jetbrains/jewel/foundation/state/SelectableComponentState;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/foundation/state/ToggleableComponentState : org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/foundation/state/ToggleableComponentState$Companion;
|
||||
public abstract fun getToggleableState ()Landroidx/compose/ui/state/ToggleableState;
|
||||
@@ -740,10 +745,6 @@ public final class org/jetbrains/jewel/foundation/state/ToggleableComponentState
|
||||
public final fun readToggleableState-VKZWuLQ (J)Landroidx/compose/ui/state/ToggleableState;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/foundation/state/ToggleableComponentState$DefaultImpls {
|
||||
public static fun chooseValue (Lorg/jetbrains/jewel/foundation/state/ToggleableComponentState;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/foundation/theme/JewelTheme {
|
||||
public static final field Companion Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Focused
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Hovered
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Pressed
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Selected
|
||||
import org.jetbrains.jewel.foundation.state.InteractiveComponentState
|
||||
import org.jetbrains.jewel.foundation.state.FocusableComponentState
|
||||
import org.jetbrains.jewel.foundation.state.SelectableComponentState
|
||||
import org.jetbrains.jewel.foundation.utils.Log
|
||||
import kotlin.time.Duration
|
||||
@@ -98,7 +98,8 @@ fun <T> BasicLazyTree(
|
||||
) {
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
val flattenedTree = remember(tree, treeState.openNodes, treeState.allNodes) { tree.roots.flatMap { it.flattenTree(treeState) } }
|
||||
val flattenedTree =
|
||||
remember(tree, treeState.openNodes, treeState.allNodes) { tree.roots.flatMap { it.flattenTree(treeState) } }
|
||||
|
||||
remember(tree) { // if tree changes we need to update selection changes
|
||||
onSelectionChange(
|
||||
@@ -199,7 +200,7 @@ private fun Modifier.elementBackground(
|
||||
|
||||
@Immutable
|
||||
@JvmInline
|
||||
value class TreeElementState(val state: ULong) : InteractiveComponentState, SelectableComponentState {
|
||||
value class TreeElementState(val state: ULong) : FocusableComponentState, SelectableComponentState {
|
||||
|
||||
@Stable
|
||||
override val isActive: Boolean
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
package org.jetbrains.jewel.foundation.modifier
|
||||
|
||||
import androidx.compose.foundation.focusGroup
|
||||
import androidx.compose.runtime.DisposableEffect
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.structuralEqualityPolicy
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.composed
|
||||
import androidx.compose.ui.focus.onFocusChanged
|
||||
import androidx.compose.ui.modifier.ModifierLocalConsumer
|
||||
import androidx.compose.ui.modifier.ModifierLocalProvider
|
||||
import androidx.compose.ui.modifier.ModifierLocalReadScope
|
||||
import androidx.compose.ui.modifier.ProvidableModifierLocal
|
||||
import androidx.compose.ui.modifier.modifierLocalOf
|
||||
import androidx.compose.ui.modifier.modifierLocalProvider
|
||||
import androidx.compose.ui.platform.InspectorInfo
|
||||
import androidx.compose.ui.platform.InspectorValueInfo
|
||||
import androidx.compose.ui.platform.debugInspectorInfo
|
||||
import java.awt.Component
|
||||
import java.awt.Window
|
||||
import java.awt.event.FocusEvent
|
||||
import java.awt.event.FocusListener
|
||||
import java.awt.event.WindowAdapter
|
||||
import java.awt.event.WindowEvent
|
||||
|
||||
fun Modifier.trackWindowActivation(window: Window) = composed(
|
||||
inspectorInfo = debugInspectorInfo {
|
||||
name = "activateRoot"
|
||||
properties["window"] = window
|
||||
},
|
||||
) {
|
||||
var parentActivated by remember { mutableStateOf(false) }
|
||||
|
||||
DisposableEffect(window) {
|
||||
val listener = object : WindowAdapter() {
|
||||
override fun windowActivated(e: WindowEvent?) {
|
||||
parentActivated = true
|
||||
}
|
||||
|
||||
override fun windowDeactivated(e: WindowEvent?) {
|
||||
parentActivated = false
|
||||
}
|
||||
}
|
||||
window.addWindowListener(listener)
|
||||
onDispose {
|
||||
window.removeWindowListener(listener)
|
||||
}
|
||||
}
|
||||
Modifier.modifierLocalProvider(ModifierLocalActivated) {
|
||||
parentActivated
|
||||
}
|
||||
}
|
||||
|
||||
fun Modifier.trackComponentActivation(awtParent: Component) = composed(
|
||||
inspectorInfo = debugInspectorInfo {
|
||||
name = "activateRoot"
|
||||
properties["parent"] = awtParent
|
||||
},
|
||||
) {
|
||||
var parentActivated by remember { mutableStateOf(false) }
|
||||
|
||||
DisposableEffect(awtParent) {
|
||||
val listener = object : FocusListener {
|
||||
override fun focusGained(e: FocusEvent?) {
|
||||
parentActivated = true
|
||||
}
|
||||
|
||||
override fun focusLost(e: FocusEvent?) {
|
||||
parentActivated = false
|
||||
}
|
||||
}
|
||||
awtParent.addFocusListener(listener)
|
||||
onDispose {
|
||||
awtParent.removeFocusListener(listener)
|
||||
}
|
||||
}
|
||||
Modifier.modifierLocalProvider(ModifierLocalActivated) {
|
||||
parentActivated
|
||||
}
|
||||
}
|
||||
|
||||
@Stable
|
||||
fun Modifier.trackActivation() = composed(
|
||||
inspectorInfo = debugInspectorInfo {
|
||||
name = "trackActivation"
|
||||
},
|
||||
) {
|
||||
val activatedModifierLocal = remember { ActivatedModifierLocal() }
|
||||
Modifier.focusGroup().onFocusChanged {
|
||||
if (it.hasFocus) {
|
||||
activatedModifierLocal.childGainedFocus()
|
||||
} else {
|
||||
activatedModifierLocal.childLostFocus()
|
||||
}
|
||||
}.then(activatedModifierLocal)
|
||||
}
|
||||
|
||||
private class ActivatedModifierLocal : ModifierLocalProvider<Boolean>, ModifierLocalConsumer {
|
||||
|
||||
private var parentActivated: Boolean by mutableStateOf(false)
|
||||
|
||||
private var hasFocus: Boolean by mutableStateOf(false)
|
||||
|
||||
override fun onModifierLocalsUpdated(scope: ModifierLocalReadScope) {
|
||||
with(scope) {
|
||||
parentActivated = ModifierLocalActivated.current
|
||||
}
|
||||
}
|
||||
|
||||
override val key: ProvidableModifierLocal<Boolean> = ModifierLocalActivated
|
||||
override val value: Boolean by derivedStateOf(structuralEqualityPolicy()) {
|
||||
parentActivated && hasFocus
|
||||
}
|
||||
|
||||
fun childLostFocus() {
|
||||
hasFocus = false
|
||||
}
|
||||
|
||||
fun childGainedFocus() {
|
||||
hasFocus = true
|
||||
}
|
||||
}
|
||||
|
||||
val ModifierLocalActivated = modifierLocalOf {
|
||||
false
|
||||
}
|
||||
|
||||
fun Modifier.onActivated(
|
||||
enabled: Boolean = true,
|
||||
onChanged: (Boolean) -> Unit,
|
||||
) = then(
|
||||
if (enabled) {
|
||||
ActivateChangedModifierElement(
|
||||
onChanged,
|
||||
inspectorInfo = debugInspectorInfo {
|
||||
name = "onActivated"
|
||||
properties["onChanged"] = onChanged
|
||||
},
|
||||
)
|
||||
} else {
|
||||
Modifier
|
||||
},
|
||||
)
|
||||
|
||||
private class ActivateChangedModifierElement(
|
||||
private val onChanged: (Boolean) -> Unit,
|
||||
inspectorInfo: InspectorInfo.() -> Unit,
|
||||
) : ModifierLocalConsumer, InspectorValueInfo(inspectorInfo) {
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (other !is ActivateChangedModifierElement) return false
|
||||
|
||||
if (onChanged != other.onChanged) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int = onChanged.hashCode()
|
||||
|
||||
private var currentActivated = false
|
||||
|
||||
override fun onModifierLocalsUpdated(scope: ModifierLocalReadScope) {
|
||||
with(scope) {
|
||||
val activated = ModifierLocalActivated.current
|
||||
if (activated != currentActivated) {
|
||||
currentActivated = activated
|
||||
onChanged(activated)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package org.jetbrains.jewel.foundation.state
|
||||
|
||||
import androidx.compose.runtime.Stable
|
||||
|
||||
interface SelectableComponentState : FocusableComponentState {
|
||||
interface SelectableComponentState : InteractiveComponentState {
|
||||
|
||||
@Stable
|
||||
val isSelected: Boolean
|
||||
|
||||
@@ -21,6 +21,7 @@ simpleXml = "2.7.1"
|
||||
[libraries]
|
||||
javaSarif = { module = "com.contrastsecurity:java-sarif", version.ref = "javaSarif" }
|
||||
kotlinSarif = { module = "io.github.detekt.sarif4k:sarif4k", version.ref = "kotlinSarif" }
|
||||
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
|
||||
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
|
||||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
|
||||
|
||||
|
||||
@@ -48,8 +48,13 @@ public abstract interface annotation class org/jetbrains/jewel/bridge/SwingLafKe
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/bridge/ToolWindowExtensionsKt {
|
||||
public static final fun addComposeTab (Lcom/intellij/openapi/wm/ToolWindow;Ljava/lang/String;ZZLkotlin/jvm/functions/Function2;)V
|
||||
public static synthetic fun addComposeTab$default (Lcom/intellij/openapi/wm/ToolWindow;Ljava/lang/String;ZZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
|
||||
public static final fun addComposeTab (Lcom/intellij/openapi/wm/ToolWindow;Ljava/lang/String;ZZLkotlin/jvm/functions/Function3;)V
|
||||
public static synthetic fun addComposeTab$default (Lcom/intellij/openapi/wm/ToolWindow;Ljava/lang/String;ZZLkotlin/jvm/functions/Function3;ILjava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/bridge/ToolWindowScope {
|
||||
public abstract fun getPanel ()Landroidx/compose/ui/awt/ComposePanel;
|
||||
public abstract fun getToolWindow ()Lcom/intellij/openapi/wm/ToolWindow;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/bridge/actionSystem/ProvideDataKt {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package org.jetbrains.jewel.bridge
|
||||
|
||||
import com.intellij.util.ui.DirProvider
|
||||
import org.jetbrains.jewel.ui.painter.PainterResourcePathHint
|
||||
import org.jetbrains.jewel.ui.painter.PainterPathHint
|
||||
import org.jetbrains.jewel.ui.painter.PainterProviderScope
|
||||
import org.jetbrains.jewel.ui.painter.ResourcePainterProviderScope
|
||||
|
||||
internal object BridgeOverride : PainterResourcePathHint {
|
||||
internal object BridgeOverride : PainterPathHint {
|
||||
|
||||
private val dirProvider = DirProvider()
|
||||
|
||||
@@ -14,7 +16,9 @@ internal object BridgeOverride : PainterResourcePathHint {
|
||||
patchIconPath
|
||||
}
|
||||
|
||||
override fun patch(path: String, classLoaders: List<ClassLoader>): String {
|
||||
override fun PainterProviderScope.patch(): String {
|
||||
if (this !is ResourcePainterProviderScope) return path
|
||||
|
||||
// For all provided classloaders, we try to get the patched path, both using
|
||||
// the original path, and an "abridged" path that has gotten the icon path prefix
|
||||
// removed (the classloader is set up differently in prod IDEs and when running
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.jetbrains.jewel.bridge
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
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.foundation.InternalJewelApi
|
||||
@@ -30,7 +29,7 @@ class BridgePainterHintsProvider private constructor(
|
||||
override fun hints(path: String): List<PainterHint> = buildList {
|
||||
add(getPaletteHint(path))
|
||||
add(BridgeOverride)
|
||||
add(HiDpi(LocalDensity.current))
|
||||
add(HiDpi())
|
||||
add(Dark(JewelTheme.isDark))
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,18 @@ package org.jetbrains.jewel.bridge
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.ui.icons.patchIconPath
|
||||
import com.intellij.util.ui.DirProvider
|
||||
import org.jetbrains.jewel.ui.painter.PainterResourcePathHint
|
||||
import org.jetbrains.jewel.ui.painter.PainterPathHint
|
||||
import org.jetbrains.jewel.ui.painter.PainterProviderScope
|
||||
import org.jetbrains.jewel.ui.painter.ResourcePainterProviderScope
|
||||
|
||||
internal object BridgeOverride : PainterResourcePathHint {
|
||||
internal object BridgeOverride : PainterPathHint {
|
||||
|
||||
private val dirProvider = DirProvider()
|
||||
|
||||
@Suppress("UnstableApiUsage") // patchIconPath() is explicitly open to us
|
||||
override fun patch(path: String, classLoaders: List<ClassLoader>): String {
|
||||
override fun PainterProviderScope.patch(): String {
|
||||
if (this !is ResourcePainterProviderScope) return path
|
||||
|
||||
// For all provided classloaders, we try to get the patched path, both using
|
||||
// the original path, and an "abridged" path that has gotten the icon path prefix
|
||||
// removed (the classloader is set up differently in prod IDEs and when running
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.jetbrains.jewel.bridge
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
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.foundation.InternalJewelApi
|
||||
@@ -29,7 +28,7 @@ class BridgePainterHintsProvider private constructor(
|
||||
override fun hints(path: String): List<PainterHint> = buildList {
|
||||
add(getPaletteHint(path))
|
||||
add(BridgeOverride)
|
||||
add(HiDpi(LocalDensity.current))
|
||||
add(HiDpi())
|
||||
add(Dark(JewelTheme.isDark))
|
||||
}
|
||||
|
||||
|
||||
@@ -9,15 +9,30 @@ fun ToolWindow.addComposeTab(
|
||||
tabDisplayName: String,
|
||||
isLockable: Boolean = true,
|
||||
isCloseable: Boolean = false,
|
||||
content: @Composable () -> Unit,
|
||||
content: @Composable ToolWindowScope.() -> Unit,
|
||||
) {
|
||||
// We need to make sure this is done before Compose is attached.
|
||||
// The operation is idempotent, so we can safely do it every time.
|
||||
enableNewSwingCompositing()
|
||||
|
||||
val composePanel = ComposePanel()
|
||||
composePanel.setContent(content)
|
||||
|
||||
val scope = object : ToolWindowScope {
|
||||
override val toolWindow: ToolWindow = this@addComposeTab
|
||||
override val panel: ComposePanel = composePanel
|
||||
}
|
||||
|
||||
composePanel.setContent {
|
||||
scope.content()
|
||||
}
|
||||
val tabContent = contentManager.factory.createContent(composePanel, tabDisplayName, isLockable)
|
||||
tabContent.isCloseable = isCloseable
|
||||
contentManager.addContent(tabContent)
|
||||
}
|
||||
|
||||
interface ToolWindowScope {
|
||||
|
||||
val toolWindow: ToolWindow
|
||||
|
||||
val panel: ComposePanel
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.jetbrains.jewel.foundation.theme.ThemeColorPalette
|
||||
import org.jetbrains.jewel.foundation.theme.ThemeDefinition
|
||||
import org.jetbrains.jewel.foundation.theme.ThemeIconData
|
||||
import org.jetbrains.jewel.ui.ComponentStyling
|
||||
import org.jetbrains.jewel.ui.DefaultComponentStyling
|
||||
import org.jetbrains.jewel.ui.component.styling.ButtonColors
|
||||
import org.jetbrains.jewel.ui.component.styling.ButtonMetrics
|
||||
import org.jetbrains.jewel.ui.component.styling.ButtonStyle
|
||||
@@ -168,7 +169,7 @@ internal fun createBridgeComponentStyling(
|
||||
val textFieldStyle = readTextFieldStyle(textFieldTextStyle)
|
||||
val menuStyle = readMenuStyle()
|
||||
|
||||
return ComponentStyling(
|
||||
return DefaultComponentStyling(
|
||||
checkboxStyle = readCheckboxStyle(),
|
||||
chipStyle = readChipStyle(),
|
||||
circularProgressStyle = readCircularProgressStyle(theme.isDark),
|
||||
@@ -620,6 +621,7 @@ private fun readMenuStyle(): MenuStyle {
|
||||
)
|
||||
|
||||
return MenuStyle(
|
||||
isDark = !JBColor.isBright(),
|
||||
colors = colors,
|
||||
metrics = MenuMetrics(
|
||||
cornerSize = CornerSize(IdeaPopupMenuUI.CORNER_RADIUS.dp),
|
||||
@@ -826,19 +828,16 @@ private fun readDefaultTabStyle(): TabStyle {
|
||||
val colors = TabColors(
|
||||
background = normalBackground,
|
||||
backgroundDisabled = normalBackground,
|
||||
backgroundFocused = normalBackground,
|
||||
backgroundPressed = selectedBackground,
|
||||
backgroundHovered = JBUI.CurrentTheme.DefaultTabs.hoverBackground().toComposeColor(),
|
||||
backgroundSelected = selectedBackground,
|
||||
content = normalContent,
|
||||
contentDisabled = retrieveColorOrUnspecified("TabbedPane.disabledForeground"),
|
||||
contentFocused = normalContent,
|
||||
contentPressed = normalContent,
|
||||
contentHovered = normalContent,
|
||||
contentSelected = normalContent,
|
||||
underline = Color.Transparent,
|
||||
underlineDisabled = retrieveColorOrUnspecified("TabbedPane.disabledUnderlineColor"),
|
||||
underlineFocused = Color.Transparent,
|
||||
underlinePressed = selectedUnderline,
|
||||
underlineHovered = Color.Transparent,
|
||||
underlineSelected = selectedUnderline,
|
||||
@@ -858,13 +857,11 @@ private fun readDefaultTabStyle(): TabStyle {
|
||||
contentAlpha = TabContentAlpha(
|
||||
iconNormal = 1f,
|
||||
iconDisabled = 1f,
|
||||
iconFocused = 1f,
|
||||
iconPressed = 1f,
|
||||
iconHovered = 1f,
|
||||
iconSelected = 1f,
|
||||
labelNormal = 1f,
|
||||
labelDisabled = 1f,
|
||||
labelFocused = 1f,
|
||||
labelPressed = 1f,
|
||||
labelHovered = 1f,
|
||||
labelSelected = 1f,
|
||||
@@ -881,19 +878,16 @@ private fun readEditorTabStyle(): TabStyle {
|
||||
val colors = TabColors(
|
||||
background = normalBackground,
|
||||
backgroundDisabled = normalBackground,
|
||||
backgroundFocused = normalBackground,
|
||||
backgroundPressed = selectedBackground,
|
||||
backgroundHovered = JBUI.CurrentTheme.EditorTabs.hoverBackground().toComposeColor(),
|
||||
backgroundSelected = selectedBackground,
|
||||
content = normalContent,
|
||||
contentDisabled = retrieveColorOrUnspecified("TabbedPane.disabledForeground"),
|
||||
contentFocused = normalContent,
|
||||
contentPressed = normalContent,
|
||||
contentHovered = normalContent,
|
||||
contentSelected = normalContent,
|
||||
underline = Color.Transparent,
|
||||
underlineDisabled = retrieveColorOrUnspecified("TabbedPane.disabledUnderlineColor"),
|
||||
underlineFocused = Color.Transparent,
|
||||
underlinePressed = selectedUnderline,
|
||||
underlineHovered = Color.Transparent,
|
||||
underlineSelected = selectedUnderline,
|
||||
@@ -913,13 +907,11 @@ private fun readEditorTabStyle(): TabStyle {
|
||||
contentAlpha = TabContentAlpha(
|
||||
iconNormal = .7f,
|
||||
iconDisabled = .7f,
|
||||
iconFocused = .7f,
|
||||
iconPressed = 1f,
|
||||
iconHovered = 1f,
|
||||
iconSelected = 1f,
|
||||
labelNormal = .7f,
|
||||
labelDisabled = .7f,
|
||||
labelFocused = .7f,
|
||||
labelPressed = 1f,
|
||||
labelHovered = 1f,
|
||||
labelSelected = 1f,
|
||||
@@ -957,14 +949,19 @@ private fun readIconButtonStyle(): IconButtonStyle =
|
||||
minSize = DpSize(16.dp, 16.dp),
|
||||
),
|
||||
colors = IconButtonColors(
|
||||
foregroundSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedForeground"),
|
||||
background = Color.Unspecified,
|
||||
backgroundDisabled = Color.Unspecified,
|
||||
backgroundSelected = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
|
||||
backgroundSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedBackground"),
|
||||
backgroundFocused = Color.Unspecified,
|
||||
backgroundPressed = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
|
||||
backgroundHovered = retrieveColorOrUnspecified("ActionButton.hoverBackground"),
|
||||
border = Color.Unspecified,
|
||||
borderDisabled = Color.Unspecified,
|
||||
borderFocused = retrieveColorOrUnspecified("ActionButton.focusedBorderColor"),
|
||||
borderSelected = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
|
||||
borderSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedBackground"),
|
||||
borderFocused = Color.Unspecified,
|
||||
borderPressed = retrieveColorOrUnspecified("ActionButton.pressedBorderColor"),
|
||||
borderHovered = retrieveColorOrUnspecified("ActionButton.hoverBorderColor"),
|
||||
),
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.intellij.openapi.components.service
|
||||
import org.jetbrains.jewel.bridge.BridgePainterHintsProvider
|
||||
import org.jetbrains.jewel.bridge.SwingBridgeService
|
||||
import org.jetbrains.jewel.foundation.ExperimentalJewelApi
|
||||
import org.jetbrains.jewel.ui.ComponentStyling
|
||||
import org.jetbrains.jewel.ui.painter.LocalPainterHintsProvider
|
||||
import org.jetbrains.jewel.ui.theme.BaseJewelTheme
|
||||
|
||||
@@ -19,9 +20,11 @@ private val bridgeService
|
||||
fun SwingBridgeTheme(content: @Composable () -> Unit) {
|
||||
val themeData by bridgeService.currentBridgeThemeData.collectAsState()
|
||||
|
||||
BaseJewelTheme(themeData.themeDefinition, {
|
||||
provide(providedValues = themeData.componentStyling.providedStyles())
|
||||
}, swingCompatMode = true) {
|
||||
BaseJewelTheme(
|
||||
themeData.themeDefinition,
|
||||
ComponentStyling.with(themeData.componentStyling),
|
||||
swingCompatMode = true,
|
||||
) {
|
||||
CompositionLocalProvider(LocalPainterHintsProvider provides BridgePainterHintsProvider(themeData.themeDefinition.isDark)) {
|
||||
content()
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ public final class org/jetbrains/jewel/intui/window/IntUiDecoratedWindowResource
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/window/IntUiThemeKt {
|
||||
public static final fun provideDecoratedWindowComponentStyling (Lorg/jetbrains/jewel/ui/theme/ComponentStyleProviderScope;Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;Lorg/jetbrains/jewel/window/styling/TitleBarStyle;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun decoratedWindow (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;Lorg/jetbrains/jewel/window/styling/TitleBarStyle;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static synthetic fun decoratedWindow$default (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/window/styling/DecoratedWindowStyle;Lorg/jetbrains/jewel/window/styling/TitleBarStyle;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/window/styling/IntUiDecoratedWindowStylingKt {
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
package org.jetbrains.jewel.intui.window
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.intui.window.styling.dark
|
||||
import org.jetbrains.jewel.intui.window.styling.light
|
||||
import org.jetbrains.jewel.ui.theme.ComponentStyleProviderScope
|
||||
import org.jetbrains.jewel.ui.ComponentStyling
|
||||
import org.jetbrains.jewel.window.styling.DecoratedWindowStyle
|
||||
import org.jetbrains.jewel.window.styling.LocalDecoratedWindowStyle
|
||||
import org.jetbrains.jewel.window.styling.LocalTitleBarStyle
|
||||
import org.jetbrains.jewel.window.styling.TitleBarStyle
|
||||
|
||||
@Composable
|
||||
fun ComponentStyleProviderScope.provideDecoratedWindowComponentStyling(
|
||||
windowStyle: DecoratedWindowStyle = if (theme.isDark) {
|
||||
fun ComponentStyling.decoratedWindow(
|
||||
windowStyle: DecoratedWindowStyle? = null,
|
||||
titleBarStyle: TitleBarStyle? = null,
|
||||
): ComponentStyling = provide {
|
||||
val isDark = JewelTheme.isDark
|
||||
|
||||
val currentWindowStyle = windowStyle ?: if (isDark) {
|
||||
DecoratedWindowStyle.dark()
|
||||
} else {
|
||||
DecoratedWindowStyle.light()
|
||||
},
|
||||
titleBarStyle: TitleBarStyle = if (theme.isDark) {
|
||||
}
|
||||
val currentTitleBarStyle = titleBarStyle ?: if (isDark) {
|
||||
TitleBarStyle.dark()
|
||||
} else {
|
||||
TitleBarStyle.light()
|
||||
},
|
||||
) {
|
||||
provide(
|
||||
LocalDecoratedWindowStyle provides windowStyle,
|
||||
LocalTitleBarStyle provides titleBarStyle,
|
||||
}
|
||||
|
||||
arrayOf(
|
||||
LocalDecoratedWindowStyle provides currentWindowStyle,
|
||||
LocalTitleBarStyle provides currentTitleBarStyle,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.jetbrains.jewel.intui.window.styling
|
||||
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.shape.CornerSize
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@@ -11,8 +12,10 @@ import org.jetbrains.jewel.intui.core.theme.IntUiLightTheme
|
||||
import org.jetbrains.jewel.intui.standalone.styling.Undecorated
|
||||
import org.jetbrains.jewel.intui.standalone.styling.defaults
|
||||
import org.jetbrains.jewel.intui.standalone.styling.light
|
||||
import org.jetbrains.jewel.intui.standalone.styling.undecorated
|
||||
import org.jetbrains.jewel.intui.window.decoratedWindowPainterProvider
|
||||
import org.jetbrains.jewel.ui.component.styling.DropdownColors
|
||||
import org.jetbrains.jewel.ui.component.styling.DropdownMetrics
|
||||
import org.jetbrains.jewel.ui.component.styling.DropdownStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.IconButtonColors
|
||||
import org.jetbrains.jewel.ui.component.styling.IconButtonMetrics
|
||||
@@ -34,8 +37,8 @@ fun TitleBarStyle.Companion.light(
|
||||
colors = colors,
|
||||
metrics = metrics,
|
||||
icons = icons,
|
||||
dropdownStyle = DropdownStyle.Undecorated.light(
|
||||
colors = DropdownColors.Undecorated.light(
|
||||
dropdownStyle = DropdownStyle.Undecorated.dark(
|
||||
colors = DropdownColors.Undecorated.dark(
|
||||
content = colors.content,
|
||||
contentFocused = colors.content,
|
||||
contentHovered = colors.content,
|
||||
@@ -44,6 +47,12 @@ fun TitleBarStyle.Companion.light(
|
||||
backgroundHovered = colors.dropdownHoveredBackground,
|
||||
backgroundPressed = colors.dropdownPressedBackground,
|
||||
),
|
||||
metrics = DropdownMetrics.undecorated(
|
||||
arrowMinSize = DpSize(20.dp, 24.dp),
|
||||
minSize = DpSize(60.dp, 30.dp),
|
||||
cornerSize = CornerSize(6.dp),
|
||||
contentPadding = PaddingValues(start = 10.dp, end = 0.dp, top = 3.dp, bottom = 3.dp),
|
||||
),
|
||||
menuStyle = MenuStyle.light(),
|
||||
),
|
||||
iconButtonStyle = titleBarIconButtonStyle(
|
||||
@@ -83,7 +92,12 @@ fun TitleBarStyle.Companion.lightWithLightHeader(
|
||||
backgroundHovered = colors.dropdownHoveredBackground,
|
||||
backgroundPressed = colors.dropdownPressedBackground,
|
||||
),
|
||||
menuStyle = MenuStyle.light(),
|
||||
metrics = DropdownMetrics.undecorated(
|
||||
arrowMinSize = DpSize(20.dp, 24.dp),
|
||||
minSize = DpSize(60.dp, 30.dp),
|
||||
cornerSize = CornerSize(6.dp),
|
||||
contentPadding = PaddingValues(start = 10.dp, end = 0.dp, top = 3.dp, bottom = 3.dp),
|
||||
),
|
||||
),
|
||||
iconButtonStyle = titleBarIconButtonStyle(
|
||||
colors.iconButtonHoveredBackground,
|
||||
@@ -122,6 +136,12 @@ fun TitleBarStyle.Companion.dark(
|
||||
backgroundHovered = colors.dropdownHoveredBackground,
|
||||
backgroundPressed = colors.dropdownPressedBackground,
|
||||
),
|
||||
metrics = DropdownMetrics.undecorated(
|
||||
arrowMinSize = DpSize(20.dp, 24.dp),
|
||||
minSize = DpSize(60.dp, 30.dp),
|
||||
cornerSize = CornerSize(6.dp),
|
||||
contentPadding = PaddingValues(start = 10.dp, end = 0.dp, top = 3.dp, bottom = 3.dp),
|
||||
),
|
||||
),
|
||||
iconButtonStyle = titleBarIconButtonStyle(
|
||||
colors.iconButtonHoveredBackground,
|
||||
@@ -146,16 +166,21 @@ private fun titleBarIconButtonStyle(
|
||||
metrics: IconButtonMetrics,
|
||||
) = IconButtonStyle(
|
||||
IconButtonColors(
|
||||
background = Color.Transparent,
|
||||
backgroundDisabled = Color.Transparent,
|
||||
backgroundFocused = Color.Transparent,
|
||||
foregroundSelectedActivated = Color.Unspecified,
|
||||
background = Color.Unspecified,
|
||||
backgroundDisabled = Color.Unspecified,
|
||||
backgroundSelected = Color.Unspecified,
|
||||
backgroundSelectedActivated = Color.Unspecified,
|
||||
backgroundFocused = Color.Unspecified,
|
||||
backgroundPressed = hoveredBackground,
|
||||
backgroundHovered = pressedBackground,
|
||||
border = Color.Transparent,
|
||||
borderDisabled = Color.Transparent,
|
||||
borderFocused = Color.Transparent,
|
||||
borderPressed = Color.Transparent,
|
||||
borderHovered = Color.Transparent,
|
||||
border = Color.Unspecified,
|
||||
borderDisabled = Color.Unspecified,
|
||||
borderSelected = Color.Unspecified,
|
||||
borderSelectedActivated = Color.Unspecified,
|
||||
borderFocused = hoveredBackground,
|
||||
borderPressed = pressedBackground,
|
||||
borderHovered = Color.Unspecified,
|
||||
),
|
||||
metrics,
|
||||
)
|
||||
|
||||
@@ -103,10 +103,10 @@ public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultDrop
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory {
|
||||
public static final field $stable I
|
||||
public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;
|
||||
public final fun dark-58FyvDQ (JJJJJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun dark-58FyvDQ$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;JJJJJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public final fun light-58FyvDQ (JJJJJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun light-58FyvDQ$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;JJJJJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public final fun dark-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun dark-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public final fun light-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun light-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabStyleFactory {
|
||||
@@ -137,10 +137,10 @@ public final class org/jetbrains/jewel/intui/standalone/styling/IntUiDropdownSty
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory {
|
||||
public static final field $stable I
|
||||
public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;
|
||||
public final fun dark-58FyvDQ (JJJJJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun dark-58FyvDQ$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;JJJJJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public final fun light-58FyvDQ (JJJJJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun light-58FyvDQ$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;JJJJJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public final fun dark-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun dark-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public final fun light-sQnm1Ko (JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
public static synthetic fun light-sQnm1Ko$default (Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabColors;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabStyleFactory {
|
||||
@@ -170,11 +170,11 @@ public final class org/jetbrains/jewel/intui/standalone/styling/IntUiHorizontalP
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiIconButtonStylingKt {
|
||||
public static final fun dark (Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;
|
||||
public static final fun dark-cAAHkqY (Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;JJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;
|
||||
public static final fun dark-8v1krLo (Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;
|
||||
public static final fun defaults-ij7-PLE (Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FLandroidx/compose/foundation/layout/PaddingValues;J)Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics;
|
||||
public static synthetic fun defaults-ij7-PLE$default (Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics$Companion;Landroidx/compose/foundation/shape/CornerSize;FLandroidx/compose/foundation/layout/PaddingValues;JILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics;
|
||||
public static final fun light (Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle$Companion;Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;Lorg/jetbrains/jewel/ui/component/styling/IconButtonMetrics;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;
|
||||
public static final fun light-cAAHkqY (Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;JJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;
|
||||
public static final fun light-8v1krLo (Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;JJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;III)Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiLabelledTextFieldStylingKt {
|
||||
@@ -268,14 +268,14 @@ public final class org/jetbrains/jewel/intui/standalone/styling/IntUiScrollbarSt
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/styling/IntUiTabStylingKt {
|
||||
public static final fun default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFFF)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static synthetic fun default$default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static final fun default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFF)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static synthetic fun default$default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static final fun defaults (Lorg/jetbrains/jewel/ui/component/styling/TabIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;)Lorg/jetbrains/jewel/ui/component/styling/TabIcons;
|
||||
public static synthetic fun defaults$default (Lorg/jetbrains/jewel/ui/component/styling/TabIcons$Companion;Lorg/jetbrains/jewel/ui/painter/PainterProvider;ILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabIcons;
|
||||
public static final fun defaults-u_T4Ytw (Lorg/jetbrains/jewel/ui/component/styling/TabMetrics$Companion;FLandroidx/compose/foundation/layout/PaddingValues;FF)Lorg/jetbrains/jewel/ui/component/styling/TabMetrics;
|
||||
public static synthetic fun defaults-u_T4Ytw$default (Lorg/jetbrains/jewel/ui/component/styling/TabMetrics$Companion;FLandroidx/compose/foundation/layout/PaddingValues;FFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabMetrics;
|
||||
public static final fun editor (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFFF)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static synthetic fun editor$default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static final fun editor (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFF)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static synthetic fun editor$default (Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;FFFFFFFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha;
|
||||
public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/TabColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabColorsFactory;
|
||||
public static final fun getDefault (Lorg/jetbrains/jewel/ui/component/styling/TabStyle$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiDefaultTabStyleFactory;
|
||||
public static final fun getEditor (Lorg/jetbrains/jewel/ui/component/styling/TabColors$Companion;)Lorg/jetbrains/jewel/intui/standalone/styling/IntUiEditorTabColorsFactory;
|
||||
@@ -321,13 +321,6 @@ public final class org/jetbrains/jewel/intui/standalone/styling/IntUiUndecorated
|
||||
public final fun light (Lorg/jetbrains/jewel/ui/component/styling/DropdownColors;Lorg/jetbrains/jewel/ui/component/styling/DropdownMetrics;Lorg/jetbrains/jewel/ui/component/styling/DropdownIcons;Landroidx/compose/ui/text/TextStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Landroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/theme/ComposableSingletons$IntUiThemeKt {
|
||||
public static final field INSTANCE Lorg/jetbrains/jewel/intui/standalone/theme/ComposableSingletons$IntUiThemeKt;
|
||||
public static field lambda-1 Lkotlin/jvm/functions/Function3;
|
||||
public fun <init> ()V
|
||||
public final fun getLambda-1$int_ui_standalone ()Lkotlin/jvm/functions/Function3;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalColorsKt {
|
||||
public static final fun dark-GyCwops (Lorg/jetbrains/jewel/foundation/BorderColors$Companion;JJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/BorderColors;
|
||||
public static final fun dark-Hformbs (Lorg/jetbrains/jewel/foundation/OutlineColors$Companion;JJJJJLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/OutlineColors;
|
||||
@@ -343,13 +336,13 @@ public final class org/jetbrains/jewel/intui/standalone/theme/IntUiGlobalMetrics
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/intui/standalone/theme/IntUiThemeKt {
|
||||
public static final fun IntUiTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lkotlin/jvm/functions/Function3;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun IntUiTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lorg/jetbrains/jewel/ui/ComponentStyling;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun IntUiTheme (ZZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun darkComponentStyling (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static final fun dark (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static final fun darkThemeDefinition-RFMEUTM (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/foundation/GlobalColors;Lorg/jetbrains/jewel/foundation/GlobalMetrics;Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette;Lorg/jetbrains/jewel/foundation/theme/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;
|
||||
public static final fun defaultComponentStyling (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static final fun default (Lorg/jetbrains/jewel/ui/ComponentStyling;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static final fun getDefaultTextStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;)Landroidx/compose/ui/text/TextStyle;
|
||||
public static final fun lightComponentStyling (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static final fun light (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Landroidx/compose/runtime/Composer;IIII)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static final fun lightThemeDefinition-RFMEUTM (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Lorg/jetbrains/jewel/foundation/GlobalColors;Lorg/jetbrains/jewel/foundation/GlobalMetrics;Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette;Lorg/jetbrains/jewel/foundation/theme/ThemeIconData;Landroidx/compose/ui/text/TextStyle;JLandroidx/compose/runtime/Composer;II)Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.jetbrains.jewel.intui.standalone
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.foundation.theme.ThemeDefinition
|
||||
import org.jetbrains.jewel.ui.painter.BasePainterHintsProvider
|
||||
@@ -29,7 +28,7 @@ class StandalonePainterHintsProvider(
|
||||
override fun hints(path: String): List<PainterHint> = buildList {
|
||||
add(getPaletteHint(path))
|
||||
add(overrideHint)
|
||||
add(HiDpi(LocalDensity.current))
|
||||
add(HiDpi())
|
||||
add(Dark(JewelTheme.isDark))
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ object IntUiDefaultButtonColorFactory {
|
||||
contentPressed: Color = IntUiLightTheme.colors.grey(14),
|
||||
contentHovered: Color = IntUiLightTheme.colors.grey(14),
|
||||
border: Brush = SolidColor(IntUiLightTheme.colors.blue(4)),
|
||||
borderDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(11)),
|
||||
borderDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)),
|
||||
borderFocused: Brush = SolidColor(IntUiLightTheme.colors.blue(4)),
|
||||
borderPressed: Brush = border,
|
||||
borderHovered: Brush = border,
|
||||
@@ -104,7 +104,7 @@ object IntUiDefaultButtonColorFactory {
|
||||
contentPressed: Color = IntUiDarkTheme.colors.grey(14),
|
||||
contentHovered: Color = IntUiDarkTheme.colors.grey(14),
|
||||
border: Brush = SolidColor(IntUiDarkTheme.colors.blue(6)),
|
||||
borderDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(4)),
|
||||
borderDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)),
|
||||
borderFocused: Brush = SolidColor(IntUiDarkTheme.colors.grey(1)),
|
||||
borderPressed: Brush = border,
|
||||
borderHovered: Brush = border,
|
||||
@@ -145,7 +145,7 @@ object IntUiOutlinedButtonColorFactory {
|
||||
contentPressed: Color = IntUiLightTheme.colors.grey(1),
|
||||
contentHovered: Color = IntUiLightTheme.colors.grey(1),
|
||||
border: Brush = SolidColor(IntUiLightTheme.colors.grey(9)),
|
||||
borderDisabled: Brush = SolidColor(IntUiLightTheme.colors.blue(11)),
|
||||
borderDisabled: Brush = SolidColor(IntUiLightTheme.colors.grey(12)),
|
||||
borderFocused: Brush = SolidColor(IntUiLightTheme.colors.blue(4)),
|
||||
borderPressed: Brush = SolidColor(IntUiLightTheme.colors.grey(7)),
|
||||
borderHovered: Brush = SolidColor(IntUiLightTheme.colors.grey(8)),
|
||||
@@ -180,7 +180,7 @@ object IntUiOutlinedButtonColorFactory {
|
||||
contentPressed: Color = IntUiDarkTheme.colors.grey(12),
|
||||
contentHovered: Color = IntUiDarkTheme.colors.grey(12),
|
||||
border: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)),
|
||||
borderDisabled: Brush = SolidColor(IntUiDarkTheme.colors.blue(4)),
|
||||
borderDisabled: Brush = SolidColor(IntUiDarkTheme.colors.grey(5)),
|
||||
borderFocused: Brush = SolidColor(IntUiDarkTheme.colors.grey(2)),
|
||||
borderPressed: Brush = SolidColor(IntUiDarkTheme.colors.grey(7)),
|
||||
borderHovered: Brush = SolidColor(IntUiDarkTheme.colors.grey(7)),
|
||||
|
||||
@@ -27,54 +27,74 @@ fun IconButtonStyle.Companion.dark(
|
||||
|
||||
@Composable
|
||||
fun IconButtonColors.Companion.light(
|
||||
foregroundSelectedActivated: Color = IntUiLightTheme.colors.grey(14),
|
||||
background: Color = Color.Unspecified,
|
||||
backgroundDisabled: Color = background,
|
||||
backgroundSelected: Color = IntUiLightTheme.colors.grey(11),
|
||||
backgroundSelectedActivated: Color = IntUiLightTheme.colors.blue(4),
|
||||
backgroundFocused: Color = background,
|
||||
backgroundPressed: Color = IntUiLightTheme.colors.grey(11),
|
||||
backgroundHovered: Color = IntUiLightTheme.colors.grey(12),
|
||||
border: Color = background,
|
||||
borderDisabled: Color = border,
|
||||
borderFocused: Color = IntUiLightTheme.colors.blue(5),
|
||||
borderDisabled: Color = backgroundDisabled,
|
||||
borderSelected: Color = backgroundSelected,
|
||||
borderSelectedActivated: Color = backgroundSelectedActivated,
|
||||
borderFocused: Color = backgroundFocused,
|
||||
borderPressed: Color = backgroundPressed,
|
||||
borderHovered: Color = backgroundHovered,
|
||||
) =
|
||||
IconButtonColors(
|
||||
background,
|
||||
backgroundDisabled,
|
||||
backgroundFocused,
|
||||
backgroundPressed,
|
||||
backgroundHovered,
|
||||
border,
|
||||
borderDisabled,
|
||||
borderFocused,
|
||||
borderPressed,
|
||||
borderHovered,
|
||||
foregroundSelectedActivated = foregroundSelectedActivated,
|
||||
background = background,
|
||||
backgroundDisabled = backgroundDisabled,
|
||||
backgroundSelected = backgroundSelected,
|
||||
backgroundSelectedActivated = backgroundSelectedActivated,
|
||||
backgroundFocused = backgroundFocused,
|
||||
backgroundPressed = backgroundPressed,
|
||||
backgroundHovered = backgroundHovered,
|
||||
border = border,
|
||||
borderDisabled = borderDisabled,
|
||||
borderSelected = borderSelected,
|
||||
borderSelectedActivated = borderSelectedActivated,
|
||||
borderFocused = borderFocused,
|
||||
borderPressed = borderPressed,
|
||||
borderHovered = borderHovered,
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun IconButtonColors.Companion.dark(
|
||||
foregroundSelectedActivated: Color = IntUiDarkTheme.colors.grey(14),
|
||||
background: Color = Color.Unspecified,
|
||||
backgroundDisabled: Color = background,
|
||||
backgroundSelected: Color = IntUiDarkTheme.colors.grey(5),
|
||||
backgroundSelectedActivated: Color = IntUiDarkTheme.colors.blue(6),
|
||||
backgroundFocused: Color = background,
|
||||
backgroundPressed: Color = IntUiDarkTheme.colors.grey(5),
|
||||
backgroundHovered: Color = IntUiDarkTheme.colors.grey(3),
|
||||
border: Color = background,
|
||||
borderDisabled: Color = border,
|
||||
borderFocused: Color = IntUiDarkTheme.colors.blue(6),
|
||||
borderDisabled: Color = backgroundDisabled,
|
||||
borderSelected: Color = backgroundSelected,
|
||||
borderSelectedActivated: Color = backgroundSelectedActivated,
|
||||
borderFocused: Color = backgroundFocused,
|
||||
borderPressed: Color = backgroundPressed,
|
||||
borderHovered: Color = backgroundHovered,
|
||||
) =
|
||||
IconButtonColors(
|
||||
background,
|
||||
backgroundDisabled,
|
||||
backgroundFocused,
|
||||
backgroundPressed,
|
||||
backgroundHovered,
|
||||
border,
|
||||
borderDisabled,
|
||||
borderFocused,
|
||||
borderPressed,
|
||||
borderHovered,
|
||||
foregroundSelectedActivated = foregroundSelectedActivated,
|
||||
background = background,
|
||||
backgroundDisabled = backgroundDisabled,
|
||||
backgroundSelected = backgroundSelected,
|
||||
backgroundSelectedActivated = backgroundSelectedActivated,
|
||||
backgroundFocused = backgroundFocused,
|
||||
backgroundPressed = backgroundPressed,
|
||||
backgroundHovered = backgroundHovered,
|
||||
border = border,
|
||||
borderDisabled = borderDisabled,
|
||||
borderSelected = borderSelected,
|
||||
borderSelectedActivated = borderSelectedActivated,
|
||||
borderFocused = borderFocused,
|
||||
borderPressed = borderPressed,
|
||||
borderHovered = borderHovered,
|
||||
)
|
||||
|
||||
fun IconButtonMetrics.Companion.defaults(
|
||||
|
||||
@@ -24,14 +24,24 @@ fun MenuStyle.Companion.light(
|
||||
colors: MenuColors = MenuColors.light(),
|
||||
metrics: MenuMetrics = MenuMetrics.defaults(),
|
||||
icons: MenuIcons = MenuIcons.defaults(),
|
||||
) = MenuStyle(colors, metrics, icons)
|
||||
) = MenuStyle(
|
||||
isDark = false,
|
||||
colors = colors,
|
||||
metrics = metrics,
|
||||
icons = icons,
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun MenuStyle.Companion.dark(
|
||||
colors: MenuColors = MenuColors.dark(),
|
||||
metrics: MenuMetrics = MenuMetrics.defaults(),
|
||||
icons: MenuIcons = MenuIcons.defaults(),
|
||||
) = MenuStyle(colors, metrics, icons)
|
||||
) = MenuStyle(
|
||||
isDark = true,
|
||||
colors = colors,
|
||||
metrics = metrics,
|
||||
icons = icons,
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun MenuColors.Companion.light(
|
||||
@@ -92,7 +102,7 @@ fun MenuItemColors.Companion.dark(
|
||||
backgroundDisabled: Color = IntUiDarkTheme.colors.grey(2),
|
||||
backgroundFocused: Color = IntUiDarkTheme.colors.blue(2),
|
||||
backgroundPressed: Color = background,
|
||||
backgroundHovered: Color = background,
|
||||
backgroundHovered: Color = backgroundFocused,
|
||||
content: Color = IntUiDarkTheme.colors.grey(12),
|
||||
contentDisabled: Color = IntUiDarkTheme.colors.grey(7),
|
||||
contentFocused: Color = content,
|
||||
|
||||
@@ -66,7 +66,6 @@ object IntUiDefaultTabColorsFactory {
|
||||
|
||||
fun light(
|
||||
background: Color = IntUiLightTheme.colors.grey(14),
|
||||
backgroundFocused: Color = background,
|
||||
backgroundHovered: Color = IntUiLightTheme.colors.grey(12),
|
||||
backgroundPressed: Color = backgroundHovered,
|
||||
backgroundSelected: Color = background,
|
||||
@@ -75,30 +74,25 @@ object IntUiDefaultTabColorsFactory {
|
||||
contentHovered: Color = content,
|
||||
contentDisabled: Color = content,
|
||||
contentPressed: Color = content,
|
||||
contentFocused: Color = content,
|
||||
contentSelected: Color = content,
|
||||
underline: Color = Color.Unspecified,
|
||||
underlineHovered: Color = underline,
|
||||
underlineDisabled: Color = underline,
|
||||
underlinePressed: Color = underline,
|
||||
underlineFocused: Color = underline,
|
||||
underlineSelected: Color = IntUiLightTheme.colors.blue(4),
|
||||
) = TabColors(
|
||||
background,
|
||||
backgroundDisabled,
|
||||
backgroundFocused,
|
||||
backgroundPressed,
|
||||
backgroundHovered,
|
||||
backgroundSelected,
|
||||
content,
|
||||
contentDisabled,
|
||||
contentFocused,
|
||||
contentPressed,
|
||||
contentHovered,
|
||||
contentSelected,
|
||||
underline,
|
||||
underlineDisabled,
|
||||
underlineFocused,
|
||||
underlinePressed,
|
||||
underlineHovered,
|
||||
underlineSelected,
|
||||
@@ -106,7 +100,6 @@ object IntUiDefaultTabColorsFactory {
|
||||
|
||||
fun dark(
|
||||
background: Color = Color.Unspecified,
|
||||
backgroundFocused: Color = background,
|
||||
backgroundHovered: Color = IntUiDarkTheme.colors.grey(4),
|
||||
backgroundPressed: Color = backgroundHovered,
|
||||
backgroundSelected: Color = background,
|
||||
@@ -115,30 +108,25 @@ object IntUiDefaultTabColorsFactory {
|
||||
contentHovered: Color = content,
|
||||
contentDisabled: Color = content,
|
||||
contentPressed: Color = content,
|
||||
contentFocused: Color = content,
|
||||
contentSelected: Color = content,
|
||||
underline: Color = Color.Unspecified,
|
||||
underlineHovered: Color = underline,
|
||||
underlineDisabled: Color = underline,
|
||||
underlinePressed: Color = underline,
|
||||
underlineFocused: Color = underline,
|
||||
underlineSelected: Color = IntUiDarkTheme.colors.blue(6),
|
||||
) = TabColors(
|
||||
background,
|
||||
backgroundDisabled,
|
||||
backgroundFocused,
|
||||
backgroundPressed,
|
||||
backgroundHovered,
|
||||
backgroundSelected,
|
||||
content,
|
||||
contentDisabled,
|
||||
contentFocused,
|
||||
contentPressed,
|
||||
contentHovered,
|
||||
contentSelected,
|
||||
underline,
|
||||
underlineDisabled,
|
||||
underlineFocused,
|
||||
underlinePressed,
|
||||
underlineHovered,
|
||||
underlineSelected,
|
||||
@@ -152,7 +140,6 @@ object IntUiEditorTabColorsFactory {
|
||||
|
||||
fun light(
|
||||
background: Color = Color.Transparent,
|
||||
backgroundFocused: Color = background,
|
||||
backgroundHovered: Color = background,
|
||||
backgroundPressed: Color = background,
|
||||
backgroundSelected: Color = background,
|
||||
@@ -161,30 +148,25 @@ object IntUiEditorTabColorsFactory {
|
||||
contentHovered: Color = content,
|
||||
contentDisabled: Color = content,
|
||||
contentPressed: Color = content,
|
||||
contentFocused: Color = content,
|
||||
contentSelected: Color = content,
|
||||
underline: Color = Color.Unspecified,
|
||||
underlineHovered: Color = underline,
|
||||
underlineDisabled: Color = underline,
|
||||
underlinePressed: Color = underline,
|
||||
underlineFocused: Color = underline,
|
||||
underlineSelected: Color = IntUiLightTheme.colors.blue(4),
|
||||
) = TabColors(
|
||||
background,
|
||||
backgroundDisabled,
|
||||
backgroundFocused,
|
||||
backgroundPressed,
|
||||
backgroundHovered,
|
||||
backgroundSelected,
|
||||
content,
|
||||
contentDisabled,
|
||||
contentFocused,
|
||||
contentPressed,
|
||||
contentHovered,
|
||||
contentSelected,
|
||||
underline,
|
||||
underlineDisabled,
|
||||
underlineFocused,
|
||||
underlinePressed,
|
||||
underlineHovered,
|
||||
underlineSelected,
|
||||
@@ -192,7 +174,6 @@ object IntUiEditorTabColorsFactory {
|
||||
|
||||
fun dark(
|
||||
background: Color = Color.Unspecified,
|
||||
backgroundFocused: Color = background,
|
||||
backgroundHovered: Color = background,
|
||||
backgroundPressed: Color = background,
|
||||
backgroundSelected: Color = background,
|
||||
@@ -202,31 +183,26 @@ object IntUiEditorTabColorsFactory {
|
||||
contentHovered: Color = content,
|
||||
contentDisabled: Color = content,
|
||||
contentPressed: Color = content,
|
||||
contentFocused: Color = content,
|
||||
contentSelected: Color = content,
|
||||
|
||||
underline: Color = Color.Unspecified,
|
||||
underlineHovered: Color = underline,
|
||||
underlineDisabled: Color = underline,
|
||||
underlinePressed: Color = underline,
|
||||
underlineFocused: Color = underline,
|
||||
underlineSelected: Color = IntUiDarkTheme.colors.blue(6),
|
||||
) = TabColors(
|
||||
background,
|
||||
backgroundDisabled,
|
||||
backgroundFocused,
|
||||
backgroundPressed,
|
||||
backgroundHovered,
|
||||
backgroundSelected,
|
||||
content,
|
||||
contentDisabled,
|
||||
contentFocused,
|
||||
contentPressed,
|
||||
contentHovered,
|
||||
contentSelected,
|
||||
underline,
|
||||
underlineDisabled,
|
||||
underlineFocused,
|
||||
underlinePressed,
|
||||
underlineHovered,
|
||||
underlineSelected,
|
||||
@@ -243,26 +219,22 @@ fun TabMetrics.Companion.defaults(
|
||||
fun TabContentAlpha.Companion.default(
|
||||
iconNormal: Float = 1f,
|
||||
iconDisabled: Float = iconNormal,
|
||||
iconFocused: Float = iconNormal,
|
||||
iconPressed: Float = iconNormal,
|
||||
iconHovered: Float = iconNormal,
|
||||
iconSelected: Float = iconNormal,
|
||||
labelNormal: Float = iconNormal,
|
||||
labelDisabled: Float = iconNormal,
|
||||
labelFocused: Float = iconNormal,
|
||||
labelPressed: Float = iconNormal,
|
||||
labelHovered: Float = iconNormal,
|
||||
labelSelected: Float = iconNormal,
|
||||
) = TabContentAlpha(
|
||||
iconNormal,
|
||||
iconDisabled,
|
||||
iconFocused,
|
||||
iconPressed,
|
||||
iconHovered,
|
||||
iconSelected,
|
||||
labelNormal,
|
||||
labelDisabled,
|
||||
labelFocused,
|
||||
labelPressed,
|
||||
labelHovered,
|
||||
labelSelected,
|
||||
@@ -271,13 +243,11 @@ fun TabContentAlpha.Companion.default(
|
||||
fun TabContentAlpha.Companion.editor(
|
||||
iconNormal: Float = .7f,
|
||||
iconDisabled: Float = iconNormal,
|
||||
iconFocused: Float = iconNormal,
|
||||
iconPressed: Float = 1f,
|
||||
iconHovered: Float = iconPressed,
|
||||
iconSelected: Float = iconPressed,
|
||||
labelNormal: Float = .9f,
|
||||
labelDisabled: Float = labelNormal,
|
||||
labelFocused: Float = labelNormal,
|
||||
labelPressed: Float = 1f,
|
||||
labelHovered: Float = labelPressed,
|
||||
labelSelected: Float = labelPressed,
|
||||
@@ -285,13 +255,11 @@ fun TabContentAlpha.Companion.editor(
|
||||
TabContentAlpha(
|
||||
iconNormal,
|
||||
iconDisabled,
|
||||
iconFocused,
|
||||
iconPressed,
|
||||
iconHovered,
|
||||
iconSelected,
|
||||
labelNormal,
|
||||
labelDisabled,
|
||||
labelFocused,
|
||||
labelPressed,
|
||||
labelHovered,
|
||||
labelSelected,
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.jetbrains.jewel.intui.standalone.styling.Undecorated
|
||||
import org.jetbrains.jewel.intui.standalone.styling.dark
|
||||
import org.jetbrains.jewel.intui.standalone.styling.light
|
||||
import org.jetbrains.jewel.ui.ComponentStyling
|
||||
import org.jetbrains.jewel.ui.DefaultComponentStyling
|
||||
import org.jetbrains.jewel.ui.component.styling.ButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.CheckboxStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.ChipStyle
|
||||
@@ -46,7 +47,6 @@ import org.jetbrains.jewel.ui.component.styling.TextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TooltipStyle
|
||||
import org.jetbrains.jewel.ui.painter.LocalPainterHintsProvider
|
||||
import org.jetbrains.jewel.ui.theme.BaseJewelTheme
|
||||
import org.jetbrains.jewel.ui.theme.ComponentStyleProviderScope
|
||||
|
||||
val JewelTheme.Companion.defaultTextStyle
|
||||
get() = TextStyle.Default.copy(
|
||||
@@ -77,11 +77,13 @@ fun JewelTheme.Companion.darkThemeDefinition(
|
||||
) = ThemeDefinition(isDark = true, colors, metrics, defaultTextStyle, contentColor, palette, iconData)
|
||||
|
||||
@Composable
|
||||
fun JewelTheme.Companion.defaultComponentStyling(theme: ThemeDefinition): ComponentStyling =
|
||||
if (theme.isDark) darkComponentStyling() else lightComponentStyling()
|
||||
fun ComponentStyling.default(): ComponentStyling = with {
|
||||
val isDark = JewelTheme.isDark
|
||||
if (isDark) dark() else light()
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun JewelTheme.Companion.darkComponentStyling(
|
||||
fun ComponentStyling.dark(
|
||||
checkboxStyle: CheckboxStyle = CheckboxStyle.dark(),
|
||||
chipStyle: ChipStyle = ChipStyle.dark(),
|
||||
circularProgressStyle: CircularProgressStyle = CircularProgressStyle.dark(),
|
||||
@@ -104,33 +106,35 @@ fun JewelTheme.Companion.darkComponentStyling(
|
||||
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,
|
||||
) = with(
|
||||
DefaultComponentStyling(
|
||||
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(
|
||||
fun ComponentStyling.light(
|
||||
checkboxStyle: CheckboxStyle = CheckboxStyle.light(),
|
||||
chipStyle: ChipStyle = ChipStyle.light(),
|
||||
circularProgressStyle: CircularProgressStyle = CircularProgressStyle.light(),
|
||||
@@ -153,29 +157,31 @@ fun JewelTheme.Companion.lightComponentStyling(
|
||||
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,
|
||||
) = with(
|
||||
DefaultComponentStyling(
|
||||
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
|
||||
@@ -193,7 +199,7 @@ fun IntUiTheme(
|
||||
|
||||
IntUiTheme(
|
||||
theme = themeDefinition,
|
||||
componentStyling = { },
|
||||
styling = ComponentStyling,
|
||||
swingCompatMode = swingCompatMode,
|
||||
content = content,
|
||||
)
|
||||
@@ -202,16 +208,13 @@ fun IntUiTheme(
|
||||
@Composable
|
||||
fun IntUiTheme(
|
||||
theme: ThemeDefinition,
|
||||
componentStyling: @Composable ComponentStyleProviderScope.() -> Unit,
|
||||
styling: ComponentStyling,
|
||||
swingCompatMode: Boolean = false,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
BaseJewelTheme(
|
||||
theme,
|
||||
componentStyling = {
|
||||
provide(providedValues = JewelTheme.defaultComponentStyling(theme).providedStyles())
|
||||
componentStyling()
|
||||
},
|
||||
ComponentStyling.default().with(styling),
|
||||
swingCompatMode,
|
||||
) {
|
||||
CompositionLocalProvider(
|
||||
|
||||
@@ -26,9 +26,13 @@ import androidx.compose.ui.unit.dp
|
||||
import com.intellij.icons.AllIcons
|
||||
import com.intellij.ui.JBColor
|
||||
import icons.JewelIcons
|
||||
import org.jetbrains.jewel.bridge.ToolWindowScope
|
||||
import org.jetbrains.jewel.bridge.theme.SwingBridgeTheme
|
||||
import org.jetbrains.jewel.bridge.toComposeColor
|
||||
import org.jetbrains.jewel.foundation.lazy.tree.buildTree
|
||||
import org.jetbrains.jewel.foundation.modifier.onActivated
|
||||
import org.jetbrains.jewel.foundation.modifier.trackActivation
|
||||
import org.jetbrains.jewel.foundation.modifier.trackComponentActivation
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.ui.component.CheckboxRow
|
||||
import org.jetbrains.jewel.ui.component.CircularProgressIndicator
|
||||
@@ -44,13 +48,17 @@ import org.jetbrains.jewel.ui.component.TextField
|
||||
import org.jetbrains.jewel.ui.component.Tooltip
|
||||
|
||||
@Composable
|
||||
internal fun ComponentShowcaseTab() {
|
||||
internal fun ToolWindowScope.ComponentShowcaseTab() {
|
||||
SwingBridgeTheme {
|
||||
val bgColor by remember(JewelTheme.isDark) { mutableStateOf(JBColor.PanelBackground.toComposeColor()) }
|
||||
|
||||
val scrollState = rememberScrollState()
|
||||
Row(
|
||||
modifier = Modifier.fillMaxSize().background(bgColor).verticalScroll(scrollState).padding(16.dp),
|
||||
modifier = Modifier.trackComponentActivation(panel)
|
||||
.fillMaxSize()
|
||||
.background(bgColor)
|
||||
.verticalScroll(scrollState)
|
||||
.padding(16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
ColumnOne()
|
||||
@@ -62,10 +70,16 @@ internal fun ComponentShowcaseTab() {
|
||||
@Composable
|
||||
private fun RowScope.ColumnOne() {
|
||||
Column(
|
||||
Modifier.weight(1f),
|
||||
Modifier.trackActivation().weight(1f),
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
Text("Here is a selection of our finest components:")
|
||||
var activated by remember { mutableStateOf(false) }
|
||||
Text(
|
||||
"Here is a selection of our finest components(activated: $activated):",
|
||||
Modifier.onActivated {
|
||||
activated = it
|
||||
},
|
||||
)
|
||||
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
@@ -172,9 +186,19 @@ private fun RowScope.ColumnOne() {
|
||||
@Composable
|
||||
private fun RowScope.ColumnTwo() {
|
||||
Column(
|
||||
Modifier.weight(1f),
|
||||
Modifier.trackActivation().weight(1f),
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
var activated by remember { mutableStateOf(false) }
|
||||
Text(
|
||||
"activated: $activated",
|
||||
Modifier.onActivated {
|
||||
activated = it
|
||||
},
|
||||
)
|
||||
OutlinedButton({}) {
|
||||
Text("Outlined")
|
||||
}
|
||||
val tree = remember {
|
||||
buildTree {
|
||||
addNode("root 1") {
|
||||
|
||||
@@ -8,6 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.kotlin.reflect)
|
||||
implementation(projects.intUi.intUiStandalone)
|
||||
implementation(projects.intUi.intUiDecoratedWindow)
|
||||
implementation(compose.desktop.currentOs) {
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
package org.jetbrains.jewel.samples.standalone
|
||||
|
||||
enum class IntUiThemes {
|
||||
Light, LightWithLightHeader, Dark;
|
||||
import org.jetbrains.skiko.SystemTheme
|
||||
import org.jetbrains.skiko.currentSystemTheme
|
||||
|
||||
fun isDark() = this == Dark
|
||||
enum class IntUiThemes {
|
||||
Light, LightWithLightHeader, Dark, SYSTEM;
|
||||
|
||||
fun isDark(): Boolean = if (this == SYSTEM) {
|
||||
fromSystemTheme(currentSystemTheme)
|
||||
} else {
|
||||
this
|
||||
} == Dark
|
||||
|
||||
fun isLightHeader() = this == LightWithLightHeader
|
||||
|
||||
companion object {
|
||||
|
||||
fun fromSystemTheme(systemTheme: SystemTheme) =
|
||||
if (systemTheme == SystemTheme.LIGHT) Light else Dark
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,236 +1,63 @@
|
||||
package org.jetbrains.jewel.samples.standalone
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.IntrinsicSize
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.rememberScrollbarAdapter
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.rememberUpdatedState
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.res.ResourceLoader
|
||||
import androidx.compose.ui.res.loadSvgPainter
|
||||
import androidx.compose.ui.unit.Density
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.application
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.intui.standalone.theme.IntUiTheme
|
||||
import org.jetbrains.jewel.intui.standalone.theme.darkThemeDefinition
|
||||
import org.jetbrains.jewel.intui.standalone.theme.lightThemeDefinition
|
||||
import org.jetbrains.jewel.intui.window.provideDecoratedWindowComponentStyling
|
||||
import org.jetbrains.jewel.intui.window.decoratedWindow
|
||||
import org.jetbrains.jewel.intui.window.styling.dark
|
||||
import org.jetbrains.jewel.intui.window.styling.light
|
||||
import org.jetbrains.jewel.intui.window.styling.lightWithLightHeader
|
||||
import org.jetbrains.jewel.samples.standalone.components.Borders
|
||||
import org.jetbrains.jewel.samples.standalone.components.Buttons
|
||||
import org.jetbrains.jewel.samples.standalone.components.Checkboxes
|
||||
import org.jetbrains.jewel.samples.standalone.components.ChipsAndTree
|
||||
import org.jetbrains.jewel.samples.standalone.components.Dropdowns
|
||||
import org.jetbrains.jewel.samples.standalone.components.Icons
|
||||
import org.jetbrains.jewel.samples.standalone.components.Links
|
||||
import org.jetbrains.jewel.samples.standalone.components.ProgressBar
|
||||
import org.jetbrains.jewel.samples.standalone.components.RadioButtons
|
||||
import org.jetbrains.jewel.samples.standalone.components.Tabs
|
||||
import org.jetbrains.jewel.samples.standalone.components.TextAreas
|
||||
import org.jetbrains.jewel.samples.standalone.components.TextFields
|
||||
import org.jetbrains.jewel.samples.standalone.components.Tooltips
|
||||
import org.jetbrains.jewel.ui.Orientation
|
||||
import org.jetbrains.jewel.ui.component.CheckboxRow
|
||||
import org.jetbrains.jewel.ui.component.Divider
|
||||
import org.jetbrains.jewel.ui.component.Dropdown
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.IconButton
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.Tooltip
|
||||
import org.jetbrains.jewel.ui.component.VerticalScrollbar
|
||||
import org.jetbrains.jewel.ui.component.separator
|
||||
import org.jetbrains.jewel.ui.theme.colorPalette
|
||||
import org.jetbrains.jewel.samples.standalone.view.TitleBarView
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.MainViewModel
|
||||
import org.jetbrains.jewel.ui.ComponentStyling
|
||||
import org.jetbrains.jewel.window.DecoratedWindow
|
||||
import org.jetbrains.jewel.window.TitleBar
|
||||
import org.jetbrains.jewel.window.newFullscreenControls
|
||||
import org.jetbrains.jewel.window.styling.TitleBarStyle
|
||||
import java.awt.Desktop
|
||||
import java.io.InputStream
|
||||
import java.net.URI
|
||||
|
||||
fun main() {
|
||||
val icon = svgResource("icons/jewel-logo.svg")
|
||||
application {
|
||||
var theme by remember { mutableStateOf(IntUiThemes.Light) }
|
||||
|
||||
var swingCompat by remember { mutableStateOf(false) }
|
||||
val themeDefinition =
|
||||
if (theme.isDark()) {
|
||||
if (MainViewModel.theme.isDark()) {
|
||||
JewelTheme.darkThemeDefinition()
|
||||
} else {
|
||||
JewelTheme.lightThemeDefinition()
|
||||
}
|
||||
|
||||
val projectColor by rememberUpdatedState(
|
||||
if (theme.isLightHeader()) {
|
||||
Color(0xFFF5D4C1)
|
||||
} else {
|
||||
Color(0xFF654B40)
|
||||
},
|
||||
)
|
||||
|
||||
IntUiTheme(
|
||||
themeDefinition,
|
||||
componentStyling = {
|
||||
provideDecoratedWindowComponentStyling(
|
||||
titleBarStyle = when (theme) {
|
||||
IntUiThemes.Light -> TitleBarStyle.light()
|
||||
IntUiThemes.LightWithLightHeader -> TitleBarStyle.lightWithLightHeader()
|
||||
IntUiThemes.Dark -> TitleBarStyle.dark()
|
||||
},
|
||||
)
|
||||
},
|
||||
swingCompat,
|
||||
ComponentStyling.decoratedWindow(
|
||||
titleBarStyle = when (MainViewModel.theme) {
|
||||
IntUiThemes.Light -> TitleBarStyle.light()
|
||||
IntUiThemes.LightWithLightHeader -> TitleBarStyle.lightWithLightHeader()
|
||||
IntUiThemes.Dark -> TitleBarStyle.dark()
|
||||
IntUiThemes.SYSTEM -> if (MainViewModel.theme.isDark()) {
|
||||
TitleBarStyle.dark()
|
||||
} else {
|
||||
TitleBarStyle.light()
|
||||
}
|
||||
},
|
||||
),
|
||||
MainViewModel.swingCompat,
|
||||
) {
|
||||
DecoratedWindow(
|
||||
onCloseRequest = { exitApplication() },
|
||||
title = "Jewel component catalog",
|
||||
icon = icon,
|
||||
) {
|
||||
val windowBackground = if (theme.isDark()) {
|
||||
JewelTheme.colorPalette.grey(1)
|
||||
} else {
|
||||
JewelTheme.colorPalette.grey(14)
|
||||
}
|
||||
TitleBar(Modifier.newFullscreenControls(), gradientStartColor = projectColor) {
|
||||
Row(Modifier.align(Alignment.Start)) {
|
||||
Dropdown(Modifier.height(30.dp), menuContent = {
|
||||
selectableItem(false, {
|
||||
}) {
|
||||
Text("New Project...")
|
||||
}
|
||||
separator()
|
||||
selectableItem(false, {
|
||||
}) {
|
||||
Text("jewel")
|
||||
}
|
||||
}) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(3.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Icon(
|
||||
"icons/jewel-logo.svg",
|
||||
"Jewel Logo",
|
||||
StandaloneSampleIcons::class.java,
|
||||
Modifier.padding(horizontal = 4.dp).size(20.dp),
|
||||
)
|
||||
Text("jewel")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text(title)
|
||||
|
||||
Row(Modifier.align(Alignment.End)) {
|
||||
Tooltip({
|
||||
Text("Open Jewel Github repository")
|
||||
}) {
|
||||
IconButton({
|
||||
Desktop.getDesktop().browse(URI.create("https://github.com/JetBrains/jewel"))
|
||||
}, Modifier.size(40.dp).padding(5.dp)) {
|
||||
Icon("icons/github@20x20.svg", "Github", StandaloneSampleIcons::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip({
|
||||
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({
|
||||
theme = when (theme) {
|
||||
IntUiThemes.Light -> IntUiThemes.LightWithLightHeader
|
||||
IntUiThemes.LightWithLightHeader -> IntUiThemes.Dark
|
||||
IntUiThemes.Dark -> IntUiThemes.Light
|
||||
}
|
||||
}, Modifier.size(40.dp).padding(5.dp)) {
|
||||
if (theme.isDark()) {
|
||||
Icon("icons/darkTheme@20x20.svg", "Themes", StandaloneSampleIcons::class.java)
|
||||
} else {
|
||||
Icon("icons/lightTheme@20x20.svg", "Themes", StandaloneSampleIcons::class.java)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column(Modifier.fillMaxSize().background(windowBackground)) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(8.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterHorizontally),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
CheckboxRow("Swing compat", swingCompat, { swingCompat = it })
|
||||
}
|
||||
|
||||
Divider(Orientation.Horizontal, Modifier.fillMaxWidth())
|
||||
|
||||
ComponentShowcase()
|
||||
}
|
||||
TitleBarView()
|
||||
MainViewModel.currentView.content()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun ComponentShowcase() {
|
||||
val verticalScrollState = rememberScrollState()
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
Column(
|
||||
Modifier.width(IntrinsicSize.Max)
|
||||
.verticalScroll(verticalScrollState)
|
||||
.padding(24.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
Borders()
|
||||
Buttons()
|
||||
Dropdowns()
|
||||
Checkboxes()
|
||||
RadioButtons()
|
||||
Links()
|
||||
Tooltips()
|
||||
TextFields()
|
||||
TextAreas()
|
||||
ProgressBar()
|
||||
ChipsAndTree()
|
||||
Tabs()
|
||||
Icons()
|
||||
}
|
||||
|
||||
VerticalScrollbar(
|
||||
modifier = Modifier.align(Alignment.CenterEnd).fillMaxHeight(),
|
||||
adapter = rememberScrollbarAdapter(verticalScrollState),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun svgResource(
|
||||
resourcePath: String,
|
||||
loader: ResourceLoader = ResourceLoader.Default,
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.BlendMode
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.painter.badge.DotBadgeShape
|
||||
import org.jetbrains.jewel.ui.painter.hints.Badge
|
||||
import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider
|
||||
|
||||
@Composable
|
||||
internal fun Icons() {
|
||||
GroupHeader("Icons")
|
||||
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
val iconProvider = rememberResourcePainterProvider("icons/jewel-logo.svg", StandaloneSampleIcons::class.java)
|
||||
val logo by iconProvider.getPainter()
|
||||
|
||||
Icon(logo, "Jewel Logo", Modifier.size(16.dp))
|
||||
Icon(logo, "Jewel Logo", Modifier.size(32.dp))
|
||||
Icon(logo, "Jewel Logo", Modifier.size(64.dp))
|
||||
Icon(logo, "Jewel Logo", Modifier.size(128.dp))
|
||||
Icon(
|
||||
logo,
|
||||
"Jewel Logo",
|
||||
ColorFilter.tint(Color.Magenta, BlendMode.Multiply),
|
||||
Modifier.size(128.dp),
|
||||
)
|
||||
|
||||
val badged by iconProvider.getPainter(Badge(Color.Red, DotBadgeShape.Default))
|
||||
Icon(badged, "Jewel Logo", Modifier.size(20.dp))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package org.jetbrains.jewel.samples.standalone.reflection
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.ViewInfo
|
||||
import java.nio.file.FileSystemNotFoundException
|
||||
import java.nio.file.FileSystems
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import kotlin.io.path.absolutePathString
|
||||
import kotlin.io.path.name
|
||||
import kotlin.reflect.jvm.kotlinFunction
|
||||
|
||||
internal fun findViews(packageName: String): List<ViewInfo> {
|
||||
val path = "/" + packageName.replace('.', '/').removePrefix("/")
|
||||
|
||||
val uri = Class.forName("org.jetbrains.jewel.samples.standalone.reflection.ViewsKt")
|
||||
.getResource(path)?.toURI() ?: return emptyList()
|
||||
|
||||
val directory = if (uri.scheme == "jar") {
|
||||
val fileSystem = try {
|
||||
FileSystems.getFileSystem(uri)
|
||||
} catch (_: FileSystemNotFoundException) {
|
||||
FileSystems.newFileSystem(uri, emptyMap<String, Any>())
|
||||
}
|
||||
fileSystem.getPath(path)
|
||||
} else {
|
||||
Paths.get(uri)
|
||||
}
|
||||
|
||||
val result = mutableListOf<ViewInfo>()
|
||||
|
||||
if (Files.exists(directory)) {
|
||||
Files.list(directory)
|
||||
.filter { f -> Files.isRegularFile(f) && !f.name.contains('$') && f.name.endsWith("Kt.class") }
|
||||
.forEach { f ->
|
||||
val fullyQualifiedClassName = packageName +
|
||||
f.absolutePathString().removePrefix(directory.absolutePathString())
|
||||
.dropLast(6) // remove .class
|
||||
.replace('/', '.')
|
||||
try {
|
||||
result += Class.forName(fullyQualifiedClassName).methods.mapNotNull {
|
||||
val annotation = it.getAnnotation(View::class.java) ?: return@mapNotNull null
|
||||
val kFunc = it.kotlinFunction ?: return@mapNotNull null
|
||||
if (kFunc.parameters.isNotEmpty() || kFunc.returnType.classifier != Unit::class) return@mapNotNull null
|
||||
|
||||
ViewInfo(
|
||||
title = annotation.title,
|
||||
position = annotation.position,
|
||||
icon = annotation.icon,
|
||||
content = it.kotlinFunction as @Composable () -> Unit,
|
||||
)
|
||||
}
|
||||
} catch (e: ClassNotFoundException) {
|
||||
System.err.println(e)
|
||||
} catch (ignore: InstantiationException) {
|
||||
// We try to instantiate an interface
|
||||
// or an object that does not have a
|
||||
// default constructor
|
||||
} catch (ignore: IllegalAccessException) {
|
||||
// The class is not public
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result.sortedBy { it.position }
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package org.jetbrains.jewel.samples.standalone.view
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import org.jetbrains.jewel.foundation.modifier.trackActivation
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.ComponentsViewModel
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.ViewInfo
|
||||
import org.jetbrains.jewel.ui.Orientation
|
||||
import org.jetbrains.jewel.ui.component.Divider
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.SelectableIconButton
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.Tooltip
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalIconButtonStyle
|
||||
import org.jetbrains.jewel.ui.painter.hints.Size
|
||||
import org.jetbrains.jewel.ui.painter.hints.Stroke
|
||||
import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider
|
||||
|
||||
@Composable
|
||||
@View(title = "Components", position = 1, icon = "icons/structure.svg")
|
||||
fun ComponentsView() {
|
||||
Row(Modifier.trackActivation().fillMaxSize().background(JewelTheme.globalColors.paneBackground)) {
|
||||
ComponentsToolBar()
|
||||
Divider(Orientation.Vertical)
|
||||
ComponentView(ComponentsViewModel.currentView)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ComponentsToolBar() {
|
||||
Column(Modifier.fillMaxHeight().width(40.dp)) {
|
||||
ComponentsViewModel.views.forEach {
|
||||
Tooltip({
|
||||
Text("Show ${it.title}")
|
||||
}) {
|
||||
SelectableIconButton(ComponentsViewModel.currentView == it, {
|
||||
ComponentsViewModel.currentView = it
|
||||
}, Modifier.size(40.dp).padding(5.dp)) { state ->
|
||||
val tint by LocalIconButtonStyle.current.colors.foregroundFor(state)
|
||||
val painterProvider = rememberResourcePainterProvider(it.icon, StandaloneSampleIcons::class.java)
|
||||
val painter by painterProvider.getPainter(Size(20), Stroke(tint))
|
||||
Icon(painter = painter, "icon")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ComponentView(view: ViewInfo) {
|
||||
Column(Modifier.fillMaxSize().padding(24.dp), verticalArrangement = Arrangement.spacedBy(24.dp)) {
|
||||
Text(view.title, fontSize = 20.sp)
|
||||
view.content()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package org.jetbrains.jewel.samples.standalone.view
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.IntUiThemes
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.MainViewModel
|
||||
import org.jetbrains.jewel.ui.component.Dropdown
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.IconButton
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.Tooltip
|
||||
import org.jetbrains.jewel.ui.painter.hints.Size
|
||||
import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider
|
||||
import org.jetbrains.jewel.window.DecoratedWindowScope
|
||||
import org.jetbrains.jewel.window.TitleBar
|
||||
import org.jetbrains.jewel.window.newFullscreenControls
|
||||
import java.awt.Desktop
|
||||
import java.net.URI
|
||||
|
||||
@Composable
|
||||
fun DecoratedWindowScope.TitleBarView() {
|
||||
TitleBar(Modifier.newFullscreenControls(), gradientStartColor = MainViewModel.projectColor) {
|
||||
Row(Modifier.align(Alignment.Start)) {
|
||||
Dropdown(Modifier.height(30.dp), menuContent = {
|
||||
MainViewModel.views.forEach {
|
||||
selectableItem(MainViewModel.currentView == it, {
|
||||
MainViewModel.currentView = it
|
||||
}) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
val painterProvider =
|
||||
rememberResourcePainterProvider(it.icon, StandaloneSampleIcons::class.java)
|
||||
val painter by painterProvider.getPainter(Size(20))
|
||||
Icon(painter, "icon")
|
||||
Text(it.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(3.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
val painterProvider =
|
||||
rememberResourcePainterProvider(
|
||||
MainViewModel.currentView.icon,
|
||||
StandaloneSampleIcons::class.java,
|
||||
)
|
||||
val painter by painterProvider.getPainter(Size(20))
|
||||
Icon(painter, "icon")
|
||||
Text(MainViewModel.currentView.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text(title)
|
||||
|
||||
Row(Modifier.align(Alignment.End)) {
|
||||
Tooltip({
|
||||
Text("Open Jewel Github repository")
|
||||
}) {
|
||||
IconButton({
|
||||
Desktop.getDesktop().browse(URI.create("https://github.com/JetBrains/jewel"))
|
||||
}, Modifier.size(40.dp).padding(5.dp)) {
|
||||
Icon("icons/github@20x20.svg", "Github", StandaloneSampleIcons::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip({
|
||||
when (MainViewModel.theme) {
|
||||
IntUiThemes.Light -> Text("Switch to light theme with light header")
|
||||
IntUiThemes.LightWithLightHeader -> Text("Switch to dark theme")
|
||||
IntUiThemes.Dark, IntUiThemes.SYSTEM -> Text("Switch to light theme")
|
||||
}
|
||||
}) {
|
||||
IconButton({
|
||||
MainViewModel.theme = when (MainViewModel.theme) {
|
||||
IntUiThemes.Light -> IntUiThemes.LightWithLightHeader
|
||||
IntUiThemes.LightWithLightHeader -> IntUiThemes.Dark
|
||||
IntUiThemes.Dark, IntUiThemes.SYSTEM -> IntUiThemes.Light
|
||||
}
|
||||
}, Modifier.size(40.dp).padding(5.dp)) {
|
||||
when (MainViewModel.theme) {
|
||||
IntUiThemes.Light -> Icon(
|
||||
"icons/lightTheme@20x20.svg",
|
||||
"Themes",
|
||||
StandaloneSampleIcons::class.java,
|
||||
)
|
||||
|
||||
IntUiThemes.LightWithLightHeader -> Icon(
|
||||
"icons/lightWithLightHeaderTheme@20x20.svg",
|
||||
"Themes",
|
||||
StandaloneSampleIcons::class.java,
|
||||
)
|
||||
|
||||
IntUiThemes.Dark -> Icon(
|
||||
"icons/darkTheme@20x20.svg",
|
||||
"Themes",
|
||||
StandaloneSampleIcons::class.java,
|
||||
)
|
||||
|
||||
IntUiThemes.SYSTEM -> Icon(
|
||||
"icons/systemTheme@20x20.svg",
|
||||
"Themes",
|
||||
StandaloneSampleIcons::class.java,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package org.jetbrains.jewel.samples.standalone.view
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import org.jetbrains.jewel.foundation.modifier.trackActivation
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.samples.standalone.IntUiThemes
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.MainViewModel
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.CheckboxRow
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.RadioButtonChip
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalCheckboxStyle
|
||||
import org.jetbrains.jewel.ui.painter.hints.Selected
|
||||
import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider
|
||||
|
||||
@Composable
|
||||
@View(title = "Welcome", position = 0, icon = "icons/meetNewUi.svg")
|
||||
fun WelcomeView() {
|
||||
Box(
|
||||
Modifier.trackActivation().fillMaxSize()
|
||||
.background(JewelTheme.globalColors.paneBackground)
|
||||
.padding(24.dp),
|
||||
) {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(24.dp)) {
|
||||
val meetNewUiImage =
|
||||
rememberResourcePainterProvider("images/New UI Image.png", StandaloneSampleIcons::class.java)
|
||||
val meetNewUiImagePainter by meetNewUiImage.getPainter()
|
||||
Image(meetNewUiImagePainter, "Meet Jewel")
|
||||
|
||||
Text("Meet Jewel", fontSize = 20.sp)
|
||||
|
||||
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Text("Theme:")
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
ThemeSelectionChip(IntUiThemes.Dark, "Dark", "icons/darkTheme.svg")
|
||||
ThemeSelectionChip(IntUiThemes.Light, "Light", "icons/lightTheme.svg")
|
||||
ThemeSelectionChip(
|
||||
IntUiThemes.LightWithLightHeader,
|
||||
"Light(Header)",
|
||||
"icons/lightWithLightHeaderTheme.svg",
|
||||
)
|
||||
ThemeSelectionChip(IntUiThemes.SYSTEM, "System", "icons/systemTheme.svg")
|
||||
}
|
||||
}
|
||||
|
||||
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
CheckboxRow(
|
||||
text = "Swing compatibility",
|
||||
checked = MainViewModel.swingCompat,
|
||||
onCheckedChange = {
|
||||
MainViewModel.swingCompat = it
|
||||
},
|
||||
colors = LocalCheckboxStyle.current.colors,
|
||||
metrics = LocalCheckboxStyle.current.metrics,
|
||||
icons = LocalCheckboxStyle.current.icons,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ThemeSelectionChip(theme: IntUiThemes, name: String, icon: String) {
|
||||
RadioButtonChip(
|
||||
selected = MainViewModel.theme == theme,
|
||||
onClick = { MainViewModel.theme = theme },
|
||||
enabled = true,
|
||||
) {
|
||||
val painterProvider = rememberResourcePainterProvider(
|
||||
icon,
|
||||
StandaloneSampleIcons::class.java,
|
||||
)
|
||||
val painter by painterProvider.getPainter(Selected(MainViewModel.theme == theme))
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(5.dp),
|
||||
verticalAlignment = androidx.compose.ui.Alignment.CenterVertically,
|
||||
) {
|
||||
Icon(painter, name)
|
||||
Text(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -8,16 +8,16 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.DefaultButton
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.IconButton
|
||||
import org.jetbrains.jewel.ui.component.OutlinedButton
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
|
||||
@Composable
|
||||
@View(title = "Buttons", position = 0)
|
||||
fun Buttons() {
|
||||
GroupHeader("Buttons")
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -10,13 +10,13 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.state.ToggleableState
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.Outline
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.TriStateCheckboxRow
|
||||
|
||||
@Composable
|
||||
@View(title = "Checkboxes", position = 1)
|
||||
fun Checkboxes() {
|
||||
GroupHeader("Checkboxes")
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
@@ -25,6 +25,7 @@ import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn
|
||||
import org.jetbrains.jewel.foundation.lazy.tree.buildTree
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.Chip
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.LazyTree
|
||||
@@ -34,6 +35,7 @@ import org.jetbrains.jewel.ui.component.ToggleableChip
|
||||
import org.jetbrains.jewel.ui.theme.colorPalette
|
||||
|
||||
@Composable
|
||||
@View(title = "ChipsAndTree", position = 11)
|
||||
fun ChipsAndTree() {
|
||||
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) {
|
||||
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -9,15 +9,15 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.Outline
|
||||
import org.jetbrains.jewel.ui.component.Dropdown
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.separator
|
||||
|
||||
@Composable
|
||||
@View(title = "Dropdowns", position = 3)
|
||||
fun Dropdowns() {
|
||||
GroupHeader("Dropdowns")
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -0,0 +1,90 @@
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.BlendMode
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.painter.badge.DotBadgeShape
|
||||
import org.jetbrains.jewel.ui.painter.hints.Badge
|
||||
import org.jetbrains.jewel.ui.painter.hints.Size
|
||||
import org.jetbrains.jewel.ui.painter.hints.Stroke
|
||||
import org.jetbrains.jewel.ui.painter.rememberResourcePainterProvider
|
||||
import org.jetbrains.jewel.ui.theme.colorPalette
|
||||
|
||||
@Composable
|
||||
@View(title = "Icons", position = 6)
|
||||
internal fun Icons() {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
val iconProvider = rememberResourcePainterProvider("icons/jewel-logo.svg", StandaloneSampleIcons::class.java)
|
||||
val logo by iconProvider.getPainter()
|
||||
|
||||
Icon(logo, "Jewel Logo", Modifier.size(16.dp))
|
||||
Icon(logo, "Jewel Logo", Modifier.size(32.dp))
|
||||
Icon(logo, "Jewel Logo", Modifier.size(64.dp))
|
||||
Icon(logo, "Jewel Logo", Modifier.size(128.dp))
|
||||
Icon(
|
||||
logo,
|
||||
"Jewel Logo",
|
||||
ColorFilter.tint(Color.Magenta, BlendMode.Multiply),
|
||||
Modifier.size(128.dp),
|
||||
)
|
||||
}
|
||||
|
||||
Text("Hints:")
|
||||
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
) {
|
||||
val iconProvider =
|
||||
rememberResourcePainterProvider("icons/taskGroup.svg", StandaloneSampleIcons::class.java)
|
||||
|
||||
val normal by iconProvider.getPainter()
|
||||
val stroked by iconProvider.getPainter(Stroke(Color.White))
|
||||
val badged by iconProvider.getPainter(Badge(Color.Red, DotBadgeShape.Default))
|
||||
val strokedAndBadged by iconProvider.getPainter(Badge(Color.Red, DotBadgeShape.Default), Stroke(Color.White))
|
||||
val resized by iconProvider.getPainter(Size(20))
|
||||
|
||||
Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) {
|
||||
Icon(normal, "taskGroup")
|
||||
}
|
||||
Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) {
|
||||
Icon(badged, "taskGroup")
|
||||
}
|
||||
Box(
|
||||
Modifier.size(24.dp).background(JewelTheme.colorPalette.blue(4), shape = RoundedCornerShape(4.dp)),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Icon(stroked, "taskGroup")
|
||||
}
|
||||
Box(
|
||||
Modifier.size(24.dp).background(JewelTheme.colorPalette.blue(4), shape = RoundedCornerShape(4.dp)),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Icon(strokedAndBadged, "taskGroup")
|
||||
}
|
||||
Box(Modifier.size(24.dp), contentAlignment = Alignment.Center) {
|
||||
Icon(resized, "taskGroup")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -9,17 +9,16 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.DropdownLink
|
||||
import org.jetbrains.jewel.ui.component.ExternalLink
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Link
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.separator
|
||||
|
||||
@Composable
|
||||
@View(title = "Links", position = 4)
|
||||
fun Links() {
|
||||
GroupHeader("Links")
|
||||
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.animation.core.animateFloat
|
||||
import androidx.compose.animation.core.infiniteRepeatable
|
||||
@@ -18,16 +18,16 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.delay
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.CircularProgressIndicator
|
||||
import org.jetbrains.jewel.ui.component.CircularProgressIndicatorBig
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.HorizontalProgressBar
|
||||
import org.jetbrains.jewel.ui.component.IndeterminateHorizontalProgressBar
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
|
||||
@Composable
|
||||
@View(title = "ProgressBar", position = 5)
|
||||
fun ProgressBar() {
|
||||
GroupHeader("Progress bars")
|
||||
val transition = rememberInfiniteTransition()
|
||||
val currentOffset by transition.animateFloat(
|
||||
initialValue = 0f,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -9,13 +9,13 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.Outline
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.RadioButtonRow
|
||||
|
||||
@Composable
|
||||
@View(title = "RadioButtons", position = 2)
|
||||
fun RadioButtons() {
|
||||
GroupHeader("RadioButtons")
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -1,6 +1,6 @@
|
||||
@file:Suppress("MagicNumber")
|
||||
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
@@ -26,8 +26,8 @@ import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.NoIndication
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.TabData
|
||||
import org.jetbrains.jewel.ui.component.TabStrip
|
||||
@@ -36,8 +36,8 @@ import org.jetbrains.jewel.ui.theme.defaultTabStyle
|
||||
import kotlin.math.max
|
||||
|
||||
@Composable
|
||||
@View(title = "Tabs", position = 7)
|
||||
fun Tabs() {
|
||||
GroupHeader("Tabs")
|
||||
Text("Default tabs", Modifier.fillMaxWidth())
|
||||
DefaultTabShowcase()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -12,8 +12,8 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.Outline
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.TextArea
|
||||
|
||||
@@ -31,8 +31,8 @@ private const val LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipisc
|
||||
"Sed nec sapien nec dui rhoncus bibendum. Sed blandit bibendum libero."
|
||||
|
||||
@Composable
|
||||
@View(title = "TextAreas", position = 8)
|
||||
fun TextAreas() {
|
||||
GroupHeader("TextAreas")
|
||||
Row(
|
||||
Modifier.padding(horizontal = 16.dp).height(150.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -12,16 +12,16 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.samples.standalone.StandaloneSampleIcons
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.Outline
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.ui.component.Icon
|
||||
import org.jetbrains.jewel.ui.component.LabelledTextField
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.TextField
|
||||
|
||||
@Composable
|
||||
@View(title = "TextFields", position = 9)
|
||||
fun TextFields() {
|
||||
GroupHeader("TextFields")
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jewel.samples.standalone.components
|
||||
package org.jetbrains.jewel.samples.standalone.view.component
|
||||
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -6,13 +6,13 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.ui.component.GroupHeader
|
||||
import org.jetbrains.jewel.samples.standalone.viewmodel.View
|
||||
import org.jetbrains.jewel.ui.component.Text
|
||||
import org.jetbrains.jewel.ui.component.Tooltip
|
||||
|
||||
@Composable
|
||||
@View(title = "Tooltips", position = 10)
|
||||
fun Tooltips() {
|
||||
GroupHeader("Tooltips")
|
||||
Tooltip(tooltip = {
|
||||
Text("This is a tooltip")
|
||||
}) {
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.jetbrains.jewel.samples.standalone.viewmodel
|
||||
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.toMutableStateList
|
||||
import org.jetbrains.jewel.samples.standalone.reflection.findViews
|
||||
|
||||
object ComponentsViewModel {
|
||||
|
||||
val views = findViews("org.jetbrains.jewel.samples.standalone.view.component").toMutableStateList()
|
||||
|
||||
var currentView by mutableStateOf(views.first())
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.jetbrains.jewel.samples.standalone.viewmodel
|
||||
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.runtime.toMutableStateList
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import org.jetbrains.jewel.samples.standalone.IntUiThemes
|
||||
import org.jetbrains.jewel.samples.standalone.reflection.findViews
|
||||
|
||||
object MainViewModel {
|
||||
|
||||
var theme: IntUiThemes by mutableStateOf(IntUiThemes.Light)
|
||||
|
||||
var swingCompat: Boolean by mutableStateOf(false)
|
||||
|
||||
val projectColor
|
||||
get() = if (theme.isLightHeader()) {
|
||||
Color(0xFFF5D4C1)
|
||||
} else {
|
||||
Color(0xFF654B40)
|
||||
}
|
||||
|
||||
val views = findViews("org.jetbrains.jewel.samples.standalone.view").toMutableStateList()
|
||||
|
||||
var currentView by mutableStateOf(views.first())
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.jetbrains.jewel.samples.standalone.viewmodel
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
data class ViewInfo(
|
||||
val title: String,
|
||||
val position: Int,
|
||||
val icon: String,
|
||||
val content: @Composable () -> Unit,
|
||||
)
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION)
|
||||
annotation class View(
|
||||
val title: String,
|
||||
val position: Int = 0,
|
||||
val icon: String = "icons/stub.svg",
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.5 10.5C12.485 10.5 13.4152 10.2623 14.2356 9.84137C13.4417 12.5343 10.9502 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 5.04985 3.46572 2.55829 6.15863 1.76439C5.73766 2.58483 5.5 3.51498 5.5 4.5C5.5 7.81371 8.18629 10.5 11.5 10.5Z" fill="#EDF3FF" stroke="#3574F0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 385 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.5 10.5C12.485 10.5 13.4152 10.2623 14.2356 9.84137C13.4417 12.5343 10.9502 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 5.04985 3.46572 2.55829 6.15863 1.76439C5.73766 2.58483 5.5 3.51498 5.5 4.5C5.5 7.81371 8.18629 10.5 11.5 10.5Z" fill="#25324D" stroke="#548AF7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 385 B |
@@ -0,0 +1,19 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6654_52130)">
|
||||
<path d="M8.5 1C8.5 0.723858 8.27614 0.5 8 0.5C7.72386 0.5 7.5 0.723858 7.5 1V3.02469C7.66445 3.00836 7.83125 3 8 3C8.16875 3 8.33555 3.00836 8.5 3.02469V1Z" fill="#3574F0"/>
|
||||
<path d="M3.40381 2.6967L4.83563 4.12853C4.57708 4.34011 4.34011 4.57708 4.12853 4.83563L2.6967 3.40381C2.50144 3.20854 2.50144 2.89196 2.6967 2.6967C2.89196 2.50144 3.20854 2.50144 3.40381 2.6967Z" fill="#3574F0"/>
|
||||
<path d="M3.02469 7.5H1C0.723858 7.5 0.5 7.72386 0.5 8C0.5 8.27614 0.723858 8.5 1 8.5H3.02469C3.00836 8.33555 3 8.16875 3 8C3 7.83125 3.00836 7.66445 3.02469 7.5Z" fill="#3574F0"/>
|
||||
<path d="M2.6967 12.5962L4.12853 11.1644C4.34011 11.4229 4.57708 11.6599 4.83563 11.8715L3.40381 13.3033C3.20854 13.4986 2.89196 13.4986 2.6967 13.3033C2.50144 13.108 2.50144 12.7915 2.6967 12.5962Z" fill="#3574F0"/>
|
||||
<path d="M7.5 12.9753V15C7.5 15.2761 7.72386 15.5 8 15.5C8.27614 15.5 8.5 15.2761 8.5 15V12.9753C8.33555 12.9916 8.16875 13 8 13C7.83125 13 7.66445 12.9916 7.5 12.9753Z" fill="#3574F0"/>
|
||||
<path d="M12.5962 13.3033L11.1644 11.8715C11.4229 11.6599 11.6599 11.4229 11.8715 11.1644L13.3033 12.5962C13.4986 12.7915 13.4986 13.108 13.3033 13.3033C13.108 13.4986 12.7915 13.4986 12.5962 13.3033Z" fill="#3574F0"/>
|
||||
<path d="M12.9753 8.5H15C15.2761 8.5 15.5 8.27614 15.5 8C15.5 7.72386 15.2761 7.5 15 7.5H12.9753C12.9916 7.66445 13 7.83125 13 8C13 8.16875 12.9916 8.33555 12.9753 8.5Z" fill="#3574F0"/>
|
||||
<path d="M13.3033 3.40381L11.8715 4.83563C11.6599 4.57708 11.4229 4.34011 11.1644 4.12853L12.5962 2.6967C12.7915 2.50144 13.108 2.50144 13.3033 2.6967C13.4986 2.89196 13.4986 3.20854 13.3033 3.40381Z" fill="#3574F0"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8C12 10.2091 10.2091 12 8 12C5.79086 12 4 10.2091 4 8C4 5.79086 5.79086 4 8 4C10.2091 4 12 5.79086 12 8ZM11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z" fill="#3574F0"/>
|
||||
<circle cx="8" cy="8" r="3" fill="#EDF3FF"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6654_52130">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,19 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6654_52132)">
|
||||
<path d="M8.5 1C8.5 0.723858 8.27614 0.5 8 0.5C7.72386 0.5 7.5 0.723858 7.5 1V3.02469C7.66445 3.00836 7.83125 3 8 3C8.16875 3 8.33555 3.00836 8.5 3.02469V1Z" fill="#548AF7"/>
|
||||
<path d="M3.40381 2.6967L4.83563 4.12853C4.57708 4.34011 4.34011 4.57708 4.12853 4.83563L2.6967 3.40381C2.50144 3.20854 2.50144 2.89196 2.6967 2.6967C2.89196 2.50144 3.20854 2.50144 3.40381 2.6967Z" fill="#548AF7"/>
|
||||
<path d="M3.02469 7.5H1C0.723858 7.5 0.5 7.72386 0.5 8C0.5 8.27614 0.723858 8.5 1 8.5H3.02469C3.00836 8.33555 3 8.16875 3 8C3 7.83125 3.00836 7.66445 3.02469 7.5Z" fill="#548AF7"/>
|
||||
<path d="M2.6967 12.5962L4.12853 11.1644C4.34011 11.4229 4.57708 11.6599 4.83563 11.8715L3.40381 13.3033C3.20854 13.4986 2.89196 13.4986 2.6967 13.3033C2.50144 13.108 2.50144 12.7915 2.6967 12.5962Z" fill="#548AF7"/>
|
||||
<path d="M7.5 12.9753V15C7.5 15.2761 7.72386 15.5 8 15.5C8.27614 15.5 8.5 15.2761 8.5 15V12.9753C8.33555 12.9916 8.16875 13 8 13C7.83125 13 7.66445 12.9916 7.5 12.9753Z" fill="#548AF7"/>
|
||||
<path d="M12.5962 13.3033L11.1644 11.8715C11.4229 11.6599 11.6599 11.4229 11.8715 11.1644L13.3033 12.5962C13.4986 12.7915 13.4986 13.108 13.3033 13.3033C13.108 13.4986 12.7915 13.4986 12.5962 13.3033Z" fill="#548AF7"/>
|
||||
<path d="M12.9753 8.5H15C15.2761 8.5 15.5 8.27614 15.5 8C15.5 7.72386 15.2761 7.5 15 7.5H12.9753C12.9916 7.66445 13 7.83125 13 8C13 8.16875 12.9916 8.33555 12.9753 8.5Z" fill="#548AF7"/>
|
||||
<path d="M13.3033 3.40381L11.8715 4.83563C11.6599 4.57708 11.4229 4.34011 11.1644 4.12853L12.5962 2.6967C12.7915 2.50144 13.108 2.50144 13.3033 2.6967C13.4986 2.89196 13.4986 3.20854 13.3033 3.40381Z" fill="#548AF7"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8C12 10.2091 10.2091 12 8 12C5.79086 12 4 10.2091 4 8C4 5.79086 5.79086 4 8 4C10.2091 4 12 5.79086 12 8ZM11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z" fill="#548AF7"/>
|
||||
<circle cx="8" cy="8" r="3" fill="#25324D"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6654_52132">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,11 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="1.75" r="0.75" fill="#6C707E"/>
|
||||
<circle cx="8" cy="14.25" r="0.75" fill="#6C707E"/>
|
||||
<circle cx="14.25" cy="8" r="0.75" transform="rotate(90 14.25 8)" fill="#6C707E"/>
|
||||
<circle cx="1.75" cy="8" r="0.75" transform="rotate(90 1.75 8)" fill="#6C707E"/>
|
||||
<circle cx="12.4189" cy="3.58056" r="0.75" transform="rotate(45 12.4189 3.58056)" fill="#6C707E"/>
|
||||
<circle cx="3.58105" cy="12.4194" r="0.75" transform="rotate(45 3.58105 12.4194)" fill="#6C707E"/>
|
||||
<circle cx="12.4198" cy="12.4194" r="0.75" transform="rotate(135 12.4198 12.4194)" fill="#6C707E"/>
|
||||
<circle cx="3.58094" cy="3.58057" r="0.75" transform="rotate(135 3.58094 3.58057)" fill="#6C707E"/>
|
||||
<circle cx="8" cy="8" r="4" stroke="#6C707E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 851 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="10" cy="18" r="1" fill="#6C707E"/>
|
||||
<circle cx="10" cy="2" r="1" fill="#6C707E"/>
|
||||
<circle cx="2" cy="10" r="1" transform="rotate(90 2 10)" fill="#6C707E"/>
|
||||
<circle cx="18" cy="10" r="1" transform="rotate(90 18 10)" fill="#6C707E"/>
|
||||
<circle cx="4.34277" cy="15.6568" r="1" transform="rotate(45 4.34277 15.6568)" fill="#6C707E"/>
|
||||
<circle cx="15.6572" cy="4.34317" r="1" transform="rotate(45 15.6572 4.34317)" fill="#6C707E"/>
|
||||
<circle cx="4.3436" cy="4.34314" r="1" transform="rotate(135 4.3436 4.34314)" fill="#6C707E"/>
|
||||
<circle cx="15.6571" cy="15.6569" r="1" transform="rotate(135 15.6571 15.6569)" fill="#6C707E"/>
|
||||
<circle cx="10" cy="10" r="4.75" stroke="#6C707E" stroke-width="1.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 837 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="10" cy="18" r="1" fill="#CED0D6"/>
|
||||
<circle cx="10" cy="2" r="1" fill="#CED0D6"/>
|
||||
<circle cx="2" cy="10" r="1" transform="rotate(90 2 10)" fill="#CED0D6"/>
|
||||
<circle cx="18" cy="10" r="1" transform="rotate(90 18 10)" fill="#CED0D6"/>
|
||||
<circle cx="4.34277" cy="15.6568" r="1" transform="rotate(45 4.34277 15.6568)" fill="#CED0D6"/>
|
||||
<circle cx="15.6572" cy="4.34317" r="1" transform="rotate(45 15.6572 4.34317)" fill="#CED0D6"/>
|
||||
<circle cx="4.3436" cy="4.34314" r="1" transform="rotate(135 4.3436 4.34314)" fill="#CED0D6"/>
|
||||
<circle cx="15.6571" cy="15.6569" r="1" transform="rotate(135 15.6571 15.6569)" fill="#CED0D6"/>
|
||||
<circle cx="10" cy="10" r="4.75" stroke="#CED0D6" stroke-width="1.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 837 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="1.75" r="0.75" fill="#3574F0"/>
|
||||
<circle cx="8" cy="14.25" r="0.75" fill="#3574F0"/>
|
||||
<circle cx="14.25" cy="8" r="0.75" transform="rotate(90 14.25 8)" fill="#3574F0"/>
|
||||
<circle cx="1.75" cy="8" r="0.75" transform="rotate(90 1.75 8)" fill="#3574F0"/>
|
||||
<circle cx="12.4189" cy="3.58056" r="0.75" transform="rotate(45 12.4189 3.58056)" fill="#3574F0"/>
|
||||
<circle cx="3.58105" cy="12.4194" r="0.75" transform="rotate(45 3.58105 12.4194)" fill="#3574F0"/>
|
||||
<circle cx="12.4198" cy="12.4194" r="0.75" transform="rotate(135 12.4198 12.4194)" fill="#3574F0"/>
|
||||
<circle cx="3.58094" cy="3.58057" r="0.75" transform="rotate(135 3.58094 3.58057)" fill="#3574F0"/>
|
||||
<circle cx="8" cy="8" r="4" stroke="#3574F0" fill="#EDF3FF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 866 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="1.75" r="0.75" fill="#548AF7"/>
|
||||
<circle cx="8" cy="14.25" r="0.75" fill="#548AF7"/>
|
||||
<circle cx="14.25" cy="8" r="0.75" transform="rotate(90 14.25 8)" fill="#548AF7"/>
|
||||
<circle cx="1.75" cy="8" r="0.75" transform="rotate(90 1.75 8)" fill="#548AF7"/>
|
||||
<circle cx="12.4189" cy="3.58056" r="0.75" transform="rotate(45 12.4189 3.58056)" fill="#548AF7"/>
|
||||
<circle cx="3.58105" cy="12.4194" r="0.75" transform="rotate(45 3.58105 12.4194)" fill="#548AF7"/>
|
||||
<circle cx="12.4198" cy="12.4194" r="0.75" transform="rotate(135 12.4198 12.4194)" fill="#548AF7"/>
|
||||
<circle cx="3.58094" cy="3.58057" r="0.75" transform="rotate(135 3.58094 3.58057)" fill="#548AF7"/>
|
||||
<circle cx="8" cy="8" r="4" stroke="#548AF7" fill="#25324D"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 866 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="1.75" r="0.75" fill="#CED0D6"/>
|
||||
<circle cx="8" cy="14.25" r="0.75" fill="#CED0D6"/>
|
||||
<circle cx="14.25" cy="8" r="0.75" transform="rotate(90 14.25 8)" fill="#CED0D6"/>
|
||||
<circle cx="1.75" cy="8" r="0.75" transform="rotate(90 1.75 8)" fill="#CED0D6"/>
|
||||
<circle cx="12.4189" cy="3.58056" r="0.75" transform="rotate(45 12.4189 3.58056)" fill="#CED0D6"/>
|
||||
<circle cx="3.58105" cy="12.4194" r="0.75" transform="rotate(45 3.58105 12.4194)" fill="#CED0D6"/>
|
||||
<circle cx="12.4198" cy="12.4194" r="0.75" transform="rotate(135 12.4198 12.4194)" fill="#CED0D6"/>
|
||||
<circle cx="3.58094" cy="3.58057" r="0.75" transform="rotate(135 3.58094 3.58057)" fill="#CED0D6"/>
|
||||
<circle cx="8" cy="8" r="4" stroke="#CED0D6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 851 B |
@@ -0,0 +1,12 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7112_52123)">
|
||||
<path d="M5.34572 10.6421C4.36415 9.66813 3.11176 8.992 1.52169 8.49999C3.11175 8.00799 4.36414 7.33186 5.3457 6.35788C6.32825 5.38293 7.00722 4.14149 7.50026 2.57044C7.99332 4.14149 8.67231 5.38293 9.65486 6.35788C10.6364 7.33187 11.8888 8.00799 13.4789 8.5C11.8888 8.99201 10.6364 9.66814 9.65485 10.6421C8.67231 11.6171 7.99335 12.8585 7.50031 14.4295C7.00725 12.8585 6.32827 11.6171 5.34572 10.6421Z" stroke="#6C707E"/>
|
||||
<path d="M12.9935 4.90712C14.0454 4.90712 14.8981 4.05439 14.8981 3.00251C14.8981 1.95062 14.0454 1.0979 12.9935 1.0979C11.9416 1.0979 11.0889 1.95062 11.0889 3.00251C11.0889 4.05439 11.9416 4.90712 12.9935 4.90712Z" fill="#6C707E"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7112_52123">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,17 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7109_52078)">
|
||||
<g clip-path="url(#clip1_7109_52078)">
|
||||
<path d="M6.76993 8.03602C7.9384 6.87658 8.765 5.42306 9.37509 3.61672C9.98519 5.42307 10.8118 6.87658 11.9803 8.03602C13.1472 9.19393 14.6128 10.0165 16.4395 10.6249C14.6128 11.2334 13.1472 12.0559 11.9803 13.2139C10.8118 14.3733 9.98522 15.8268 9.37514 17.6331C8.76504 15.8268 7.93842 14.3733 6.76996 13.2139C5.60303 12.0559 4.13748 11.2334 2.31077 10.6249C4.13747 10.0165 5.60301 9.19393 6.76993 8.03602Z" stroke="#6C707E" stroke-width="1.5"/>
|
||||
<path d="M16.2411 6.13383C17.556 6.13383 18.6219 5.06793 18.6219 3.75307C18.6219 2.43822 17.556 1.37231 16.2411 1.37231C14.9263 1.37231 13.8604 2.43822 13.8604 3.75307C13.8604 5.06793 14.9263 6.13383 16.2411 6.13383Z" fill="#6C707E"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7109_52078">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_7109_52078">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,17 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7109_52086)">
|
||||
<g clip-path="url(#clip1_7109_52086)">
|
||||
<path d="M6.76993 8.03602C7.9384 6.87658 8.765 5.42306 9.37509 3.61672C9.98519 5.42307 10.8118 6.87658 11.9803 8.03602C13.1472 9.19393 14.6128 10.0165 16.4395 10.6249C14.6128 11.2334 13.1472 12.0559 11.9803 13.2139C10.8118 14.3733 9.98522 15.8268 9.37514 17.6331C8.76504 15.8268 7.93842 14.3733 6.76996 13.2139C5.60303 12.0559 4.13748 11.2334 2.31077 10.6249C4.13747 10.0165 5.60301 9.19393 6.76993 8.03602Z" stroke="#CED0D6" stroke-width="1.5"/>
|
||||
<path d="M16.2411 6.13383C17.556 6.13383 18.6219 5.06793 18.6219 3.75307C18.6219 2.43822 17.556 1.37231 16.2411 1.37231C14.9263 1.37231 13.8604 2.43822 13.8604 3.75307C13.8604 5.06793 14.9263 6.13383 16.2411 6.13383Z" fill="#CED0D6"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7109_52086">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_7109_52086">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,12 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7112_52127)">
|
||||
<path d="M5.34572 10.6421C4.36415 9.66813 3.11176 8.992 1.52169 8.49999C3.11175 8.00799 4.36414 7.33186 5.3457 6.35788C6.32825 5.38293 7.00722 4.14149 7.50026 2.57044C7.99332 4.14149 8.67231 5.38293 9.65486 6.35788C10.6364 7.33187 11.8888 8.00799 13.4789 8.5C11.8888 8.99201 10.6364 9.66814 9.65485 10.6421C8.67231 11.6171 7.99335 12.8585 7.50031 14.4295C7.00725 12.8585 6.32827 11.6171 5.34572 10.6421Z" stroke="#CED0D6"/>
|
||||
<path d="M12.9935 4.90712C14.0454 4.90712 14.8981 4.05439 14.8981 3.00251C14.8981 1.95062 14.0454 1.0979 12.9935 1.0979C11.9416 1.0979 11.0889 1.95062 11.0889 3.00251C11.0889 4.05439 11.9416 4.90712 12.9935 4.90712Z" fill="#CED0D6"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7112_52127">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,8 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="5" height="5" x="9" y="10" fill="#6E6E6E"/>
|
||||
<polygon fill="#59A869" points="10 1 15.5 5 10 9"/>
|
||||
<path fill="#59A869" d="M8,15 L7.5,15 C4.46243388,15 2,12.5375661 2,9.5 C2,6.46243388 4.46243388,4 7.5,4 L11,4 L11,6 L7.5,6 C5.56700338,6 4,7.56700338 4,9.5 C4,11.4329966 5.56700338,13 7.5,13 L8,13 L8,15 Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 631 B |
@@ -0,0 +1,8 @@
|
||||
<!-- Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="5" height="5" x="9" y="10" fill="#AFB1B3"/>
|
||||
<polygon fill="#499C54" points="10 1 15.5 5 10 9"/>
|
||||
<path fill="#499C54" d="M8,15 L7.5,15 C4.46243388,15 2,12.5375661 2,9.5 C2,6.46243388 4.46243388,4 7.5,4 L11,4 L11,6 L7.5,6 C5.56700338,6 4,7.56700338 4,9.5 C4,11.4329966 5.56700338,13 7.5,13 L8,13 L8,15 Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 631 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.5" y="2.5" width="4.5" height="4.5" rx="1" stroke="#6C707E"/>
|
||||
<rect x="2.5" y="9" width="4.5" height="4.5" rx="1" stroke="#6C707E"/>
|
||||
<rect x="9" y="9" width="4.5" height="4.5" rx="1" stroke="#6C707E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 443 B |
@@ -0,0 +1,4 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V7.25C3.5 7.52614 3.72386 7.75 4 7.75H7.25C7.52614 7.75 7.75 7.52614 7.75 7.25V4C7.75 3.72386 7.52614 3.5 7.25 3.5ZM4 2C2.89543 2 2 2.89543 2 4V7.25C2 8.35457 2.89543 9.25 4 9.25H7.25C8.35457 9.25 9.25 8.35457 9.25 7.25V4C9.25 2.89543 8.35457 2 7.25 2H4ZM7.25 12.25H4C3.72386 12.25 3.5 12.4739 3.5 12.75V16C3.5 16.2761 3.72386 16.5 4 16.5H7.25C7.52614 16.5 7.75 16.2761 7.75 16V12.75C7.75 12.4739 7.52614 12.25 7.25 12.25ZM4 10.75C2.89543 10.75 2 11.6454 2 12.75V16C2 17.1046 2.89543 18 4 18H7.25C8.35457 18 9.25 17.1046 9.25 16V12.75C9.25 11.6454 8.35457 10.75 7.25 10.75H4ZM12.75 12.25H16C16.2761 12.25 16.5 12.4739 16.5 12.75V16C16.5 16.2761 16.2761 16.5 16 16.5H12.75C12.4739 16.5 12.25 16.2761 12.25 16V12.75C12.25 12.4739 12.4739 12.25 12.75 12.25ZM10.75 12.75C10.75 11.6454 11.6454 10.75 12.75 10.75H16C17.1046 10.75 18 11.6454 18 12.75V16C18 17.1046 17.1046 18 16 18H12.75C11.6454 18 10.75 17.1046 10.75 16V12.75Z" fill="#6C707E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V7.25C3.5 7.52614 3.72386 7.75 4 7.75H7.25C7.52614 7.75 7.75 7.52614 7.75 7.25V4C7.75 3.72386 7.52614 3.5 7.25 3.5ZM4 2C2.89543 2 2 2.89543 2 4V7.25C2 8.35457 2.89543 9.25 4 9.25H7.25C8.35457 9.25 9.25 8.35457 9.25 7.25V4C9.25 2.89543 8.35457 2 7.25 2H4ZM7.25 12.25H4C3.72386 12.25 3.5 12.4739 3.5 12.75V16C3.5 16.2761 3.72386 16.5 4 16.5H7.25C7.52614 16.5 7.75 16.2761 7.75 16V12.75C7.75 12.4739 7.52614 12.25 7.25 12.25ZM4 10.75C2.89543 10.75 2 11.6454 2 12.75V16C2 17.1046 2.89543 18 4 18H7.25C8.35457 18 9.25 17.1046 9.25 16V12.75C9.25 11.6454 8.35457 10.75 7.25 10.75H4ZM12.75 12.25H16C16.2761 12.25 16.5 12.4739 16.5 12.75V16C16.5 16.2761 16.2761 16.5 16 16.5H12.75C12.4739 16.5 12.25 16.2761 12.25 16V12.75C12.25 12.4739 12.4739 12.25 12.75 12.25ZM10.75 12.75C10.75 11.6454 11.6454 10.75 12.75 10.75H16C17.1046 10.75 18 11.6454 18 12.75V16C18 17.1046 17.1046 18 16 18H12.75C11.6454 18 10.75 17.1046 10.75 16V12.75Z" fill="#CED0D6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.5" y="2.5" width="4.5" height="4.5" rx="1" stroke="#CED0D6"/>
|
||||
<rect x="2.5" y="9" width="4.5" height="4.5" rx="1" stroke="#CED0D6"/>
|
||||
<rect x="9" y="9" width="4.5" height="4.5" rx="1" stroke="#CED0D6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 443 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.5" y="2.5" width="11" height="11" rx="1.5" stroke="#6C707E"/>
|
||||
<path d="M3 3L13 13" stroke="#6C707E"/>
|
||||
<path d="M3 13L13 3" stroke="#6C707E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 383 B |
@@ -0,0 +1,5 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.75" y="2.75" width="14.5" height="14.5" rx="1.25" stroke="#6C707E" stroke-width="1.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.4591 2.39845L2.39844 3.45911L8.93922 9.99989L2.39832 16.5408L3.45898 17.6014L9.99988 11.0605L16.5406 17.6012L17.6012 16.5406L11.0605 9.99989L17.6011 3.4593L16.5405 2.39864L9.99988 8.93923L3.4591 2.39845Z" fill="#6C707E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 603 B |
@@ -0,0 +1,5 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.75" y="2.75" width="14.5" height="14.5" rx="1.25" stroke="#CED0D6" stroke-width="1.5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.45898 2.39845L2.39832 3.45911L8.9391 9.99989L2.3982 16.5408L3.45886 17.6014L9.99976 11.0605L16.5405 17.6012L17.6011 16.5406L11.0604 9.99989L17.601 3.4593L16.5403 2.39864L9.99976 8.93923L3.45898 2.39845Z" fill="#CED0D6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 602 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.5" y="2.5" width="11" height="11" rx="1.5" stroke="#CED0D6"/>
|
||||
<path d="M3 3L13 13" stroke="#CED0D6"/>
|
||||
<path d="M3 13L13 3" stroke="#CED0D6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 383 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 8C1.5 11.5899 4.41015 14.5 8 14.5V1.5C4.41015 1.5 1.5 4.41015 1.5 8Z" fill="#EBECF0"/>
|
||||
<path d="M8 2V14" stroke="#6C707E"/>
|
||||
<circle cx="8" cy="8" r="6.5" stroke="#6C707E"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@@ -0,0 +1,5 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 10C2 14.4183 5.58172 18 10 18V2C5.58172 2 2 5.58172 2 10Z" fill="#EBECF0"/>
|
||||
<path d="M10 2V18" stroke="#6C707E" stroke-width="1.5"/>
|
||||
<circle cx="10" cy="10" r="8.25" stroke="#6C707E" stroke-width="1.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 319 B |
@@ -0,0 +1,5 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 10C2 14.4183 5.58172 18 10 18V2C5.58172 2 2 5.58172 2 10Z" fill="#43454A"/>
|
||||
<path d="M10 2V18" stroke="#CED0D6" stroke-width="1.5"/>
|
||||
<circle cx="10" cy="10" r="8.25" stroke="#CED0D6" stroke-width="1.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 319 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 8C1.5 11.5899 4.41015 14.5 8 14.5V1.5C4.41015 1.5 1.5 4.41015 1.5 8Z" fill="#EDF3FF"/>
|
||||
<path d="M8 2V14" stroke="#3574F0"/>
|
||||
<circle cx="8" cy="8" r="6.5" stroke="#3574F0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 8C1.5 11.5899 4.41015 14.5 8 14.5V1.5C4.41015 1.5 1.5 4.41015 1.5 8Z" fill="#25324D"/>
|
||||
<path d="M8 2V14" stroke="#548AF7"/>
|
||||
<circle cx="8" cy="8" r="6.5" stroke="#548AF7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@@ -0,0 +1,6 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 8C1.5 11.5899 4.41015 14.5 8 14.5V1.5C4.41015 1.5 1.5 4.41015 1.5 8Z" fill="#43454A"/>
|
||||
<path d="M8 2V14" stroke="#CED0D6"/>
|
||||
<circle cx="8" cy="8" r="6.5" stroke="#CED0D6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@@ -0,0 +1,8 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 3.86667C1 2.83574 1.7835 2 2.75 2H6.03823C6.29871 2 6.5489 2.10163 6.73559 2.28327L8.5 4L13 4C14.1046 4 15 4.89543 15 6V7.38947C14.1372 6.82692 13.1068 6.5 12 6.5C8.96243 6.5 6.5 8.96243 6.5 12C6.5 12.7056 6.63286 13.3801 6.87494 14H2.75C1.7835 14 1 13.1643 1 12.1333V3.86667Z" fill="#EBECF0"/>
|
||||
<path d="M6.03823 3L8.09379 5H13C13.5523 5 14 5.44772 14 6V6.87494C14.3525 7.01259 14.6872 7.18555 15 7.38947V6C15 4.89543 14.1046 4 13 4L8.5 4L6.73559 2.28327C6.5489 2.10163 6.29871 2 6.03823 2H2.75C1.7835 2 1 2.83574 1 3.86667V12.1333C1 13.1643 1.7835 14 2.75 14H6.87494C6.75003 13.6801 6.65419 13.3457 6.59069 13H2.75C2.3956 13 2 12.6738 2 12.1333V3.86667C2 3.32624 2.3956 3 2.75 3H6.03823Z" fill="#6C707E"/>
|
||||
<path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" fill="#3574F0"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1216 15.6756C13.0484 15.8707 12.8619 16 12.6534 16H11.3464C11.138 16 10.9515 15.8707 10.8783 15.6756L10.6288 15.0102C10.5449 14.7865 10.3143 14.6534 10.0786 14.6926L9.37765 14.8092C9.17206 14.8434 8.96681 14.7464 8.8626 14.5659L8.2091 13.4341C8.10489 13.2536 8.12357 13.0273 8.25599 12.8664L8.70742 12.3177C8.85925 12.1331 8.85925 11.8669 8.70742 11.6824L8.25597 11.1336C8.12355 10.9727 8.10487 10.7464 8.20908 10.5659L8.86258 9.43405C8.96679 9.25355 9.17204 9.15663 9.37763 9.19083L10.0786 9.30742C10.3143 9.34664 10.5449 9.21353 10.6288 8.98976L10.8783 8.32444C10.9515 8.12929 11.138 8 11.3464 8H12.6534C12.8619 8 13.0484 8.12929 13.1216 8.32444L13.3711 8.98976C13.455 9.21353 13.6856 9.34664 13.9213 9.30742L14.6222 9.19083C14.8278 9.15663 15.0331 9.25355 15.1373 9.43405L15.7908 10.5659C15.895 10.7464 15.8763 10.9727 15.7439 11.1336L15.2925 11.6824C15.1406 11.8669 15.1406 12.1331 15.2925 12.3177L15.7439 12.8664C15.8763 13.0273 15.895 13.2536 15.7908 13.4341L15.1373 14.5659C15.0331 14.7464 14.8278 14.8434 14.6222 14.8092L13.9213 14.6926C13.6856 14.6534 13.455 14.7865 13.3711 15.0102L13.1216 15.6756ZM11.6929 15H12.3069L12.4348 14.6591C12.6865 13.9878 13.3781 13.5885 14.0854 13.7061L14.4445 13.7659L14.7515 13.2341L14.5202 12.953C14.0647 12.3993 14.0647 11.6007 14.5202 11.047L14.7515 10.7659L14.4445 10.2341L14.0854 10.2939C13.3781 10.4115 12.6865 10.0122 12.4348 9.34088L12.3069 9H11.6929L11.5651 9.34088C11.3134 10.0122 10.6217 10.4115 9.91449 10.2939L9.55536 10.2341L9.24836 10.7659L9.47966 11.047C9.93517 11.6007 9.93517 12.3993 9.47966 12.953L9.24838 13.2341L9.55538 13.7659L9.91449 13.7061C10.6217 13.5885 11.3134 13.9878 11.5651 14.6591L11.6929 15Z" fill="#3574F0"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.3069 15H11.6929L11.5651 14.6591C11.3134 13.9878 10.6217 13.5885 9.91449 13.7061L9.55537 13.7659L9.24837 13.2341L9.47966 12.953C9.93517 12.3993 9.93517 11.6007 9.47966 11.047L9.24835 10.7659L9.55535 10.2341L9.91449 10.2939C10.6217 10.4115 11.3134 10.0122 11.5651 9.34088L11.6929 9H12.3069L12.4348 9.34088C12.6865 10.0122 13.3781 10.4115 14.0854 10.2939L14.4445 10.2341L14.7515 10.7659L14.5202 11.047C14.0647 11.6007 14.0647 12.3993 14.5202 12.953L14.7515 13.2341L14.4445 13.7659L14.0854 13.7061C13.3781 13.5885 12.6865 13.9878 12.4348 14.6591L12.3069 15ZM13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z" fill="#E7EFFD"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,8 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 3.86667C1 2.83574 1.7835 2 2.75 2H6.03823C6.29871 2 6.5489 2.10163 6.73559 2.28327L8.5 4L13 4C14.1046 4 15 4.89543 15 6V7.38947C14.1372 6.82692 13.1068 6.5 12 6.5C8.96243 6.5 6.5 8.96243 6.5 12C6.5 12.7056 6.63286 13.3801 6.87494 14H2.75C1.7835 14 1 13.1643 1 12.1333V3.86667Z" fill="#43454A"/>
|
||||
<path d="M6.03823 3L8.09379 5H13C13.5523 5 14 5.44772 14 6V6.87494C14.3525 7.01259 14.6872 7.18555 15 7.38947V6C15 4.89543 14.1046 4 13 4L8.5 4L6.73559 2.28327C6.5489 2.10163 6.29871 2 6.03823 2H2.75C1.7835 2 1 2.83574 1 3.86667V12.1333C1 13.1643 1.7835 14 2.75 14H6.87494C6.75003 13.6801 6.65419 13.3457 6.59069 13H2.75C2.3956 13 2 12.6738 2 12.1333V3.86667C2 3.32624 2.3956 3 2.75 3H6.03823Z" fill="#CED0D6"/>
|
||||
<path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" fill="#548AF7"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1216 15.6756C13.0484 15.8707 12.8619 16 12.6534 16H11.3464C11.138 16 10.9515 15.8707 10.8783 15.6756L10.6288 15.0102C10.5449 14.7865 10.3143 14.6534 10.0786 14.6926L9.37765 14.8092C9.17206 14.8434 8.96681 14.7464 8.8626 14.5659L8.2091 13.4341C8.10489 13.2536 8.12357 13.0273 8.25599 12.8664L8.70742 12.3177C8.85925 12.1331 8.85925 11.8669 8.70742 11.6824L8.25597 11.1336C8.12355 10.9727 8.10487 10.7464 8.20908 10.5659L8.86258 9.43405C8.96679 9.25355 9.17204 9.15663 9.37763 9.19083L10.0786 9.30742C10.3143 9.34664 10.5449 9.21353 10.6288 8.98976L10.8783 8.32444C10.9515 8.12929 11.138 8 11.3464 8H12.6534C12.8619 8 13.0484 8.12929 13.1216 8.32444L13.3711 8.98976C13.455 9.21353 13.6856 9.34664 13.9213 9.30742L14.6222 9.19083C14.8278 9.15663 15.0331 9.25355 15.1373 9.43405L15.7908 10.5659C15.895 10.7464 15.8763 10.9727 15.7439 11.1336L15.2925 11.6824C15.1406 11.8669 15.1406 12.1331 15.2925 12.3177L15.7439 12.8664C15.8763 13.0273 15.895 13.2536 15.7908 13.4341L15.1373 14.5659C15.0331 14.7464 14.8278 14.8434 14.6222 14.8092L13.9213 14.6926C13.6856 14.6534 13.455 14.7865 13.3711 15.0102L13.1216 15.6756ZM11.6929 15H12.3069L12.4348 14.6591C12.6865 13.9878 13.3781 13.5885 14.0854 13.7061L14.4445 13.7659L14.7515 13.2341L14.5202 12.953C14.0647 12.3993 14.0647 11.6007 14.5202 11.047L14.7515 10.7659L14.4445 10.2341L14.0854 10.2939C13.3781 10.4115 12.6865 10.0122 12.4348 9.34088L12.3069 9H11.6929L11.5651 9.34088C11.3134 10.0122 10.6217 10.4115 9.91449 10.2939L9.55536 10.2341L9.24836 10.7659L9.47966 11.047C9.93517 11.6007 9.93517 12.3993 9.47966 12.953L9.24838 13.2341L9.55538 13.7659L9.91449 13.7061C10.6217 13.5885 11.3134 13.9878 11.5651 14.6591L11.6929 15Z" fill="#548AF7"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.3069 15H11.6929L11.5651 14.6591C11.3134 13.9878 10.6217 13.5885 9.91449 13.7061L9.55537 13.7659L9.24837 13.2341L9.47966 12.953C9.93517 12.3993 9.93517 11.6007 9.47966 11.047L9.24835 10.7659L9.55535 10.2341L9.91449 10.2939C10.6217 10.4115 11.3134 10.0122 11.5651 9.34088L11.6929 9H12.3069L12.4348 9.34088C12.6865 10.0122 13.3781 10.4115 14.0854 10.2939L14.4445 10.2341L14.7515 10.7659L14.5202 11.047C14.0647 11.6007 14.0647 12.3993 14.5202 12.953L14.7515 13.2341L14.4445 13.7659L14.0854 13.7061C13.3781 13.5885 12.6865 13.9878 12.4348 14.6591L12.3069 15ZM13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z" fill="#25324D"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 200 KiB |
@@ -1,4 +1,29 @@
|
||||
public final class org/jetbrains/jewel/ui/ComponentStyling {
|
||||
public abstract interface class org/jetbrains/jewel/ui/ComponentStyling {
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/ComponentStyling$Companion;
|
||||
public abstract fun provide (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public abstract fun provide ([Landroidx/compose/runtime/ProvidedValue;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public abstract fun styles (Landroidx/compose/runtime/Composer;I)[Landroidx/compose/runtime/ProvidedValue;
|
||||
public abstract fun with (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public abstract fun with (Lorg/jetbrains/jewel/ui/ComponentStyling;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/ComponentStyling$Companion : org/jetbrains/jewel/ui/ComponentStyling {
|
||||
public fun provide (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public fun provide ([Landroidx/compose/runtime/ProvidedValue;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public fun styles (Landroidx/compose/runtime/Composer;I)[Landroidx/compose/runtime/ProvidedValue;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public fun with (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public fun with (Lorg/jetbrains/jewel/ui/ComponentStyling;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/ComponentStyling$DefaultImpls {
|
||||
public static fun provide (Lorg/jetbrains/jewel/ui/ComponentStyling;Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static fun provide (Lorg/jetbrains/jewel/ui/ComponentStyling;[Landroidx/compose/runtime/ProvidedValue;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static fun with (Lorg/jetbrains/jewel/ui/ComponentStyling;Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public static fun with (Lorg/jetbrains/jewel/ui/ComponentStyling;Lorg/jetbrains/jewel/ui/ComponentStyling;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/DefaultComponentStyling : org/jetbrains/jewel/ui/ComponentStyling {
|
||||
public static final field $stable I
|
||||
public fun <init> (Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/DividerStyle;Lorg/jetbrains/jewel/ui/component/styling/TabStyle;Lorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Lorg/jetbrains/jewel/ui/component/styling/HorizontalProgressBarStyle;Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/LabelledTextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/LazyTreeStyle;Lorg/jetbrains/jewel/ui/component/styling/LinkStyle;Lorg/jetbrains/jewel/ui/component/styling/MenuStyle;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/ScrollbarStyle;Lorg/jetbrains/jewel/ui/component/styling/TextAreaStyle;Lorg/jetbrains/jewel/ui/component/styling/TextFieldStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;)V
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
@@ -25,8 +50,12 @@ public final class org/jetbrains/jewel/ui/ComponentStyling {
|
||||
public final fun getTooltipStyle ()Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;
|
||||
public final fun getUndecoratedDropdownStyle ()Lorg/jetbrains/jewel/ui/component/styling/DropdownStyle;
|
||||
public fun hashCode ()I
|
||||
public final fun providedStyles (Landroidx/compose/runtime/Composer;I)[Landroidx/compose/runtime/ProvidedValue;
|
||||
public fun provide (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public fun provide ([Landroidx/compose/runtime/ProvidedValue;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public fun styles (Landroidx/compose/runtime/Composer;I)[Landroidx/compose/runtime/ProvidedValue;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public fun with (Lkotlin/jvm/functions/Function2;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
public fun with (Lorg/jetbrains/jewel/ui/ComponentStyling;)Lorg/jetbrains/jewel/ui/ComponentStyling;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/DisabledColorFilterKt {
|
||||
@@ -112,7 +141,7 @@ public final class org/jetbrains/jewel/ui/component/CheckboxKt {
|
||||
public static final fun TriStateCheckboxRow (Ljava/lang/String;Landroidx/compose/ui/state/ToggleableState;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZLorg/jetbrains/jewel/ui/Outline;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lorg/jetbrains/jewel/ui/component/styling/CheckboxColors;Lorg/jetbrains/jewel/ui/component/styling/CheckboxMetrics;Lorg/jetbrains/jewel/ui/component/styling/CheckboxIcons;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;III)V
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/CheckboxState : org/jetbrains/jewel/foundation/state/ToggleableComponentState {
|
||||
public final class org/jetbrains/jewel/ui/component/CheckboxState : org/jetbrains/jewel/foundation/state/FocusableComponentState, org/jetbrains/jewel/foundation/state/ToggleableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/CheckboxState$Companion;
|
||||
public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/ui/component/CheckboxState;
|
||||
public fun chooseValue (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
@@ -268,6 +297,43 @@ public final class org/jetbrains/jewel/ui/component/GroupHeaderKt {
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/IconButtonKt {
|
||||
public static final fun IconButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun SelectableIconButton (ZLkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/IconButtonState : org/jetbrains/jewel/foundation/state/FocusableComponentState, org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/IconButtonState$Companion;
|
||||
public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/ui/component/IconButtonState;
|
||||
public fun chooseValue (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
public static fun chooseValue-impl (JLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
public static fun constructor-impl (J)J
|
||||
public static final fun copy-iT7zR20 (JZZZZZZ)J
|
||||
public static synthetic fun copy-iT7zR20$default (JZZZZZZILjava/lang/Object;)J
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (JLjava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (JJ)Z
|
||||
public final fun getState-s-VKNKU ()J
|
||||
public fun hashCode ()I
|
||||
public static fun hashCode-impl (J)I
|
||||
public fun isActive ()Z
|
||||
public static fun isActive-impl (J)Z
|
||||
public fun isEnabled ()Z
|
||||
public static fun isEnabled-impl (J)Z
|
||||
public fun isFocused ()Z
|
||||
public static fun isFocused-impl (J)Z
|
||||
public fun isHovered ()Z
|
||||
public static fun isHovered-impl (J)Z
|
||||
public fun isPressed ()Z
|
||||
public static fun isPressed-impl (J)Z
|
||||
public fun isSelected ()Z
|
||||
public static fun isSelected-impl (J)Z
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public static fun toString-impl (J)Ljava/lang/String;
|
||||
public final synthetic fun unbox-impl ()J
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/IconButtonState$Companion {
|
||||
public final fun of-iT7zR20 (ZZZZZZ)J
|
||||
public static synthetic fun of-iT7zR20$default (Lorg/jetbrains/jewel/ui/component/IconButtonState$Companion;ZZZZZZILjava/lang/Object;)J
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/IconKt {
|
||||
@@ -370,7 +436,7 @@ public final class org/jetbrains/jewel/ui/component/LinkState$Companion {
|
||||
public static synthetic fun of-oSacjZw$default (Lorg/jetbrains/jewel/ui/component/LinkState$Companion;ZZZZZZILjava/lang/Object;)J
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/MenuItemState : org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public final class org/jetbrains/jewel/ui/component/MenuItemState : org/jetbrains/jewel/foundation/state/FocusableComponentState, org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/MenuItemState$Companion;
|
||||
public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/ui/component/MenuItemState;
|
||||
public fun chooseValue (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
@@ -449,7 +515,7 @@ public final class org/jetbrains/jewel/ui/component/RadioButtonKt {
|
||||
public static final fun RadioButtonRow (ZLkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZLorg/jetbrains/jewel/ui/Outline;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lorg/jetbrains/jewel/ui/component/styling/RadioButtonStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/RadioButtonState : org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public final class org/jetbrains/jewel/ui/component/RadioButtonState : org/jetbrains/jewel/foundation/state/FocusableComponentState, org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/RadioButtonState$Companion;
|
||||
public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/ui/component/RadioButtonState;
|
||||
public fun chooseValue (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
@@ -554,11 +620,9 @@ public final class org/jetbrains/jewel/ui/component/TabData$Editor : org/jetbrai
|
||||
public final class org/jetbrains/jewel/ui/component/TabState : org/jetbrains/jewel/foundation/state/SelectableComponentState {
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/TabState$Companion;
|
||||
public static final synthetic fun box-impl (J)Lorg/jetbrains/jewel/ui/component/TabState;
|
||||
public fun chooseValue (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
public static fun chooseValue-impl (JLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Ljava/lang/Object;
|
||||
public static fun constructor-impl (J)J
|
||||
public static final fun copy-cOnw4Uk (JZZZZZZ)J
|
||||
public static synthetic fun copy-cOnw4Uk$default (JZZZZZZILjava/lang/Object;)J
|
||||
public static final fun copy-59c8LF8 (JZZZZZ)J
|
||||
public static synthetic fun copy-59c8LF8$default (JZZZZZILjava/lang/Object;)J
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (JLjava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (JJ)Z
|
||||
@@ -569,8 +633,6 @@ public final class org/jetbrains/jewel/ui/component/TabState : org/jetbrains/jew
|
||||
public static fun isActive-impl (J)Z
|
||||
public fun isEnabled ()Z
|
||||
public static fun isEnabled-impl (J)Z
|
||||
public fun isFocused ()Z
|
||||
public static fun isFocused-impl (J)Z
|
||||
public fun isHovered ()Z
|
||||
public static fun isHovered-impl (J)Z
|
||||
public fun isPressed ()Z
|
||||
@@ -583,8 +645,8 @@ public final class org/jetbrains/jewel/ui/component/TabState : org/jetbrains/jew
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/TabState$Companion {
|
||||
public final fun of-cOnw4Uk (ZZZZZZ)J
|
||||
public static synthetic fun of-cOnw4Uk$default (Lorg/jetbrains/jewel/ui/component/TabState$Companion;ZZZZZZILjava/lang/Object;)J
|
||||
public final fun of-59c8LF8 (ZZZZZ)J
|
||||
public static synthetic fun of-59c8LF8$default (Lorg/jetbrains/jewel/ui/component/TabState$Companion;ZZZZZILjava/lang/Object;)J
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/TabStripKt {
|
||||
@@ -1096,20 +1158,26 @@ public final class org/jetbrains/jewel/ui/component/styling/HorizontalProgressBa
|
||||
public final class org/jetbrains/jewel/ui/component/styling/IconButtonColors {
|
||||
public static final field $stable I
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion;
|
||||
public synthetic fun <init> (JJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun backgroundFor-Wlap9Qs (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public final fun borderFor-Wlap9Qs (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public synthetic fun <init> (JJJJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun backgroundFor-e04Q3fE (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public final fun borderFor-e04Q3fE (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun foregroundFor-e04Q3fE (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public final fun getBackground-0d7_KjU ()J
|
||||
public final fun getBackgroundDisabled-0d7_KjU ()J
|
||||
public final fun getBackgroundFocused-0d7_KjU ()J
|
||||
public final fun getBackgroundHovered-0d7_KjU ()J
|
||||
public final fun getBackgroundPressed-0d7_KjU ()J
|
||||
public final fun getBackgroundSelected-0d7_KjU ()J
|
||||
public final fun getBackgroundSelectedActivated-0d7_KjU ()J
|
||||
public final fun getBorder-0d7_KjU ()J
|
||||
public final fun getBorderDisabled-0d7_KjU ()J
|
||||
public final fun getBorderFocused-0d7_KjU ()J
|
||||
public final fun getBorderHovered-0d7_KjU ()J
|
||||
public final fun getBorderPressed-0d7_KjU ()J
|
||||
public final fun getBorderSelected-0d7_KjU ()J
|
||||
public final fun getBorderSelectedActivated-0d7_KjU ()J
|
||||
public final fun getForegroundSelectedActivated-0d7_KjU ()J
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
@@ -1133,10 +1201,6 @@ public final class org/jetbrains/jewel/ui/component/styling/IconButtonMetrics {
|
||||
public final class org/jetbrains/jewel/ui/component/styling/IconButtonMetrics$Companion {
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/styling/IconButtonMetricsKt {
|
||||
public static final fun getLocalIconButtonStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/styling/IconButtonStyle {
|
||||
public static final field $stable I
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/IconButtonStyle$Companion;
|
||||
@@ -1151,6 +1215,10 @@ public final class org/jetbrains/jewel/ui/component/styling/IconButtonStyle {
|
||||
public final class org/jetbrains/jewel/ui/component/styling/IconButtonStyle$Companion {
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/component/styling/IconButtonStylingKt {
|
||||
public static final fun getLocalIconButtonStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/component/styling/InputFieldColors {
|
||||
public abstract fun backgroundFor-xB6EZ8U (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public abstract fun borderFor-xB6EZ8U (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
@@ -1555,12 +1623,13 @@ public final class org/jetbrains/jewel/ui/component/styling/MenuMetrics$Companio
|
||||
public final class org/jetbrains/jewel/ui/component/styling/MenuStyle {
|
||||
public static final field $stable I
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/MenuStyle$Companion;
|
||||
public fun <init> (Lorg/jetbrains/jewel/ui/component/styling/MenuColors;Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics;Lorg/jetbrains/jewel/ui/component/styling/MenuIcons;)V
|
||||
public fun <init> (ZLorg/jetbrains/jewel/ui/component/styling/MenuColors;Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics;Lorg/jetbrains/jewel/ui/component/styling/MenuIcons;)V
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getColors ()Lorg/jetbrains/jewel/ui/component/styling/MenuColors;
|
||||
public final fun getIcons ()Lorg/jetbrains/jewel/ui/component/styling/MenuIcons;
|
||||
public final fun getMetrics ()Lorg/jetbrains/jewel/ui/component/styling/MenuMetrics;
|
||||
public fun hashCode ()I
|
||||
public final fun isDark ()Z
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
@@ -1701,25 +1770,22 @@ public final class org/jetbrains/jewel/ui/component/styling/SubmenuMetrics$Compa
|
||||
public final class org/jetbrains/jewel/ui/component/styling/TabColors {
|
||||
public static final field $stable I
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/TabColors$Companion;
|
||||
public synthetic fun <init> (JJJJJJJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (JJJJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun backgroundFor-UXw_FYk (JLandroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
public final fun contentFor-UXw_FYk (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 getBackgroundDisabled-0d7_KjU ()J
|
||||
public final fun getBackgroundFocused-0d7_KjU ()J
|
||||
public final fun getBackgroundHovered-0d7_KjU ()J
|
||||
public final fun getBackgroundPressed-0d7_KjU ()J
|
||||
public final fun getBackgroundSelected-0d7_KjU ()J
|
||||
public final fun getContent-0d7_KjU ()J
|
||||
public final fun getContentDisabled-0d7_KjU ()J
|
||||
public final fun getContentFocused-0d7_KjU ()J
|
||||
public final fun getContentHovered-0d7_KjU ()J
|
||||
public final fun getContentPressed-0d7_KjU ()J
|
||||
public final fun getContentSelected-0d7_KjU ()J
|
||||
public final fun getUnderline-0d7_KjU ()J
|
||||
public final fun getUnderlineDisabled-0d7_KjU ()J
|
||||
public final fun getUnderlineFocused-0d7_KjU ()J
|
||||
public final fun getUnderlineHovered-0d7_KjU ()J
|
||||
public final fun getUnderlinePressed-0d7_KjU ()J
|
||||
public final fun getUnderlineSelected-0d7_KjU ()J
|
||||
@@ -1734,16 +1800,14 @@ public final class org/jetbrains/jewel/ui/component/styling/TabColors$Companion
|
||||
public final class org/jetbrains/jewel/ui/component/styling/TabContentAlpha {
|
||||
public static final field $stable I
|
||||
public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/TabContentAlpha$Companion;
|
||||
public fun <init> (FFFFFFFFFFFF)V
|
||||
public fun <init> (FFFFFFFFFF)V
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getIconDisabled ()F
|
||||
public final fun getIconFocused ()F
|
||||
public final fun getIconHovered ()F
|
||||
public final fun getIconNormal ()F
|
||||
public final fun getIconPressed ()F
|
||||
public final fun getIconSelected ()F
|
||||
public final fun getLabelDisabled ()F
|
||||
public final fun getLabelFocused ()F
|
||||
public final fun getLabelHovered ()F
|
||||
public final fun getLabelNormal ()F
|
||||
public final fun getLabelPressed ()F
|
||||
@@ -2023,11 +2087,11 @@ public abstract class org/jetbrains/jewel/ui/painter/BasePainterHintsProvider :
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/BitmapPainterHint : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public abstract fun canApplyTo (Ljava/lang/String;)Z
|
||||
public abstract fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/BitmapPainterHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/BitmapPainterHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/BitmapPainterHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/CommonPainterHintsProvider : org/jetbrains/jewel/ui/painter/PainterHintsProvider {
|
||||
@@ -2056,15 +2120,15 @@ public class org/jetbrains/jewel/ui/painter/DelegatePainter : androidx/compose/u
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public static final field None Lorg/jetbrains/jewel/ui/painter/PainterHint$None;
|
||||
public abstract fun canApplyTo (Ljava/lang/String;)Z
|
||||
public abstract fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/PainterHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/PainterHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/PainterHint$None : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public fun canApplyTo (Ljava/lang/String;)Z
|
||||
public fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
@@ -2082,55 +2146,59 @@ public final class org/jetbrains/jewel/ui/painter/PainterHintsProviderKt {
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterPathHint : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public abstract fun patch (Ljava/lang/String;)Ljava/lang/String;
|
||||
public abstract fun patch (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/PainterPathHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/PainterPathHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterPathHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public abstract class org/jetbrains/jewel/ui/painter/PainterPrefixHint : org/jetbrains/jewel/ui/painter/PainterPathHint {
|
||||
public static final field $stable I
|
||||
public fun <init> ()V
|
||||
public fun canApplyTo (Ljava/lang/String;)Z
|
||||
public fun patch (Ljava/lang/String;)Ljava/lang/String;
|
||||
public abstract fun prefix ()Ljava/lang/String;
|
||||
public fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
public fun patch (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Ljava/lang/String;
|
||||
public abstract fun prefix (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterProvider {
|
||||
public abstract fun getPainter ([Lorg/jetbrains/jewel/ui/painter/PainterHint;Landroidx/compose/runtime/Composer;I)Landroidx/compose/runtime/State;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterResourcePathHint : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public abstract fun patch (Ljava/lang/String;Ljava/util/List;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/PainterResourcePathHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/PainterResourcePathHint;Ljava/lang/String;)Z
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterProviderScope : androidx/compose/ui/unit/Density {
|
||||
public abstract fun getAcceptedHints ()Ljava/util/List;
|
||||
public abstract fun getPath ()Ljava/lang/String;
|
||||
public abstract fun getRawPath ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract class org/jetbrains/jewel/ui/painter/PainterSuffixHint : org/jetbrains/jewel/ui/painter/PainterPathHint {
|
||||
public static final field $stable I
|
||||
public fun <init> ()V
|
||||
public fun canApplyTo (Ljava/lang/String;)Z
|
||||
public fun patch (Ljava/lang/String;)Ljava/lang/String;
|
||||
public abstract fun suffix ()Ljava/lang/String;
|
||||
public fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
public fun patch (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Ljava/lang/String;
|
||||
public abstract fun suffix (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterSvgPatchHint : org/jetbrains/jewel/ui/painter/SvgPainterHint {
|
||||
public abstract fun patch (Lorg/w3c/dom/Element;)V
|
||||
public abstract fun patch (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;Lorg/w3c/dom/Element;)V
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/PainterSvgPatchHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/PainterSvgPatchHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterSvgPatchHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/PainterWrapperHint : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public abstract fun wrap (Landroidx/compose/ui/graphics/painter/Painter;)Landroidx/compose/ui/graphics/painter/Painter;
|
||||
public abstract fun wrap (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;Landroidx/compose/ui/graphics/painter/Painter;)Landroidx/compose/ui/graphics/painter/Painter;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/PainterWrapperHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/PainterWrapperHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterWrapperHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/ResizedPainter : org/jetbrains/jewel/ui/painter/DelegatePainter {
|
||||
public static final field $stable I
|
||||
public synthetic fun <init> (Landroidx/compose/ui/graphics/painter/Painter;JLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun getIntrinsicSize-NH-jbRc ()J
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/ResourcePainterProvider : org/jetbrains/jewel/ui/painter/PainterProvider {
|
||||
@@ -2143,20 +2211,24 @@ public final class org/jetbrains/jewel/ui/painter/ResourcePainterProviderKt {
|
||||
public static final fun rememberResourcePainterProvider (Ljava/lang/String;Ljava/lang/Class;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/painter/PainterProvider;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/ResourcePainterProviderScope : org/jetbrains/jewel/ui/painter/PainterProviderScope {
|
||||
public abstract fun getClassLoaders ()Ljava/util/Set;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/SvgPainterHint : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public abstract fun canApplyTo (Ljava/lang/String;)Z
|
||||
public abstract fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/SvgPainterHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/SvgPainterHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/SvgPainterHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/XmlPainterHint : org/jetbrains/jewel/ui/painter/PainterHint {
|
||||
public abstract fun canApplyTo (Ljava/lang/String;)Z
|
||||
public abstract fun canApply (Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/XmlPainterHint$DefaultImpls {
|
||||
public static fun canApplyTo (Lorg/jetbrains/jewel/ui/painter/XmlPainterHint;Ljava/lang/String;)Z
|
||||
public static fun canApply (Lorg/jetbrains/jewel/ui/painter/XmlPainterHint;Lorg/jetbrains/jewel/ui/painter/PainterProviderScope;)Z
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/painter/badge/BadgeShape : androidx/compose/ui/graphics/Shape {
|
||||
@@ -2188,14 +2260,14 @@ public final class org/jetbrains/jewel/ui/painter/hints/BadgeKt {
|
||||
public static final fun Badge-DxMtmZc (JLorg/jetbrains/jewel/ui/painter/badge/BadgeShape;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/hints/DarkKt {
|
||||
public final class org/jetbrains/jewel/ui/painter/hints/DarkOrStrokeKt {
|
||||
public static final fun Dark (Z)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static synthetic fun Dark$default (ZILjava/lang/Object;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static final fun Stroke-8_81llA (J)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/hints/HiDpiKt {
|
||||
public static final fun HiDpi (Landroidx/compose/ui/unit/Density;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static final fun HiDpi (Z)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static final fun HiDpi ()Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/hints/OverrideKt {
|
||||
@@ -2214,7 +2286,6 @@ public final class org/jetbrains/jewel/ui/painter/hints/SelectedKt {
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/hints/SizeKt {
|
||||
public static final fun Size (II)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static final fun Size (Ljava/lang/String;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static synthetic fun Size$default (IIILjava/lang/Object;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
}
|
||||
|
||||
@@ -2222,19 +2293,9 @@ public final class org/jetbrains/jewel/ui/painter/hints/StatefulKt {
|
||||
public static final fun Stateful (Lorg/jetbrains/jewel/foundation/state/InteractiveComponentState;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/painter/hints/StrokeKt {
|
||||
public static final fun Stroke (Z)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
public static synthetic fun Stroke$default (ZILjava/lang/Object;)Lorg/jetbrains/jewel/ui/painter/PainterHint;
|
||||
}
|
||||
|
||||
public abstract interface class org/jetbrains/jewel/ui/theme/ComponentStyleProviderScope {
|
||||
public abstract fun getTheme ()Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;
|
||||
public abstract fun provide ([Landroidx/compose/runtime/ProvidedValue;)V
|
||||
}
|
||||
|
||||
public final class org/jetbrains/jewel/ui/theme/JewelThemeKt {
|
||||
public static final fun BaseJewelTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
|
||||
public static final fun BaseJewelTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lkotlin/jvm/functions/Function3;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun BaseJewelTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lorg/jetbrains/jewel/ui/ComponentStyling;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
|
||||
public static final fun BaseJewelTheme (Lorg/jetbrains/jewel/foundation/theme/ThemeDefinition;Lorg/jetbrains/jewel/ui/ComponentStyling;ZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
|
||||
public static final fun getCheckboxStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/component/styling/CheckboxStyle;
|
||||
public static final fun getChipStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/component/styling/ChipStyle;
|
||||
public static final fun getCircularProgressStyle (Lorg/jetbrains/jewel/foundation/theme/JewelTheme$Companion;Landroidx/compose/runtime/Composer;I)Lorg/jetbrains/jewel/ui/component/styling/CircularProgressStyle;
|
||||
|
||||
@@ -1,72 +1,83 @@
|
||||
package org.jetbrains.jewel.ui
|
||||
|
||||
import androidx.compose.foundation.LocalContextMenuRepresentation
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.ProvidedValue
|
||||
import androidx.compose.runtime.Stable
|
||||
import org.jetbrains.jewel.foundation.GenerateDataFunctions
|
||||
import org.jetbrains.jewel.ui.component.ContextMenuRepresentation
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalDefaultTabStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalEditorTabStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalTextAreaStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalTextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalTooltipStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TabStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TextAreaStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TooltipStyle
|
||||
|
||||
@Stable
|
||||
@GenerateDataFunctions
|
||||
class ComponentStyling(
|
||||
val checkboxStyle: org.jetbrains.jewel.ui.component.styling.CheckboxStyle,
|
||||
val chipStyle: org.jetbrains.jewel.ui.component.styling.ChipStyle,
|
||||
val circularProgressStyle: org.jetbrains.jewel.ui.component.styling.CircularProgressStyle,
|
||||
val defaultButtonStyle: org.jetbrains.jewel.ui.component.styling.ButtonStyle,
|
||||
val defaultDropdownStyle: org.jetbrains.jewel.ui.component.styling.DropdownStyle,
|
||||
val defaultTabStyle: TabStyle,
|
||||
val dividerStyle: org.jetbrains.jewel.ui.component.styling.DividerStyle,
|
||||
val editorTabStyle: TabStyle,
|
||||
val groupHeaderStyle: org.jetbrains.jewel.ui.component.styling.GroupHeaderStyle,
|
||||
val horizontalProgressBarStyle: org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarStyle,
|
||||
val iconButtonStyle: org.jetbrains.jewel.ui.component.styling.IconButtonStyle,
|
||||
val labelledTextFieldStyle: org.jetbrains.jewel.ui.component.styling.LabelledTextFieldStyle,
|
||||
val lazyTreeStyle: org.jetbrains.jewel.ui.component.styling.LazyTreeStyle,
|
||||
val linkStyle: org.jetbrains.jewel.ui.component.styling.LinkStyle,
|
||||
val menuStyle: org.jetbrains.jewel.ui.component.styling.MenuStyle,
|
||||
val outlinedButtonStyle: org.jetbrains.jewel.ui.component.styling.ButtonStyle,
|
||||
val radioButtonStyle: org.jetbrains.jewel.ui.component.styling.RadioButtonStyle,
|
||||
val scrollbarStyle: org.jetbrains.jewel.ui.component.styling.ScrollbarStyle,
|
||||
val textAreaStyle: TextAreaStyle,
|
||||
val textFieldStyle: TextFieldStyle,
|
||||
val tooltipStyle: TooltipStyle,
|
||||
val undecoratedDropdownStyle: org.jetbrains.jewel.ui.component.styling.DropdownStyle,
|
||||
) {
|
||||
interface ComponentStyling {
|
||||
|
||||
fun provide(vararg values: ProvidedValue<*>): ComponentStyling {
|
||||
if (values.isEmpty()) return this
|
||||
return with(StaticComponentStyling(values = values))
|
||||
}
|
||||
|
||||
fun provide(provider: @Composable () -> Array<out ProvidedValue<*>>): ComponentStyling =
|
||||
with(LazyComponentStyling(provider))
|
||||
|
||||
fun with(styling: ComponentStyling): ComponentStyling {
|
||||
if (styling is Companion) return this
|
||||
return CombinedComponentStyling(this, styling)
|
||||
}
|
||||
|
||||
fun with(styling: @Composable () -> ComponentStyling): ComponentStyling =
|
||||
with(
|
||||
LazyComponentStyling {
|
||||
styling().styles()
|
||||
},
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun providedStyles(): Array<ProvidedValue<*>> = arrayOf(
|
||||
org.jetbrains.jewel.ui.component.styling.LocalCheckboxStyle provides checkboxStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalChipStyle provides chipStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalCircularProgressStyle provides circularProgressStyle,
|
||||
LocalContextMenuRepresentation provides ContextMenuRepresentation,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalDefaultButtonStyle provides defaultButtonStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalDefaultDropdownStyle provides defaultDropdownStyle,
|
||||
LocalDefaultTabStyle provides defaultTabStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalDividerStyle provides dividerStyle,
|
||||
LocalEditorTabStyle provides editorTabStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalGroupHeaderStyle provides groupHeaderStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalHorizontalProgressBarStyle provides horizontalProgressBarStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalIconButtonStyle provides iconButtonStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalLabelledTextFieldStyle provides labelledTextFieldStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalLazyTreeStyle provides lazyTreeStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalLinkStyle provides linkStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalMenuStyle provides menuStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalOutlinedButtonStyle provides outlinedButtonStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalRadioButtonStyle provides radioButtonStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalScrollbarStyle provides scrollbarStyle,
|
||||
LocalTextAreaStyle provides textAreaStyle,
|
||||
LocalTextFieldStyle provides textFieldStyle,
|
||||
LocalTooltipStyle provides tooltipStyle,
|
||||
org.jetbrains.jewel.ui.component.styling.LocalUndecoratedDropdownStyle provides undecoratedDropdownStyle,
|
||||
)
|
||||
fun styles(): Array<out ProvidedValue<*>>
|
||||
|
||||
companion object : ComponentStyling {
|
||||
|
||||
override fun with(styling: ComponentStyling): ComponentStyling = styling
|
||||
|
||||
@Composable
|
||||
override fun styles(): Array<out ProvidedValue<*>> = emptyArray()
|
||||
|
||||
override fun toString() = "ComponentStyleProvider"
|
||||
}
|
||||
}
|
||||
|
||||
private class StaticComponentStyling(private val values: Array<out ProvidedValue<*>>) : ComponentStyling {
|
||||
|
||||
@Composable
|
||||
override fun styles(): Array<out ProvidedValue<*>> = values
|
||||
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is StaticComponentStyling && values.contentEquals(other.values)
|
||||
|
||||
override fun hashCode(): Int = values.contentHashCode()
|
||||
|
||||
override fun toString(): String = "StaticComponentStyle(values=${values.contentToString()})"
|
||||
}
|
||||
|
||||
private class LazyComponentStyling(val provider: @Composable () -> Array<out ProvidedValue<*>>) : ComponentStyling {
|
||||
|
||||
@Composable
|
||||
override fun styles(): Array<out ProvidedValue<*>> = provider()
|
||||
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is LazyComponentStyling && provider == other.provider
|
||||
|
||||
override fun hashCode(): Int = provider.hashCode()
|
||||
|
||||
override fun toString(): String = "DynamicComponentStyleProvider(provider=$provider)"
|
||||
}
|
||||
|
||||
private class CombinedComponentStyling(
|
||||
private val left: ComponentStyling,
|
||||
private val right: ComponentStyling,
|
||||
) : ComponentStyling {
|
||||
|
||||
@Composable
|
||||
override fun styles(): Array<out ProvidedValue<*>> =
|
||||
(left.styles().toList() + right.styles().toList()).toTypedArray()
|
||||
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is CombinedComponentStyling && left == other.left && right == other.right
|
||||
|
||||
override fun hashCode(): Int = left.hashCode() + 31 * right.hashCode()
|
||||
|
||||
override fun toString(): String = "CombinedComponentStyleProvider(left=$left, right=$right)"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package org.jetbrains.jewel.ui
|
||||
|
||||
import androidx.compose.foundation.LocalContextMenuRepresentation
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.ProvidedValue
|
||||
import androidx.compose.runtime.Stable
|
||||
import org.jetbrains.jewel.foundation.GenerateDataFunctions
|
||||
import org.jetbrains.jewel.ui.component.ContextMenuRepresentation
|
||||
import org.jetbrains.jewel.ui.component.styling.ButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.CheckboxStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.ChipStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.CircularProgressStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.DividerStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.DropdownStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.GroupHeaderStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.IconButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LabelledTextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LazyTreeStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LinkStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalCheckboxStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalChipStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalCircularProgressStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalDefaultButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalDefaultDropdownStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalDefaultTabStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalDividerStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalEditorTabStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalGroupHeaderStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalHorizontalProgressBarStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalIconButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalLabelledTextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalLazyTreeStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalLinkStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalMenuStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalOutlinedButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalRadioButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalScrollbarStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalTextAreaStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalTextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalTooltipStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalUndecoratedDropdownStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.MenuStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.RadioButtonStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.ScrollbarStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TabStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TextAreaStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TextFieldStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.TooltipStyle
|
||||
|
||||
@Stable
|
||||
@GenerateDataFunctions
|
||||
class DefaultComponentStyling(
|
||||
val checkboxStyle: CheckboxStyle,
|
||||
val chipStyle: ChipStyle,
|
||||
val circularProgressStyle: CircularProgressStyle,
|
||||
val defaultButtonStyle: ButtonStyle,
|
||||
val defaultDropdownStyle: DropdownStyle,
|
||||
val defaultTabStyle: TabStyle,
|
||||
val dividerStyle: DividerStyle,
|
||||
val editorTabStyle: TabStyle,
|
||||
val groupHeaderStyle: GroupHeaderStyle,
|
||||
val horizontalProgressBarStyle: HorizontalProgressBarStyle,
|
||||
val iconButtonStyle: IconButtonStyle,
|
||||
val labelledTextFieldStyle: LabelledTextFieldStyle,
|
||||
val lazyTreeStyle: LazyTreeStyle,
|
||||
val linkStyle: LinkStyle,
|
||||
val menuStyle: MenuStyle,
|
||||
val outlinedButtonStyle: ButtonStyle,
|
||||
val radioButtonStyle: RadioButtonStyle,
|
||||
val scrollbarStyle: ScrollbarStyle,
|
||||
val textAreaStyle: TextAreaStyle,
|
||||
val textFieldStyle: TextFieldStyle,
|
||||
val tooltipStyle: TooltipStyle,
|
||||
val undecoratedDropdownStyle: DropdownStyle,
|
||||
) : ComponentStyling {
|
||||
|
||||
@Composable
|
||||
override fun styles(): Array<out ProvidedValue<*>> = arrayOf(
|
||||
LocalCheckboxStyle provides checkboxStyle,
|
||||
LocalChipStyle provides chipStyle,
|
||||
LocalCircularProgressStyle provides circularProgressStyle,
|
||||
LocalContextMenuRepresentation provides ContextMenuRepresentation,
|
||||
LocalDefaultButtonStyle provides defaultButtonStyle,
|
||||
LocalDefaultDropdownStyle provides defaultDropdownStyle,
|
||||
LocalDefaultTabStyle provides defaultTabStyle,
|
||||
LocalDividerStyle provides dividerStyle,
|
||||
LocalEditorTabStyle provides editorTabStyle,
|
||||
LocalGroupHeaderStyle provides groupHeaderStyle,
|
||||
LocalHorizontalProgressBarStyle provides horizontalProgressBarStyle,
|
||||
LocalIconButtonStyle provides iconButtonStyle,
|
||||
LocalLabelledTextFieldStyle provides labelledTextFieldStyle,
|
||||
LocalLazyTreeStyle provides lazyTreeStyle,
|
||||
LocalLinkStyle provides linkStyle,
|
||||
LocalMenuStyle provides menuStyle,
|
||||
LocalOutlinedButtonStyle provides outlinedButtonStyle,
|
||||
LocalRadioButtonStyle provides radioButtonStyle,
|
||||
LocalScrollbarStyle provides scrollbarStyle,
|
||||
LocalTextAreaStyle provides textAreaStyle,
|
||||
LocalTextFieldStyle provides textFieldStyle,
|
||||
LocalTooltipStyle provides tooltipStyle,
|
||||
LocalUndecoratedDropdownStyle provides undecoratedDropdownStyle,
|
||||
)
|
||||
}
|
||||
@@ -37,6 +37,7 @@ import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Hovered
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Indeterminate
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Pressed
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Selected
|
||||
import org.jetbrains.jewel.foundation.state.FocusableComponentState
|
||||
import org.jetbrains.jewel.foundation.state.ToggleableComponentState
|
||||
import org.jetbrains.jewel.foundation.state.ToggleableComponentState.Companion.readToggleableState
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
@@ -49,6 +50,7 @@ import org.jetbrains.jewel.ui.component.styling.CheckboxMetrics
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalCheckboxStyle
|
||||
import org.jetbrains.jewel.ui.outline
|
||||
import org.jetbrains.jewel.ui.painter.PainterHint
|
||||
import org.jetbrains.jewel.ui.painter.PainterProviderScope
|
||||
import org.jetbrains.jewel.ui.painter.PainterSuffixHint
|
||||
import org.jetbrains.jewel.ui.painter.hints.Selected
|
||||
import org.jetbrains.jewel.ui.painter.hints.Stateful
|
||||
@@ -332,7 +334,7 @@ private fun CheckboxImpl(
|
||||
|
||||
private object CheckBoxIndeterminate : PainterSuffixHint() {
|
||||
|
||||
override fun suffix(): String = "Indeterminate"
|
||||
override fun PainterProviderScope.suffix(): String = "Indeterminate"
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -344,7 +346,7 @@ private fun CheckBoxImage(outerModifier: Modifier, checkboxPainter: Painter, che
|
||||
|
||||
@Immutable
|
||||
@JvmInline
|
||||
value class CheckboxState(private val state: ULong) : ToggleableComponentState {
|
||||
value class CheckboxState(private val state: ULong) : ToggleableComponentState, FocusableComponentState {
|
||||
|
||||
@Stable
|
||||
override val toggleableState: ToggleableState
|
||||
|
||||
@@ -131,7 +131,7 @@ fun Dropdown(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(style.metrics.contentPadding)
|
||||
.padding(end = minSize.height),
|
||||
.padding(end = arrowMinSize.width),
|
||||
contentAlignment = Alignment.CenterStart,
|
||||
content = content,
|
||||
)
|
||||
|
||||
@@ -11,9 +11,13 @@ import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.BoxScope
|
||||
import androidx.compose.foundation.layout.defaultMinSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.selection.selectable
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.MutableState
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
@@ -21,6 +25,10 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import org.jetbrains.jewel.foundation.modifier.onActivated
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask
|
||||
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.ui.NoIndication
|
||||
import org.jetbrains.jewel.ui.component.styling.IconButtonStyle
|
||||
@@ -33,16 +41,78 @@ fun IconButton(
|
||||
enabled: Boolean = true,
|
||||
style: IconButtonStyle = JewelTheme.iconButtonStyle,
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
content: @Composable (BoxScope.(ButtonState) -> Unit),
|
||||
content: @Composable (BoxScope.(IconButtonState) -> Unit),
|
||||
) {
|
||||
var buttonState by remember(interactionSource) {
|
||||
mutableStateOf(ButtonState.of(enabled = enabled))
|
||||
val buttonState = remember(interactionSource) {
|
||||
mutableStateOf(IconButtonState.of(enabled = enabled))
|
||||
}
|
||||
|
||||
remember(enabled) {
|
||||
buttonState = buttonState.copy(enabled = enabled)
|
||||
buttonState.value = buttonState.value.copy(enabled = enabled)
|
||||
}
|
||||
|
||||
IconButtonImpl(
|
||||
state = buttonState,
|
||||
modifier = modifier
|
||||
.clickable(
|
||||
onClick = onClick,
|
||||
enabled = enabled,
|
||||
role = Role.Button,
|
||||
interactionSource = interactionSource,
|
||||
indication = NoIndication,
|
||||
),
|
||||
style = style,
|
||||
interactionSource = interactionSource,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun SelectableIconButton(
|
||||
selected: Boolean,
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
enabled: Boolean = true,
|
||||
style: IconButtonStyle = JewelTheme.iconButtonStyle,
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
content: @Composable (BoxScope.(IconButtonState) -> Unit),
|
||||
) {
|
||||
val buttonState = remember(interactionSource) {
|
||||
mutableStateOf(IconButtonState.of(enabled = enabled))
|
||||
}
|
||||
|
||||
remember(enabled, selected) {
|
||||
buttonState.value = buttonState.value.copy(enabled = enabled, selected = selected)
|
||||
}
|
||||
|
||||
IconButtonImpl(
|
||||
state = buttonState,
|
||||
modifier = modifier.selectable(
|
||||
onClick = onClick,
|
||||
enabled = enabled,
|
||||
role = Role.RadioButton,
|
||||
interactionSource = interactionSource,
|
||||
indication = null,
|
||||
selected = selected,
|
||||
).onActivated(enabled = enabled) {
|
||||
buttonState.value = buttonState.value.copy(active = it)
|
||||
},
|
||||
style = style,
|
||||
interactionSource = interactionSource,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun IconButtonImpl(
|
||||
state: MutableState<IconButtonState>,
|
||||
modifier: Modifier,
|
||||
style: IconButtonStyle,
|
||||
interactionSource: MutableInteractionSource,
|
||||
content: @Composable (BoxScope.(IconButtonState) -> Unit),
|
||||
) {
|
||||
var buttonState by state
|
||||
|
||||
LaunchedEffect(interactionSource) {
|
||||
interactionSource.interactions.collect { interaction ->
|
||||
when (interaction) {
|
||||
@@ -65,13 +135,6 @@ fun IconButton(
|
||||
Box(
|
||||
modifier = modifier
|
||||
.defaultMinSize(style.metrics.minSize.width, style.metrics.minSize.height)
|
||||
.clickable(
|
||||
onClick = onClick,
|
||||
enabled = enabled,
|
||||
role = Role.Button,
|
||||
interactionSource = interactionSource,
|
||||
indication = NoIndication,
|
||||
)
|
||||
.padding(style.metrics.padding)
|
||||
.background(background, shape)
|
||||
.border(style.metrics.borderWidth, border, shape),
|
||||
@@ -81,3 +144,72 @@ fun IconButton(
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Immutable
|
||||
@JvmInline
|
||||
value class IconButtonState(val state: ULong) : FocusableComponentState, SelectableComponentState {
|
||||
|
||||
@Stable
|
||||
override val isSelected: Boolean
|
||||
get() = state and CommonStateBitMask.Selected != 0UL
|
||||
|
||||
@Stable
|
||||
override val isActive: Boolean
|
||||
get() = state and CommonStateBitMask.Active != 0UL
|
||||
|
||||
@Stable
|
||||
override val isEnabled: Boolean
|
||||
get() = state and CommonStateBitMask.Enabled != 0UL
|
||||
|
||||
@Stable
|
||||
override val isFocused: Boolean
|
||||
get() = state and CommonStateBitMask.Focused != 0UL
|
||||
|
||||
@Stable
|
||||
override val isHovered: Boolean
|
||||
get() = state and CommonStateBitMask.Hovered != 0UL
|
||||
|
||||
@Stable
|
||||
override val isPressed: Boolean
|
||||
get() = state and CommonStateBitMask.Pressed != 0UL
|
||||
|
||||
fun copy(
|
||||
enabled: Boolean = isEnabled,
|
||||
selected: Boolean = isSelected,
|
||||
focused: Boolean = isFocused,
|
||||
pressed: Boolean = isPressed,
|
||||
hovered: Boolean = isHovered,
|
||||
active: Boolean = isActive,
|
||||
) = of(
|
||||
enabled = enabled,
|
||||
selected = selected,
|
||||
focused = focused,
|
||||
pressed = pressed,
|
||||
hovered = hovered,
|
||||
active = active,
|
||||
)
|
||||
|
||||
override fun toString() =
|
||||
"${javaClass.simpleName}(isEnabled=$isEnabled, isSelected=$isSelected, " +
|
||||
"isFocused=$isFocused, isHovered=$isHovered, isPressed=$isPressed, " +
|
||||
"isActive=$isActive)"
|
||||
|
||||
companion object {
|
||||
|
||||
fun of(
|
||||
enabled: Boolean = true,
|
||||
selected: Boolean = false,
|
||||
focused: Boolean = false,
|
||||
pressed: Boolean = false,
|
||||
hovered: Boolean = false,
|
||||
active: Boolean = false,
|
||||
) = IconButtonState(
|
||||
state = (if (enabled) CommonStateBitMask.Enabled else 0UL) or
|
||||
(if (selected) CommonStateBitMask.Selected else 0UL) or
|
||||
(if (focused) CommonStateBitMask.Focused else 0UL) or
|
||||
(if (hovered) CommonStateBitMask.Hovered else 0UL) or
|
||||
(if (pressed) CommonStateBitMask.Pressed else 0UL) or
|
||||
(if (active) CommonStateBitMask.Active else 0UL),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,9 +69,11 @@ import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Focused
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Hovered
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Pressed
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Selected
|
||||
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.OverrideDarkMode
|
||||
import org.jetbrains.jewel.ui.Orientation
|
||||
import org.jetbrains.jewel.ui.component.styling.LocalMenuStyle
|
||||
import org.jetbrains.jewel.ui.component.styling.MenuItemColors
|
||||
@@ -117,14 +119,16 @@ fun PopupMenu(
|
||||
focusManager = LocalFocusManager.current
|
||||
inputModeManager = LocalInputModeManager.current
|
||||
|
||||
CompositionLocalProvider(
|
||||
LocalMenuManager provides menuManager,
|
||||
LocalMenuStyle provides style,
|
||||
) {
|
||||
MenuContent(
|
||||
modifier = modifier,
|
||||
content = content,
|
||||
)
|
||||
OverrideDarkMode(style.isDark) {
|
||||
CompositionLocalProvider(
|
||||
LocalMenuManager provides menuManager,
|
||||
LocalMenuStyle provides style,
|
||||
) {
|
||||
MenuContent(
|
||||
modifier = modifier,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -568,7 +572,7 @@ internal fun Submenu(
|
||||
|
||||
@Immutable
|
||||
@JvmInline
|
||||
value class MenuItemState(val state: ULong) : SelectableComponentState {
|
||||
value class MenuItemState(val state: ULong) : SelectableComponentState, FocusableComponentState {
|
||||
|
||||
@Stable
|
||||
override val isActive: Boolean
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Focused
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Hovered
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Pressed
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Selected
|
||||
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
|
||||
@@ -209,7 +210,7 @@ private fun RadioButtonImage(outerModifier: Modifier, radioButtonPainter: Painte
|
||||
|
||||
@Immutable
|
||||
@JvmInline
|
||||
value class RadioButtonState(val state: ULong) : SelectableComponentState {
|
||||
value class RadioButtonState(val state: ULong) : SelectableComponentState, FocusableComponentState {
|
||||
|
||||
@Stable
|
||||
override val isActive: Boolean
|
||||
|
||||
@@ -27,6 +27,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.focus.focusProperties
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.graphics.SolidColor
|
||||
import androidx.compose.ui.graphics.StrokeCap
|
||||
@@ -38,7 +39,6 @@ import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Active
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Enabled
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Focused
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Hovered
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Pressed
|
||||
import org.jetbrains.jewel.foundation.state.CommonStateBitMask.Selected
|
||||
@@ -93,6 +93,7 @@ internal fun TabImpl(
|
||||
modifier
|
||||
.height(tabStyle.metrics.tabHeight)
|
||||
.background(backgroundColor)
|
||||
.focusProperties { canFocus = false }
|
||||
.selectable(
|
||||
onClick = tabData.onClick,
|
||||
selected = tabData.selected,
|
||||
@@ -183,10 +184,6 @@ value class TabState(val state: ULong) : SelectableComponentState {
|
||||
override val isEnabled: Boolean
|
||||
get() = state and Enabled != 0UL
|
||||
|
||||
@Stable
|
||||
override val isFocused: Boolean
|
||||
get() = state and Focused != 0UL
|
||||
|
||||
@Stable
|
||||
override val isHovered: Boolean
|
||||
get() = state and Hovered != 0UL
|
||||
@@ -198,21 +195,19 @@ value class TabState(val state: ULong) : SelectableComponentState {
|
||||
fun copy(
|
||||
selected: Boolean = isSelected,
|
||||
enabled: Boolean = isEnabled,
|
||||
focused: Boolean = isFocused,
|
||||
pressed: Boolean = isPressed,
|
||||
hovered: Boolean = isHovered,
|
||||
active: Boolean = isActive,
|
||||
) = of(
|
||||
selected = selected,
|
||||
enabled = enabled,
|
||||
focused = focused,
|
||||
pressed = pressed,
|
||||
hovered = hovered,
|
||||
active = active,
|
||||
)
|
||||
|
||||
override fun toString() =
|
||||
"${javaClass.simpleName}(isSelected=$isSelected, isEnabled=$isEnabled, isFocused=$isFocused, " +
|
||||
"${javaClass.simpleName}(isSelected=$isSelected, isEnabled=$isEnabled, " +
|
||||
"isHovered=$isHovered, isPressed=$isPressed isActive=$isActive)"
|
||||
|
||||
companion object {
|
||||
@@ -220,14 +215,12 @@ value class TabState(val state: ULong) : SelectableComponentState {
|
||||
fun of(
|
||||
selected: Boolean,
|
||||
enabled: Boolean = true,
|
||||
focused: Boolean = false,
|
||||
pressed: Boolean = false,
|
||||
hovered: Boolean = false,
|
||||
active: Boolean = false,
|
||||
) = TabState(
|
||||
(if (selected) Selected else 0UL) or
|
||||
(if (enabled) Enabled else 0UL) or
|
||||
(if (focused) Focused else 0UL) or
|
||||
(if (pressed) Pressed else 0UL) or
|
||||
(if (hovered) Hovered else 0UL) or
|
||||
(if (active) Active else 0UL),
|
||||
|
||||
@@ -11,7 +11,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import org.jetbrains.jewel.foundation.GenerateDataFunctions
|
||||
import org.jetbrains.jewel.ui.component.ButtonState
|
||||
import org.jetbrains.jewel.ui.component.IconButtonState
|
||||
|
||||
@Stable
|
||||
@GenerateDataFunctions
|
||||
@@ -26,22 +26,37 @@ class IconButtonStyle(
|
||||
@Immutable
|
||||
@GenerateDataFunctions
|
||||
class IconButtonColors(
|
||||
val foregroundSelectedActivated: Color,
|
||||
val background: Color,
|
||||
val backgroundDisabled: Color,
|
||||
val backgroundSelected: Color,
|
||||
val backgroundSelectedActivated: Color,
|
||||
val backgroundFocused: Color,
|
||||
val backgroundPressed: Color,
|
||||
val backgroundHovered: Color,
|
||||
val border: Color,
|
||||
val borderDisabled: Color,
|
||||
val borderSelected: Color,
|
||||
val borderSelectedActivated: Color,
|
||||
val borderFocused: Color,
|
||||
val borderPressed: Color,
|
||||
val borderHovered: Color,
|
||||
) {
|
||||
|
||||
@Composable
|
||||
fun backgroundFor(state: ButtonState) = rememberUpdatedState(
|
||||
fun foregroundFor(state: IconButtonState) = rememberUpdatedState(
|
||||
when {
|
||||
state.isActive && state.isSelected -> foregroundSelectedActivated
|
||||
else -> Color.Unspecified
|
||||
},
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun backgroundFor(state: IconButtonState) = rememberUpdatedState(
|
||||
when {
|
||||
!state.isEnabled -> backgroundDisabled
|
||||
state.isActive && state.isSelected -> backgroundSelectedActivated
|
||||
state.isSelected -> backgroundSelected
|
||||
state.isPressed -> backgroundPressed
|
||||
state.isHovered -> backgroundHovered
|
||||
state.isFocused -> backgroundFocused
|
||||
@@ -50,9 +65,11 @@ class IconButtonColors(
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun borderFor(state: ButtonState) = rememberUpdatedState(
|
||||
fun borderFor(state: IconButtonState) = rememberUpdatedState(
|
||||
when {
|
||||
!state.isEnabled -> borderDisabled
|
||||
state.isActive && state.isSelected -> borderSelectedActivated
|
||||
state.isSelected -> borderSelected
|
||||
state.isFocused -> borderFocused
|
||||
state.isPressed -> borderPressed
|
||||
state.isHovered -> borderHovered
|
||||
@@ -17,6 +17,7 @@ import org.jetbrains.jewel.ui.painter.PainterProvider
|
||||
@Stable
|
||||
@GenerateDataFunctions
|
||||
class MenuStyle(
|
||||
val isDark: Boolean,
|
||||
val colors: MenuColors,
|
||||
val metrics: MenuMetrics,
|
||||
val icons: MenuIcons,
|
||||
|
||||
@@ -48,19 +48,16 @@ class TabIcons(val close: PainterProvider) {
|
||||
class TabColors(
|
||||
val background: Color,
|
||||
val backgroundDisabled: Color,
|
||||
val backgroundFocused: Color,
|
||||
val backgroundPressed: Color,
|
||||
val backgroundHovered: Color,
|
||||
val backgroundSelected: Color,
|
||||
val content: Color,
|
||||
val contentDisabled: Color,
|
||||
val contentFocused: Color,
|
||||
val contentPressed: Color,
|
||||
val contentHovered: Color,
|
||||
val contentSelected: Color,
|
||||
val underline: Color,
|
||||
val underlineDisabled: Color,
|
||||
val underlineFocused: Color,
|
||||
val underlinePressed: Color,
|
||||
val underlineHovered: Color,
|
||||
val underlineSelected: Color,
|
||||
@@ -73,7 +70,6 @@ class TabColors(
|
||||
else -> state.chooseValueIgnoreCompat(
|
||||
normal = content,
|
||||
disabled = contentDisabled,
|
||||
focused = contentFocused,
|
||||
pressed = contentPressed,
|
||||
hovered = contentHovered,
|
||||
active = content,
|
||||
@@ -87,7 +83,6 @@ class TabColors(
|
||||
!state.isEnabled -> backgroundDisabled
|
||||
state.isPressed -> backgroundPressed
|
||||
state.isHovered -> backgroundHovered
|
||||
state.isFocused -> backgroundFocused
|
||||
state.isActive -> background
|
||||
state.isSelected -> backgroundSelected
|
||||
else -> background
|
||||
@@ -101,7 +96,6 @@ class TabColors(
|
||||
else -> state.chooseValueIgnoreCompat(
|
||||
normal = underline,
|
||||
disabled = underlineDisabled,
|
||||
focused = underlineFocused,
|
||||
pressed = underlinePressed,
|
||||
hovered = underlineHovered,
|
||||
active = underline,
|
||||
@@ -117,13 +111,11 @@ class TabColors(
|
||||
class TabContentAlpha(
|
||||
val iconNormal: Float,
|
||||
val iconDisabled: Float,
|
||||
val iconFocused: Float,
|
||||
val iconPressed: Float,
|
||||
val iconHovered: Float,
|
||||
val iconSelected: Float,
|
||||
val labelNormal: Float,
|
||||
val labelDisabled: Float,
|
||||
val labelFocused: Float,
|
||||
val labelPressed: Float,
|
||||
val labelHovered: Float,
|
||||
val labelSelected: Float,
|
||||
@@ -136,7 +128,6 @@ class TabContentAlpha(
|
||||
else -> state.chooseValueIgnoreCompat(
|
||||
normal = iconNormal,
|
||||
disabled = iconDisabled,
|
||||
focused = iconFocused,
|
||||
pressed = iconPressed,
|
||||
hovered = iconHovered,
|
||||
active = iconNormal,
|
||||
@@ -151,7 +142,6 @@ class TabContentAlpha(
|
||||
else -> state.chooseValueIgnoreCompat(
|
||||
normal = labelNormal,
|
||||
disabled = labelDisabled,
|
||||
focused = labelFocused,
|
||||
pressed = labelPressed,
|
||||
hovered = labelHovered,
|
||||
active = labelNormal,
|
||||
@@ -167,7 +157,6 @@ class TabContentAlpha(
|
||||
private fun <T> TabState.chooseValueIgnoreCompat(
|
||||
normal: T,
|
||||
disabled: T,
|
||||
focused: T,
|
||||
pressed: T,
|
||||
hovered: T,
|
||||
active: T,
|
||||
@@ -176,7 +165,6 @@ private fun <T> TabState.chooseValueIgnoreCompat(
|
||||
!isEnabled -> disabled
|
||||
isPressed -> pressed
|
||||
isHovered -> hovered
|
||||
isFocused -> focused
|
||||
isActive -> active
|
||||
else -> normal
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ import org.w3c.dom.Element
|
||||
@Immutable
|
||||
sealed interface PainterHint {
|
||||
|
||||
fun canApplyTo(path: String): Boolean = true
|
||||
fun PainterProviderScope.canApply(): Boolean = true
|
||||
|
||||
/**
|
||||
* An empty [PainterHint], it will be ignored.
|
||||
*/
|
||||
companion object None : PainterHint {
|
||||
|
||||
override fun canApplyTo(path: String): Boolean = false
|
||||
override fun PainterProviderScope.canApply(): Boolean = false
|
||||
|
||||
override fun toString(): String = "None"
|
||||
}
|
||||
@@ -39,7 +39,7 @@ sealed interface PainterHint {
|
||||
@Immutable
|
||||
interface SvgPainterHint : PainterHint {
|
||||
|
||||
override fun canApplyTo(path: String): Boolean = path.substringAfterLast('.').lowercase() == "svg"
|
||||
override fun PainterProviderScope.canApply(): Boolean = path.substringAfterLast('.').lowercase() == "svg"
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ interface SvgPainterHint : PainterHint {
|
||||
@Immutable
|
||||
interface BitmapPainterHint : PainterHint {
|
||||
|
||||
override fun canApplyTo(path: String): Boolean = when (path.substringAfterLast('.').lowercase()) {
|
||||
override fun PainterProviderScope.canApply(): Boolean = when (path.substringAfterLast('.').lowercase()) {
|
||||
"svg", "xml" -> false
|
||||
else -> true
|
||||
}
|
||||
@@ -60,7 +60,7 @@ interface BitmapPainterHint : PainterHint {
|
||||
@Immutable
|
||||
interface XmlPainterHint : PainterHint {
|
||||
|
||||
override fun canApplyTo(path: String): Boolean = path.substringAfterLast('.').lowercase() == "xml"
|
||||
override fun PainterProviderScope.canApply(): Boolean = path.substringAfterLast('.').lowercase() == "xml"
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,20 +74,7 @@ interface PainterPathHint : PainterHint {
|
||||
/**
|
||||
* Replace the entire path with the given value.
|
||||
*/
|
||||
fun patch(path: String): String
|
||||
}
|
||||
|
||||
/**
|
||||
* A [PainterHint] that modifies the module/jar path of the resource being loaded.
|
||||
* Main used in bridge mode.
|
||||
*/
|
||||
@Immutable
|
||||
interface PainterResourcePathHint : PainterHint {
|
||||
|
||||
/**
|
||||
* Patch the resource path with context classLoaders(for bridge module).
|
||||
*/
|
||||
fun patch(path: String, classLoaders: List<ClassLoader>): String
|
||||
fun PainterProviderScope.patch(): String
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,13 +87,13 @@ interface PainterSvgPatchHint : SvgPainterHint {
|
||||
/**
|
||||
* Patch the SVG content.
|
||||
*/
|
||||
fun patch(element: Element)
|
||||
fun PainterProviderScope.patch(element: Element)
|
||||
}
|
||||
|
||||
@Immutable
|
||||
interface PainterWrapperHint : PainterHint {
|
||||
|
||||
fun wrap(painter: Painter): Painter
|
||||
fun PainterProviderScope.wrap(painter: Painter): Painter
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +105,7 @@ interface PainterWrapperHint : PainterHint {
|
||||
@Immutable
|
||||
abstract class PainterPrefixHint : PainterPathHint {
|
||||
|
||||
override fun patch(path: String): String = buildString {
|
||||
override fun PainterProviderScope.patch(): String = buildString {
|
||||
append(path.substringBeforeLast('/', ""))
|
||||
append('/')
|
||||
append(prefix())
|
||||
@@ -128,7 +115,7 @@ abstract class PainterPrefixHint : PainterPathHint {
|
||||
append(path.substringAfterLast('.'))
|
||||
}
|
||||
|
||||
abstract fun prefix(): String
|
||||
abstract fun PainterProviderScope.prefix(): String
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,7 +127,7 @@ abstract class PainterPrefixHint : PainterPathHint {
|
||||
@Immutable
|
||||
abstract class PainterSuffixHint : PainterPathHint {
|
||||
|
||||
override fun patch(path: String): String = buildString {
|
||||
override fun PainterProviderScope.patch(): String = buildString {
|
||||
append(path.substringBeforeLast('/', ""))
|
||||
append('/')
|
||||
append(path.substringBeforeLast('.').substringAfterLast('/'))
|
||||
@@ -150,5 +137,5 @@ abstract class PainterSuffixHint : PainterPathHint {
|
||||
append(path.substringAfterLast('.'))
|
||||
}
|
||||
|
||||
abstract fun suffix(): String
|
||||
abstract fun PainterProviderScope.suffix(): String
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.jetbrains.jewel.ui.painter
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.Immutable
|
||||
import androidx.compose.runtime.staticCompositionLocalOf
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import org.jetbrains.jewel.foundation.theme.JewelTheme
|
||||
import org.jetbrains.jewel.ui.painter.hints.Dark
|
||||
import org.jetbrains.jewel.ui.painter.hints.HiDpi
|
||||
@@ -39,7 +38,7 @@ object CommonPainterHintsProvider : PainterHintsProvider {
|
||||
|
||||
@Composable
|
||||
override fun hints(path: String): List<PainterHint> = listOf(
|
||||
HiDpi(LocalDensity.current),
|
||||
HiDpi(),
|
||||
Dark(JewelTheme.isDark),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.jetbrains.jewel.ui.painter
|
||||
|
||||
import androidx.compose.ui.unit.Density
|
||||
|
||||
interface PainterProviderScope : Density {
|
||||
|
||||
val rawPath: String
|
||||
|
||||
val path: String
|
||||
|
||||
val acceptedHints: List<PainterHint>
|
||||
}
|
||||
|
||||
interface ResourcePainterProviderScope : PainterProviderScope {
|
||||
|
||||
val classLoaders: Set<ClassLoader>
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.jetbrains.jewel.ui.painter
|
||||
|
||||
import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
|
||||
class ResizedPainter(private val delegate: Painter, private val size: Size) : DelegatePainter(delegate) {
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = size
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
drawDelegate()
|
||||
}
|
||||
}
|
||||