diff --git a/core/src/main/kotlin/org/jetbrains/jewel/LazyTree.kt b/core/src/main/kotlin/org/jetbrains/jewel/LazyTree.kt index bf7d48a4e..3dce4abe2 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/LazyTree.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/LazyTree.kt @@ -50,8 +50,8 @@ fun LazyTree( onSelectionChange = onSelectionChange, keyActions = keyActions, chevronContent = { elementState -> - val painterProvider = style.icons.nodeChevron(elementState.isExpanded) - val painter by painterProvider.getPainter(resourceLoader, elementState) + val painterProvider = style.icons.chevron(elementState.isExpanded, elementState.isSelected) + val painter by painterProvider.getPainter(resourceLoader) Icon(painter = painter, contentDescription = null) }, ) { diff --git a/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt b/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt index 9b5f343e7..ea382811d 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/Keybindings.kt @@ -100,7 +100,6 @@ open class DefaultSelectableColumnKeybindings : SelectableColumnKeybindings { override val PointerKeyboardModifiers.isKeyboardMultiSelectionKeyPressed: Boolean get() = isShiftPressed - override fun KeyEvent.selectFirstItem() = key == Key.Home && !isKeyboardMultiSelectionKeyPressed @@ -141,5 +140,4 @@ open class DefaultSelectableColumnKeybindings : SelectableColumnKeybindings { override fun KeyEvent.selectAll(): Boolean? = key == Key.A && isKeyboardCtrlMetaKeyPressed - } diff --git a/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyColumn.kt b/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyColumn.kt index 015b1cd13..1bc0aba2c 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyColumn.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyColumn.kt @@ -12,7 +12,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -30,8 +29,8 @@ import org.jetbrains.jewel.foundation.tree.KeyBindingActions import org.jetbrains.jewel.foundation.tree.PointerEventActions /** - * A composable that displays a scrollable and selectable list of items in a column arrangement. - * + * A composable that displays a scrollable and selectable list of items in + * a column arrangement. */ @Composable fun SelectableLazyColumn( @@ -49,8 +48,6 @@ fun SelectableLazyColumn( interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, content: SelectableLazyListScope.() -> Unit, ) { - val scope = rememberCoroutineScope() - val container = remember(content) { SelectableLazyListScopeContainer().apply(content) } @@ -77,7 +74,7 @@ fun SelectableLazyColumn( .focusRequester(focusRequester) .focusable(interactionSource = interactionSource) .onPreviewKeyEvent { event -> - state.lastActiveItemIndex?.let { _ -> + if (state.lastActiveItemIndex != null) { keyActions.handleOnKeyEvent(event, keys, state, selectionMode).invoke(event) } true diff --git a/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyListScope.kt b/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyListScope.kt index 290e1ec50..dab700a25 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyListScope.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/SelectableLazyListScope.kt @@ -162,13 +162,15 @@ fun SelectableLazyListScope.itemsIndexed( contentType: (index: Int, item: T) -> Any? = { _, item -> item }, selectable: (index: Int, item: T) -> Boolean = { _, _ -> true }, itemContent: @Composable SelectableLazyItemScope.(index: Int, item: T) -> Unit, -) = items( - count = items.size, - key = { key(it, items[it]) }, - contentType = { contentType(it, items[it]) }, - selectable = { selectable(it, items[it]) }, - itemContent = { itemContent(it, items[it]) } -) +) { + items( + count = items.size, + key = { key(it, items[it]) }, + contentType = { contentType(it, items[it]) }, + selectable = { selectable(it, items[it]) }, + itemContent = { itemContent(it, items[it]) }, + ) +} @Composable fun LazyItemScope.SelectableLazyItemScope( diff --git a/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt b/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt index 2d2f87a24..148972856 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt @@ -106,7 +106,7 @@ fun BasicLazyTree( .asSequence() .filter { it.id in treeState.delegate.selectedKeys } .map { element -> element as Tree.Element } - .toList() + .toList(), ) } diff --git a/core/src/main/kotlin/org/jetbrains/jewel/styling/LazyTreeStyling.kt b/core/src/main/kotlin/org/jetbrains/jewel/styling/LazyTreeStyling.kt index 485af660c..4055bfa92 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/styling/LazyTreeStyling.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/styling/LazyTreeStyling.kt @@ -56,12 +56,19 @@ interface LazyTreeMetrics { @Immutable interface LazyTreeIcons { - val nodeChevronCollapsed: PainterProvider - val nodeChevronExpanded: PainterProvider + val chevronCollapsed: PainterProvider + val chevronExpanded: PainterProvider + val chevronSelectedCollapsed: PainterProvider + val chevronSelectedExpanded: PainterProvider @Composable - fun nodeChevron(isExpanded: Boolean) = - if (isExpanded) nodeChevronExpanded else nodeChevronCollapsed + fun chevron(isExpanded: Boolean, isSelected: Boolean) = + when { + isSelected && isExpanded -> chevronSelectedExpanded + isSelected && !isExpanded -> chevronSelectedCollapsed + !isSelected && isExpanded -> chevronExpanded + else -> chevronCollapsed + } } val LocalLazyTreeStyle = staticCompositionLocalOf { diff --git a/core/src/main/kotlin/org/jetbrains/jewel/styling/PainterProvider.kt b/core/src/main/kotlin/org/jetbrains/jewel/styling/PainterProvider.kt index 3047d789e..ff0779d9d 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/styling/PainterProvider.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/styling/PainterProvider.kt @@ -9,6 +9,29 @@ import androidx.compose.ui.res.ResourceLoader @Immutable interface PainterProvider { + /** + * Obtain a painter, with no extra data. It is equivalent to calling + * [getPainter] with a `null` value for the `extraData` argument. This + * overload should only be used for stateless painter providers (i.e., when + * [T] is [Unit]). + * + * A [resourceLoader] that allows loading the corresponding resource must + * be loading. For example, if your resource is in module `my-module`'s + * resources, the [resourceLoader] must be pointing to `my-module`s + * classloader. + * + * Passing the wrong [ResourceLoader] will cause your resources not to + * load, and you will get cryptic errors. Please also note that using + * [ResourceLoader.Default] will probably cause loading to fail if you are + * trying to load the icons from a different module. For example, if Jewel + * is running in the IDE and you use [ResourceLoader.Default] to try and + * load a default IDE resource, it will fail. + * + * @see getPainter + */ + @Composable + fun getPainter(resourceLoader: ResourceLoader): State = getPainter(resourceLoader, null) + /** * Obtain a painter for the provided [extraData]. * diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt index f371e74ee..3c69af4a1 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/BridgeIconData.kt @@ -39,8 +39,8 @@ internal class BridgeIconData( fun readFromLaF(): BridgeIconData { val uiTheme = currentUiThemeOrNull() - val iconMap = uiTheme?.icons ?: emptyMap() - val selectedIconColorPalette = uiTheme?.selectedIconColorPalette ?: emptyMap() + val iconMap = uiTheme?.icons.orEmpty() + val selectedIconColorPalette = uiTheme?.selectedIconColorPalette.orEmpty() val colorPalette = UITheme.getColorPalette() return BridgeIconData(iconMap, colorPalette, selectedIconColorPalette) diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntUiBridge.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntUiBridge.kt index 7443c338e..5ffe23d04 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntUiBridge.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/IntUiBridge.kt @@ -728,11 +728,22 @@ private fun readLazyTreeStyle(iconData: IntelliJThemeIconData, svgLoader: SvgLoa elementBackgroundSelectedFocused = selectedElementBackground, ) + val chevronCollapsed = retrieveStatelessIcon( + iconPath = "${iconsBasePath}general/chevron-right.svg", + iconData = iconData, + svgLoader = svgLoader, + ) + val chevronExpanded = retrieveStatelessIcon( + iconPath = "${iconsBasePath}general/chevron-down.svg", + iconData = iconData, + svgLoader = svgLoader, + ) + return IntUiLazyTreeStyle( colors = colors, metrics = IntUiLazyTreeMetrics( indentSize = retrieveIntAsDpOrUnspecified("Tree.leftChildIndent").takeOrElse { 7.dp } + - retrieveIntAsDpOrUnspecified("Tree.rightChildIndent").takeOrElse { 11.dp }, + retrieveIntAsDpOrUnspecified("Tree.rightChildIndent").takeOrElse { 11.dp }, elementBackgroundCornerSize = CornerSize(JBUI.CurrentTheme.Tree.ARC.dp / 2), elementPadding = PaddingValues(horizontal = 12.dp), elementContentPadding = PaddingValues(4.dp), @@ -740,16 +751,10 @@ private fun readLazyTreeStyle(iconData: IntelliJThemeIconData, svgLoader: SvgLoa chevronContentGap = 2.dp, // See com.intellij.ui.tree.ui.ClassicPainter.GAP ), icons = IntUiLazyTreeIcons( - nodeChevronCollapsed = retrieveStatefulIcon( - iconPath = "${iconsBasePath}general/chevron-right.svg", - iconData = iconData, - svgLoader = svgLoader, - ), - nodeChevronExpanded = retrieveStatefulIcon( - iconPath = "${iconsBasePath}general/chevron-down.svg", - iconData = iconData, - svgLoader = svgLoader, - ), + chevronCollapsed = chevronCollapsed, + chevronExpanded = chevronExpanded, + chevronSelectedCollapsed = chevronCollapsed, + chevronSelectedExpanded = chevronExpanded, ), ) } diff --git a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt index 134b11ff0..44f60c996 100644 --- a/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt +++ b/ide-laf-bridge/src/main/kotlin/org/jetbrains/jewel/bridge/UiThemeExtensions.kt @@ -20,7 +20,7 @@ internal val UITheme.icons: Map internal val UITheme.iconColorPalette: Map get() = readMapField>(classUITheme.getDeclaredField("icons")) - .get("ColorPalette") ?: emptyMap() + .get("ColorPalette").orEmpty() internal val UITheme.selectedIconColorPalette: Map get() = readMapField(classUITheme.getDeclaredField("iconColorsOnSelection")) @@ -32,7 +32,7 @@ private fun UITheme.readMapField(field: Field): Map { return try { @Suppress("UNCHECKED_CAST") - field.get(this) as? Map ?: emptyMap() + (field.get(this) as? Map).orEmpty() } catch (e: IllegalAccessException) { logger.warn("Error while retrieving LaF", e) emptyMap() diff --git a/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/JewelDemoToolWindow.kt b/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/JewelDemoToolWindow.kt index 3af57653d..2e9d2a1a9 100644 --- a/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/JewelDemoToolWindow.kt +++ b/samples/ide-plugin/src/main/kotlin/org/jetbrains/jewel/samples/ideplugin/JewelDemoToolWindow.kt @@ -40,7 +40,6 @@ import org.jetbrains.jewel.TextField import org.jetbrains.jewel.bridge.SwingBridgeTheme import org.jetbrains.jewel.bridge.addComposeTab import org.jetbrains.jewel.bridge.toComposeColor -import org.jetbrains.jewel.foundation.tree.InitialNodeStatus import org.jetbrains.jewel.foundation.tree.buildTree import org.jetbrains.jewel.themes.intui.standalone.IntUiTheme @@ -212,7 +211,6 @@ internal class JewelDemoToolWindow : ToolWindowFactory, DumbAware { } LazyTree( tree = tree, - initialNodeStatus = InitialNodeStatus.Open, resourceLoader = resourceLoader, modifier = Modifier.height(200.dp).fillMaxWidth(), onElementClick = {}, diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt index 1fa8124ce..6205145db 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/components/ChipsAndTree.kt @@ -1,6 +1,7 @@ package org.jetbrains.jewel.samples.standalone.components import androidx.compose.foundation.background +import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.focusable import androidx.compose.foundation.interaction.MutableInteractionSource @@ -12,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -28,22 +30,23 @@ import org.jetbrains.jewel.RadioButtonChip import org.jetbrains.jewel.Text import org.jetbrains.jewel.ToggleableChip import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn -import org.jetbrains.jewel.foundation.tree.InitialNodeStatus import org.jetbrains.jewel.foundation.tree.buildTree +import org.jetbrains.jewel.themes.intui.standalone.IntUiTheme @Composable fun ChipsAndTree() { - Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { - Column { - GroupHeader(text = "Chips", modifier = Modifier.width(300.dp)) - ChipsRow(Modifier.padding(8.dp)) + Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) { + Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) { + GroupHeader(text = "Chips", modifier = Modifier.fillMaxWidth()) + ChipsSample(Modifier.padding(8.dp)) } - Column { - GroupHeader("Tree", modifier = Modifier.width(300.dp)) + + Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) { + GroupHeader("Tree", modifier = Modifier.fillMaxWidth()) TreeSample() } - Column { + Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(8.dp)) { GroupHeader("SelectableLazyColumn", modifier = Modifier.width(300.dp)) SelectableLazyColumnSample() } @@ -53,9 +56,7 @@ fun ChipsAndTree() { @Composable fun SelectableLazyColumnSample() { val listOfItems = remember { - (5000..10000).random().let { size -> - List(size) { "Item $it" } - } + List((5000..10000).random()) { "Item $it" } } val interactionSource = remember { MutableInteractionSource() } SelectableLazyColumn( @@ -87,58 +88,63 @@ fun SelectableLazyColumnSample() { } @Composable -fun ChipsRow(modifier: Modifier = Modifier) { - Row(modifier, horizontalArrangement = Arrangement.spacedBy(8.dp)) { - var selectedIndex by remember { mutableStateOf(-1) } - RadioButtonChip( - selected = selectedIndex == 0, - onClick = { selectedIndex = 0 }, - enabled = true, - ) { - Text("First") - } +fun ChipsSample(modifier: Modifier = Modifier) { + Column(modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) { + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + var selectedIndex by remember { mutableStateOf(-1) } + RadioButtonChip( + selected = selectedIndex == 0, + onClick = { selectedIndex = 0 }, + enabled = true, + ) { + Text("First") + } - RadioButtonChip( - selected = selectedIndex == 1, - onClick = { selectedIndex = 1 }, - enabled = true, - ) { - Text("Second") - } + RadioButtonChip( + selected = selectedIndex == 1, + onClick = { selectedIndex = 1 }, + enabled = true, + ) { + Text("Second") + } - RadioButtonChip( - selected = selectedIndex == 2, - onClick = { selectedIndex = 2 }, - enabled = true, - ) { - Text("Third") - } - } - Row(modifier, horizontalArrangement = Arrangement.spacedBy(8.dp)) { - var isChecked by remember { mutableStateOf(false) } - ToggleableChip( - checked = isChecked, - onClick = { - isChecked = it - }, - enabled = true, - ) { - Text("Toggleable") + RadioButtonChip( + selected = selectedIndex == 2, + onClick = { selectedIndex = 2 }, + enabled = true, + ) { + Text("Third") + } } - var count by remember { mutableStateOf(1) } - Chip( - enabled = true, - onClick = { count++ }, - ) { - Text("Clicks: $count") + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + var isChecked by remember { mutableStateOf(false) } + ToggleableChip( + checked = isChecked, + onClick = { + isChecked = it + }, + enabled = true, + ) { + Text("Toggleable") + } + + var count by remember { mutableStateOf(1) } + Chip( + enabled = true, + onClick = { count++ }, + ) { + Text("Clicks: $count") + } } - Chip( - enabled = false, - onClick = {}, - ) { - Text("Disabled") + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Chip( + enabled = false, + onClick = {}, + ) { + Text("Disabled") + } } } } @@ -152,29 +158,38 @@ fun TreeSample(modifier: Modifier = Modifier) { addLeaf("leaf 2") } addNode("root 2") { - addLeaf("leaf 1") + addLeaf("leaf 2.1") addNode("node 1") { - addLeaf("leaf 1") - addLeaf("leaf 2") + addLeaf("subleaf 1") + addLeaf("subleaf 2") } } addNode("root 3") { - addLeaf("leaf 1") - addLeaf("leaf 2") + addLeaf("leaf 3.1") + addLeaf("leaf 3.2") } } } + val resourceLoader = LocalResourceLoader.current - LazyTree( - tree = tree, - initialNodeStatus = InitialNodeStatus.Open, - resourceLoader = resourceLoader, - modifier = Modifier.size(200.dp, 200.dp).then(modifier), - onElementClick = {}, - onElementDoubleClick = {}, - ) { element -> - Box(Modifier.fillMaxWidth()) { - Text(element.data, Modifier.padding(2.dp)) + val borderColor = + if (IntUiTheme.isDark) { + IntUiTheme.colorPalette.grey(3) + } else { + IntUiTheme.colorPalette.grey(12) + } + + Box(modifier.border(1.dp, borderColor, RoundedCornerShape(2.dp))) { + LazyTree( + tree = tree, + resourceLoader = resourceLoader, + modifier = Modifier.size(200.dp, 200.dp), + onElementClick = {}, + onElementDoubleClick = {}, + ) { element -> + Box(Modifier.fillMaxWidth()) { + Text(element.data, Modifier.padding(2.dp)) + } } } } diff --git a/themes/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/themes/intui/standalone/styling/IntUiLazyTreeStyling.kt b/themes/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/themes/intui/standalone/styling/IntUiLazyTreeStyling.kt index 69c543db2..07f047280 100644 --- a/themes/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/themes/intui/standalone/styling/IntUiLazyTreeStyling.kt +++ b/themes/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/themes/intui/standalone/styling/IntUiLazyTreeStyling.kt @@ -9,7 +9,6 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import org.jetbrains.jewel.SvgLoader -import org.jetbrains.jewel.foundation.tree.TreeElementState import org.jetbrains.jewel.styling.LazyTreeColors import org.jetbrains.jewel.styling.LazyTreeIcons import org.jetbrains.jewel.styling.LazyTreeMetrics @@ -111,33 +110,39 @@ data class IntUiLazyTreeMetrics( @Immutable data class IntUiLazyTreeIcons( - override val nodeChevronCollapsed: PainterProvider, - override val nodeChevronExpanded: PainterProvider, + override val chevronCollapsed: PainterProvider, + override val chevronExpanded: PainterProvider, + override val chevronSelectedCollapsed: PainterProvider, + override val chevronSelectedExpanded: PainterProvider, ) : LazyTreeIcons { companion object { @Composable - fun nodeChevronCollapsed( + fun chevronCollapsed( svgLoader: SvgLoader, basePath: String = "icons/intui/chevronRight.svg", - ): PainterProvider = - ResourcePainterProvider.stateful(basePath, svgLoader) + ): PainterProvider = + ResourcePainterProvider.stateless(basePath, svgLoader) @Composable - fun nodeChevronExpanded( + fun chevronExpanded( svgLoader: SvgLoader, basePath: String = "icons/intui/chevronDown.svg", - ): PainterProvider = - ResourcePainterProvider.stateful(basePath, svgLoader) + ): PainterProvider = + ResourcePainterProvider.stateless(basePath, svgLoader) } } @Composable fun intUiLazyTreeIcons( svgLoader: SvgLoader, - nodeChevronCollapsed: PainterProvider = - IntUiLazyTreeIcons.nodeChevronCollapsed(svgLoader), - nodeChevronExpanded: PainterProvider = - IntUiLazyTreeIcons.nodeChevronExpanded(svgLoader), -) = IntUiLazyTreeIcons(nodeChevronCollapsed, nodeChevronExpanded) + chevronCollapsed: PainterProvider = + IntUiLazyTreeIcons.chevronCollapsed(svgLoader), + chevronExpanded: PainterProvider = + IntUiLazyTreeIcons.chevronExpanded(svgLoader), + chevronSelectedCollapsed: PainterProvider = + IntUiLazyTreeIcons.chevronCollapsed(svgLoader), + chevronSelectedExpanded: PainterProvider = + IntUiLazyTreeIcons.chevronExpanded(svgLoader), +) = IntUiLazyTreeIcons(chevronCollapsed, chevronExpanded, chevronSelectedCollapsed, chevronSelectedExpanded)