Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/jewel/samples/showcase/api-dump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ f:org.jetbrains.jewel.samples.showcase.ShowcaseIcons
- f:getGitHub():org.jetbrains.jewel.ui.icon.PathIconKey
- f:getJewelLogo():org.jetbrains.jewel.ui.icon.PathIconKey
- f:getMarkdown():org.jetbrains.jewel.ui.icon.PathIconKey
- f:getSunny():org.jetbrains.jewel.ui.icon.PathIconKey
- f:getThemeDark():org.jetbrains.jewel.ui.icon.PathIconKey
- f:getThemeLight():org.jetbrains.jewel.ui.icon.PathIconKey
- f:getThemeLightWithLightHeader():org.jetbrains.jewel.ui.icon.PathIconKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public object ShowcaseIcons {
PathIconKey("icons/lightWithLightHeaderTheme.svg", ShowcaseIcons::class.java)
public val themeSystem: PathIconKey = PathIconKey("icons/systemTheme.svg", ShowcaseIcons::class.java)
public val welcome: PathIconKey = PathIconKey("icons/meetNewUi.svg", ShowcaseIcons::class.java)
public val sunny: PathIconKey = PathIconKey("icons/sunny.svg", ShowcaseIcons::class.java)

public object Components {
public val banners: PathIconKey = PathIconKey("icons/components/banners.svg", ShowcaseIcons::class.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ 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.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.BlendMode
Expand All @@ -22,12 +26,14 @@ import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.unit.dp
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.samples.showcase.ShowcaseIcons
import org.jetbrains.jewel.ui.component.CheckboxRow
import org.jetbrains.jewel.ui.component.Icon
import org.jetbrains.jewel.ui.component.Image
import org.jetbrains.jewel.ui.component.Text
import org.jetbrains.jewel.ui.icons.AllIconsKeys
import org.jetbrains.jewel.ui.painter.badge.DotBadgeShape
import org.jetbrains.jewel.ui.painter.hints.Badge
import org.jetbrains.jewel.ui.painter.hints.EmbeddedToInlineCssStyleSvgPatchHint
import org.jetbrains.jewel.ui.painter.hints.Size
import org.jetbrains.jewel.ui.painter.hints.Stroke
import org.jetbrains.jewel.ui.theme.colorPalette
Expand Down Expand Up @@ -100,6 +106,28 @@ public fun Icons(modifier: Modifier = Modifier) {
}
}

Column {
var checked by remember { mutableStateOf(true) }

// See JEWEL-1072
CheckboxRow(
text = "Enable embedded CSS styles inlining:",
checked = checked,
onCheckedChange = { checked = it },
)

Spacer(Modifier.height(8.dp))

Row(modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp)) {
Image(
iconKey = ShowcaseIcons.sunny,
contentDescription = "Icon with embedded CSS styles",
hints = if (checked) arrayOf(EmbeddedToInlineCssStyleSvgPatchHint) else emptyArray(),
modifier = Modifier.size(96.dp),
)
}
}

Column {
Text("Images:")

Expand Down
63 changes: 63 additions & 0 deletions platform/jewel/samples/showcase/src/main/resources/icons/sunny.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions platform/jewel/ui/api-dump-experimental.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,10 @@ f:org.jetbrains.jewel.ui.component.search.SpeedSearchableTreeKt
- *sf:SpeedSearchableTree(org.jetbrains.jewel.ui.component.SpeedSearchScope,org.jetbrains.jewel.foundation.lazy.tree.Tree,kotlin.jvm.functions.Function1,androidx.compose.ui.Modifier,org.jetbrains.jewel.foundation.lazy.tree.TreeState,kotlin.jvm.functions.Function1,kotlin.jvm.functions.Function1,kotlin.jvm.functions.Function1,org.jetbrains.jewel.foundation.lazy.tree.KeyActions,org.jetbrains.jewel.ui.component.styling.LazyTreeStyle,kotlinx.coroutines.CoroutineDispatcher,kotlin.jvm.functions.Function4,androidx.compose.runtime.Composer,I,I,I):V
f:org.jetbrains.jewel.ui.component.styling.IconButtonStylingKt
- *sf:getLocalTransparentIconButtonStyle():androidx.compose.runtime.ProvidableCompositionLocal
*f:org.jetbrains.jewel.ui.painter.hints.EmbeddedToInlineCssStyleSvgPatchHint
- org.jetbrains.jewel.ui.painter.PainterSvgPatchHint
- sf:$stable:I
- sf:INSTANCE:org.jetbrains.jewel.ui.painter.hints.EmbeddedToInlineCssStyleSvgPatchHint
- patch(org.jetbrains.jewel.ui.painter.PainterProviderScope,org.w3c.dom.Element):V
f:org.jetbrains.jewel.ui.theme.JewelThemeKt
- *sf:getTransparentIconButtonStyle(org.jetbrains.jewel.foundation.theme.JewelTheme$Companion,androidx.compose.runtime.Composer,I):org.jetbrains.jewel.ui.component.styling.IconButtonStyle
Loading
Loading