diff --git a/core/src/main/kotlin/org/jetbrains/jewel/CircularProgressIndicator.kt b/core/src/main/kotlin/org/jetbrains/jewel/CircularProgressIndicator.kt index d1139586ca..2c68ba458b 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/CircularProgressIndicator.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/CircularProgressIndicator.kt @@ -1,5 +1,6 @@ package org.jetbrains.jewel +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -8,34 +9,180 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.takeOrElse +import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp import kotlinx.coroutines.delay import org.jetbrains.jewel.styling.CircularProgressStyle +import org.jetbrains.jewel.util.toHexString @Composable fun CircularProgressIndicator( modifier: Modifier = Modifier, + svgLoader: SvgLoader, style: CircularProgressStyle = IntelliJTheme.circularProgressStyle, ) { - var currentFrame by remember { mutableStateOf(style.frameIcons.frames.first()) } + CircularProgressIndicatorImpl( + modifier = modifier, + svgLoader = svgLoader, + style = style, + iconSize = DpSize(16.dp, 16.dp), + frameRetriever = { color -> SpinnerProgressIconGenerator.Small.generateSvgFrames(color.toHexString()) } + ) +} - Icon( +@Composable +fun CircularProgressIndicatorBig( + modifier: Modifier = Modifier, + svgLoader: SvgLoader, + style: CircularProgressStyle = IntelliJTheme.circularProgressStyle, +) { + CircularProgressIndicatorImpl( modifier = modifier, - painter = currentFrame, - contentDescription = null, + svgLoader = svgLoader, + style = style, + iconSize = DpSize(32.dp, 32.dp), + frameRetriever = { color -> SpinnerProgressIconGenerator.Big.generateSvgFrames(color.toHexString()) } ) +} + +@Composable +private fun CircularProgressIndicatorImpl( + modifier: Modifier = Modifier, + svgLoader: SvgLoader, + iconSize: DpSize, + style: CircularProgressStyle, + frameRetriever: (Color) -> List, +) { + val defaultColor = if (IntelliJTheme.isDark) Color(0xFF6F737A) else Color(0xFFA8ADBD) + var isFrameReady by remember { mutableStateOf(false) } + var currentFrame: Pair by remember { mutableStateOf("" to 0) } + + if (!isFrameReady) { + Box(modifier.size(iconSize)) + } else { + Icon( + modifier = modifier.size(iconSize), + painter = svgLoader.loadRawSvg( + currentFrame.first, + "circularProgressIndicator_frame_${currentFrame.second}" + ), + contentDescription = null, + ) + } - LaunchedEffect(Unit) { + LaunchedEffect(style.color) { + val frames = frameRetriever(style.color.takeOrElse { defaultColor }) while (true) { - for (i in 0 until style.frameIcons.frames.size) { - currentFrame = style.frameIcons.frames[i] + for (i in 0 until frames.size) { + currentFrame = frames[i] to i + isFrameReady = true delay(style.frameTime.inWholeMilliseconds) } } } } -@Composable -fun CircularProgressIndicatorBig() { - CircularProgressIndicator(modifier = Modifier.size(32.dp), style = IntelliJTheme.circularProgressBigStyle) +object SpinnerProgressIconGenerator { + + private val opacityList = listOf(1.0f, 0.93f, 0.78f, 0.69f, 0.62f, 0.48f, 0.38f, 0.0f) + + private val rotations = listOf(0, -45, 0, 45, 0, -45, 0, 45) + + // for a 16x16 icon + private val points = listOf( + 7f to 1f, + 2.34961f to 3.76416f, + 1f to 7f, + 5.17871f to 9.40991f, + 7f to 11f, + 9.41016f to 10.8242f, + 11f to 7f, + 12.2383f to 2.34961f, + ) + + private fun StringBuilder.closeRoot() = append("") + private fun StringBuilder.openRoot(sizePx: Int) = append( + "" + ) + + private fun generateSvgIcon( + step: Int, + pointList: List>, + colorHex: String, + thickness: Int, + length: Int, + cornerRadius: Int, + ) = + buildString { + openRoot(16) + for (index in 0..opacityList.lastIndex) { + val currentIndex = (index + step + 1) % opacityList.size + val currentOpacity = opacityList[currentIndex] + if (currentOpacity == 0.0f) continue + element( + colorHex = colorHex, + opacity = currentOpacity, + x = pointList[index].first, + y = pointList[index].second, + width = thickness, + height = length, + rx = cornerRadius, + rotation = rotations[index], + ) + } + closeRoot() + } + + private fun StringBuilder.element( + colorHex: String, + opacity: Float, + x: Float, + y: Float, + width: Int, + height: Int, + rx: Int, + rotation: Int, + ) { + append("\n") + } + + object Small { + + fun generateSvgFrames(colorHex: String) = buildList { + for (index in 0..opacityList.lastIndex) { + add( + generateSvgIcon( + step = index, + pointList = points, + colorHex = colorHex, + thickness = 2, + length = 4, + cornerRadius = 1 + ) + ) + } + } + } + + object Big { + + fun generateSvgFrames(colorHex: String) = buildList { + for (index in 0..opacityList.lastIndex) { + add( + generateSvgIcon( + step = index, + pointList = points.map { it.first * 2f to it.second * 2f }, + colorHex = colorHex, + thickness = 4, + length = 8, + cornerRadius = 2, + ) + ) + } + } + } } diff --git a/core/src/main/kotlin/org/jetbrains/jewel/IntelliJComponentStyling.kt b/core/src/main/kotlin/org/jetbrains/jewel/IntelliJComponentStyling.kt index 94addf77f0..08a232f8fc 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/IntelliJComponentStyling.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/IntelliJComponentStyling.kt @@ -38,7 +38,6 @@ class IntelliJComponentStyling( val textAreaStyle: TextAreaStyle, val textFieldStyle: TextFieldStyle, val circularProgressStyle: CircularProgressStyle, - val circularProgressBigStyle: CircularProgressStyle, ) { override fun equals(other: Any?): Boolean { @@ -65,7 +64,6 @@ class IntelliJComponentStyling( if (defaultTabStyle != other.defaultTabStyle) return false if (editorTabStyle != other.editorTabStyle) return false if (circularProgressStyle != other.circularProgressStyle) return false - if (circularProgressBigStyle != other.circularProgressBigStyle) return false return true } @@ -89,7 +87,6 @@ class IntelliJComponentStyling( result = 31 * result + defaultTabStyle.hashCode() result = 31 * result + editorTabStyle.hashCode() result = 31 * result + circularProgressStyle.hashCode() - result = 31 * result + circularProgressBigStyle.hashCode() return result } @@ -101,5 +98,5 @@ class IntelliJComponentStyling( "lazyTreeStyle=$lazyTreeStyle, linkStyle=$linkStyle, menuStyle=$menuStyle, " + "outlinedButtonStyle=$outlinedButtonStyle, radioButtonStyle=$radioButtonStyle, " + "scrollbarStyle=$scrollbarStyle, textAreaStyle=$textAreaStyle, textFieldStyle=$textFieldStyle" + - "circularProgressStyle=$circularProgressStyle), circularProgressBigStyle=$circularProgressBigStyle)" + "circularProgressStyle=$circularProgressStyle)" } diff --git a/core/src/main/kotlin/org/jetbrains/jewel/IntelliJTheme.kt b/core/src/main/kotlin/org/jetbrains/jewel/IntelliJTheme.kt index 74bd5ba911..e036ab87e8 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/IntelliJTheme.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/IntelliJTheme.kt @@ -182,11 +182,6 @@ interface IntelliJTheme { @Composable @ReadOnlyComposable get() = LocalCircularProgressStyle.current - - val circularProgressBigStyle: CircularProgressStyle - @Composable - @ReadOnlyComposable - get() = LocalCircularProgressStyle.current } } diff --git a/core/src/main/kotlin/org/jetbrains/jewel/styling/CircularProgressStyle.kt b/core/src/main/kotlin/org/jetbrains/jewel/styling/CircularProgressStyle.kt index 9a21a46b01..6c4c77b604 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/styling/CircularProgressStyle.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/styling/CircularProgressStyle.kt @@ -1,26 +1,14 @@ package org.jetbrains.jewel.styling -import androidx.compose.runtime.Immutable import androidx.compose.runtime.staticCompositionLocalOf -import androidx.compose.ui.graphics.painter.Painter +import androidx.compose.ui.graphics.Color import kotlin.time.Duration interface CircularProgressStyle { - - val frameIcons: CircularProgressIcons val frameTime: Duration -} - -@Immutable -interface CircularProgressIcons { - - val frames: List + val color: Color } val LocalCircularProgressStyle = staticCompositionLocalOf { error("No CircularProgressIndicatorStyle provided") } - -val LocalCircularProgressBigStyle = staticCompositionLocalOf { - error("No CircularProgressIndicatorBigStyle provided") -} diff --git a/core/src/main/kotlin/org/jetbrains/jewel/util/ColorExtensions.kt b/core/src/main/kotlin/org/jetbrains/jewel/util/ColorExtensions.kt new file mode 100644 index 0000000000..f2da077e4d --- /dev/null +++ b/core/src/main/kotlin/org/jetbrains/jewel/util/ColorExtensions.kt @@ -0,0 +1,22 @@ +package org.jetbrains.jewel.util + +import androidx.compose.ui.graphics.Color +import kotlin.math.roundToInt + +fun Color.toHexString(): String { + val r = Integer.toHexString((red * 255).roundToInt()) + val g = Integer.toHexString((green * 255).roundToInt()) + val b = Integer.toHexString((blue * 255).roundToInt()) + + return buildString { + append('#') + append(r.padStart(2, '0')) + append(g.padStart(2, '0')) + append(b.padStart(2, '0')) + + if (alpha != 1.0f) { + val a = Integer.toHexString((alpha * 255).roundToInt()) + append(a.padStart(2, '0')) + } + } +} 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 0b111b8c47..1a6bf9c970 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 @@ -86,10 +86,7 @@ import org.jetbrains.jewel.intui.standalone.styling.IntUiTextAreaStyle import org.jetbrains.jewel.intui.standalone.styling.IntUiTextFieldColors import org.jetbrains.jewel.intui.standalone.styling.IntUiTextFieldMetrics import org.jetbrains.jewel.intui.standalone.styling.IntUiTextFieldStyle -import org.jetbrains.jewel.intui.standalone.styling.intUiCircularProgressIcons import org.jetbrains.jewel.styling.InputFieldStyle -import org.jetbrains.jewel.util.SpinnerProgressIconGenerator -import org.jetbrains.jewel.util.toHex import org.jetbrains.skiko.DependsOnJBR import javax.swing.UIManager import kotlin.time.Duration.Companion.milliseconds @@ -165,8 +162,7 @@ internal fun createSwingIntUiComponentStyling( radioButtonStyle = readRadioButtonStyle(theme.iconData, svgLoader), scrollbarStyle = readScrollbarStyle(theme.isDark), textAreaStyle = readTextAreaStyle(textAreaTextStyle, textFieldStyle.metrics), - circularProgressStyle = readCircularProgressStyle(svgLoader, theme.isDark), - circularProgressBigStyle = readCircularProgressBigStyle(svgLoader, theme.isDark), + circularProgressStyle = readCircularProgressStyle(theme.isDark), textFieldStyle = textFieldStyle, ) } @@ -890,39 +886,11 @@ private fun readEditorTabStyle(iconData: IntelliJThemeIconData, svgLoader: SvgLo } private fun readCircularProgressStyle( - svgLoader: SvgLoader, isDark: Boolean, ): IntUiCircularProgressStyle = IntUiCircularProgressStyle( frameTime = 125.milliseconds, - frameIcons = - intUiCircularProgressIcons( - svgLoader, - SpinnerProgressIconGenerator.Small - .generateRawSvg( - retrieveColorOrUnspecified("ProgressIcon.color") - .takeIf { it.isSpecified } - ?.toHex() - ?: if (isDark) "#6F737A" else "#A8ADBD" - ), - ), - ) - -private fun readCircularProgressBigStyle( - svgLoader: SvgLoader, - isDark: Boolean, -) = - IntUiCircularProgressStyle( - frameTime = 125.milliseconds, - frameIcons = - intUiCircularProgressIcons( - svgLoader, - SpinnerProgressIconGenerator.Big - .generateRawSvg( - retrieveColorOrUnspecified("ProgressIcon.color") - .takeIf { it.isSpecified } - ?.toHex() - ?: if (isDark) "#6F737A" else "#A8ADBD" - ), - ), + color = retrieveColorOrUnspecified("ProgressIcon.color") + .takeIf { it.isSpecified } + ?: if (isDark) Color(0xFF6F737A) else Color(0xFFA8ADBD), ) diff --git a/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt b/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt index 4e72493d18..6e5c37dc82 100644 --- a/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt +++ b/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/BaseIntUiTheme.kt @@ -31,7 +31,6 @@ import org.jetbrains.jewel.styling.LazyTreeStyle import org.jetbrains.jewel.styling.LinkStyle import org.jetbrains.jewel.styling.LocalCheckboxStyle import org.jetbrains.jewel.styling.LocalChipStyle -import org.jetbrains.jewel.styling.LocalCircularProgressBigStyle import org.jetbrains.jewel.styling.LocalCircularProgressStyle import org.jetbrains.jewel.styling.LocalDefaultButtonStyle import org.jetbrains.jewel.styling.LocalDefaultTabStyle @@ -230,7 +229,6 @@ fun BaseIntUiTheme( LocalEditorTabStyle provides componentStyling.editorTabStyle, LocalIndication provides NoIndication, LocalCircularProgressStyle provides componentStyling.circularProgressStyle, - LocalCircularProgressBigStyle provides componentStyling.circularProgressBigStyle, ) { IntelliJTheme(theme, swingCompatMode, content) } diff --git a/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/IntelliJSvgPatcher.kt b/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/IntelliJSvgPatcher.kt index 7ca6db7f54..dfa88a4a66 100644 --- a/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/IntelliJSvgPatcher.kt +++ b/int-ui/int-ui-core/src/main/kotlin/org/jetbrains/jewel/intui/core/IntelliJSvgPatcher.kt @@ -4,6 +4,7 @@ import androidx.compose.runtime.Immutable import androidx.compose.ui.graphics.Color import org.jetbrains.jewel.PaletteMapper import org.jetbrains.jewel.SvgPatcher +import org.jetbrains.jewel.util.toHexString import org.w3c.dom.Document import org.w3c.dom.Element import java.io.IOException @@ -63,24 +64,6 @@ class IntelliJSvgPatcher(private val mapper: PaletteMapper) : SvgPatcher { } } - private fun Color.toHexString(): String { - val r = Integer.toHexString((red * 255).roundToInt()) - val g = Integer.toHexString((green * 255).roundToInt()) - val b = Integer.toHexString((blue * 255).roundToInt()) - - return buildString { - append('#') - append(r.padStart(2, '0')) - append(g.padStart(2, '0')) - append(b.padStart(2, '0')) - - if (alpha != 1.0f) { - val a = Integer.toHexString((alpha * 255).roundToInt()) - append(a.padStart(2, '0')) - } - } - } - private fun tryParseColor(color: String, alpha: Float): Color? { val rawColor = color.lowercase() if (rawColor.startsWith("#") && rawColor.length - 1 <= 8) { diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt index cce95e336a..8fc6c3a8ce 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/IntUiTheme.kt @@ -130,8 +130,7 @@ object IntUiTheme : BaseIntUiTheme { lazyTreeStyle: LazyTreeStyle = IntUiLazyTreeStyle.dark(svgLoader), defaultTabStyle: TabStyle = IntUiTabStyle.Default.dark(svgLoader), editorTabStyle: TabStyle = IntUiTabStyle.Editor.dark(svgLoader), - circularProgressStyle: CircularProgressStyle = IntUiCircularProgressStyle.Small.dark(svgLoader), - circularProgressBigStyle: CircularProgressStyle = IntUiCircularProgressStyle.Big.dark(svgLoader), + circularProgressStyle: CircularProgressStyle = IntUiCircularProgressStyle.dark(), ) = IntelliJComponentStyling( checkboxStyle = checkboxStyle, @@ -152,7 +151,6 @@ object IntUiTheme : BaseIntUiTheme { textAreaStyle = textAreaStyle, textFieldStyle = textFieldStyle, circularProgressStyle = circularProgressStyle, - circularProgressBigStyle = circularProgressBigStyle, ) @Composable @@ -175,8 +173,7 @@ object IntUiTheme : BaseIntUiTheme { lazyTreeStyle: LazyTreeStyle = IntUiLazyTreeStyle.light(svgLoader), defaultTabStyle: TabStyle = IntUiTabStyle.Default.light(svgLoader), editorTabStyle: TabStyle = IntUiTabStyle.Editor.light(svgLoader), - circularProgressStyle: CircularProgressStyle = IntUiCircularProgressStyle.Small.light(svgLoader), - circularProgressBigStyle: CircularProgressStyle = IntUiCircularProgressStyle.Big.light(svgLoader), + circularProgressStyle: CircularProgressStyle = IntUiCircularProgressStyle.light(), ) = IntelliJComponentStyling( checkboxStyle = checkboxStyle, chipStyle = chipStyle, @@ -196,7 +193,6 @@ object IntUiTheme : BaseIntUiTheme { textAreaStyle = textAreaStyle, textFieldStyle = textFieldStyle, circularProgressStyle = circularProgressStyle, - circularProgressBigStyle = circularProgressBigStyle, ) } diff --git a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyle.kt b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyle.kt index 27ff43fe99..20d99bb970 100644 --- a/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyle.kt +++ b/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/styling/IntUiCircularProgressStyle.kt @@ -1,78 +1,27 @@ package org.jetbrains.jewel.intui.standalone.styling -import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable -import androidx.compose.ui.graphics.painter.Painter -import org.jetbrains.jewel.SvgLoader -import org.jetbrains.jewel.styling.CircularProgressIcons +import androidx.compose.ui.graphics.Color import org.jetbrains.jewel.styling.CircularProgressStyle -import org.jetbrains.jewel.util.SpinnerProgressIconGenerator import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds @Stable data class IntUiCircularProgressStyle( - override val frameIcons: IntUiCircularProgressIcons, override val frameTime: Duration, + override val color: Color, ) : CircularProgressStyle { - object Small { + companion object { - @Composable fun dark( - svgLoader: SvgLoader, frameTime: Duration = 125.milliseconds, - frameIcons: IntUiCircularProgressIcons = intUiCircularProgressIcons( - svgLoader, - SpinnerProgressIconGenerator.Small.generateRawSvg("#6F737A"), - ), - ) = - IntUiCircularProgressStyle(frameIcons, frameTime) + color: Color = Color(0xFF6F737A), + ) = IntUiCircularProgressStyle(frameTime, color) - @Composable fun light( - svgLoader: SvgLoader, frameTime: Duration = 125.milliseconds, - frameIcons: IntUiCircularProgressIcons = intUiCircularProgressIcons( - svgLoader, - SpinnerProgressIconGenerator.Small.generateRawSvg("#A8ADBD"), - ), - ) = - IntUiCircularProgressStyle(frameIcons, frameTime) - } - - object Big { - - @Composable - fun dark( - svgLoader: SvgLoader, - frameTime: Duration = 125.milliseconds, - frameIcons: IntUiCircularProgressIcons = intUiCircularProgressIcons( - svgLoader, - SpinnerProgressIconGenerator.Big.generateRawSvg("#6F737A"), - ), - ) = IntUiCircularProgressStyle(frameIcons, frameTime) - - @Composable - fun light( - svgLoader: SvgLoader, - frameTime: Duration = 125.milliseconds, - frameIcons: IntUiCircularProgressIcons = intUiCircularProgressIcons( - svgLoader, - SpinnerProgressIconGenerator.Big.generateRawSvg("#A8ADBD"), - ), - ) = - IntUiCircularProgressStyle(frameIcons, frameTime) + color: Color = Color(0xFFA8ADBD), + ) = IntUiCircularProgressStyle(frameTime, color) } } - -data class IntUiCircularProgressIcons( - override val frames: List, -) : CircularProgressIcons - -fun intUiCircularProgressIcons( - svgLoader: SvgLoader, - rawSVGIcons: List, -) = IntUiCircularProgressIcons( - rawSVGIcons.map { svgLoader.loadRawSvg(it, it.hashCode().toString()) } -) 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 b53df9a963..1ade106fdd 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 @@ -83,6 +83,8 @@ internal class JewelDemoToolWindow : ToolWindowFactory, DumbAware { Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(16.dp), ) { + val svgLoader = service().svgLoader + Text("Here is a selection of our finest components:") Row( @@ -134,7 +136,6 @@ internal class JewelDemoToolWindow : ToolWindowFactory, DumbAware { } Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) { - val svgLoader = service().svgLoader val painterProvider = retrieveStatelessIcon("actions/close.svg", svgLoader, IntUiTheme.iconData) val painter by painterProvider.getPainter(resourceLoader) Icon(painter = painter, modifier = Modifier.border(1.dp, Color.Magenta), contentDescription = "An icon") @@ -142,11 +143,11 @@ internal class JewelDemoToolWindow : ToolWindowFactory, DumbAware { Row { Text("Circular progress small: ") - CircularProgressIndicator() + CircularProgressIndicator(svgLoader = svgLoader) } Row(verticalAlignment = Alignment.CenterVertically) { Text("Circular progress big: ") - CircularProgressIndicatorBig() + CircularProgressIndicatorBig(svgLoader = svgLoader) } } }