Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tab icons not existing anymore in 243 #648

Closed
wants to merge 1 commit into from
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
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ private fun readDefaultTabStyle(): TabStyle {
tabContentSpacing = 4.dp,
tabHeight = retrieveIntAsDpOrUnspecified("TabbedPane.tabHeight").takeOrElse { 24.dp },
),
icons = TabIcons(close = AllIconsKeys.General.CloseSmall),
icons = TabIcons(close = AllIconsKeys.Windows.CloseSmall),
contentAlpha =
TabContentAlpha(
iconNormal = 1f,
Expand Down Expand Up @@ -1112,7 +1112,7 @@ private fun readEditorTabStyle(): TabStyle {
tabContentSpacing = 4.dp,
tabHeight = retrieveIntAsDpOrUnspecified("TabbedPane.tabHeight").takeOrElse { 24.dp },
),
icons = TabIcons(close = AllIconsKeys.General.CloseSmall),
icons = TabIcons(close = AllIconsKeys.Windows.CloseSmall),
contentAlpha =
TabContentAlpha(
iconNormal = .7f,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import org.jetbrains.jewel.ui.component.LazyTree
import org.jetbrains.jewel.ui.component.OutlinedButton
import org.jetbrains.jewel.ui.component.RadioButtonRow
import org.jetbrains.jewel.ui.component.Slider
import org.jetbrains.jewel.ui.component.TabData
import org.jetbrains.jewel.ui.component.TabStrip
import org.jetbrains.jewel.ui.component.Text
import org.jetbrains.jewel.ui.component.TextField
import org.jetbrains.jewel.ui.component.Tooltip
Expand All @@ -70,6 +72,7 @@ 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.theme.colorPalette
import org.jetbrains.jewel.ui.theme.defaultTabStyle

@Composable
internal fun ComponentShowcaseTab(project: Project) {
Expand Down Expand Up @@ -279,6 +282,11 @@ private fun RowScope.ColumnTwo(project: Project) {

Divider(Orientation.Horizontal)

val tabs = remember {
listOf(TabData.Default(true, { Text("Tab 1") }), TabData.Default(false, { Text("Tab 2") }))
}
TabStrip(tabs, JewelTheme.defaultTabStyle, modifier = Modifier.fillMaxWidth())

var activated by remember { mutableStateOf(false) }
Text("activated: $activated", Modifier.onActivated { activated = it })

Expand Down