Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
devkanro committed Oct 13, 2023
1 parent 3a5beb4 commit 14ef394
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.jetbrains.jewel.IntelliJThemeDefinition
import org.jetbrains.jewel.IntelliJThemeIconData

@Immutable
data class IntUiThemeDefinition(
class IntUiThemeDefinition(
override val isDark: Boolean,
override val globalColors: GlobalColors,
override val colorPalette: IntUiThemeColorPalette,
Expand All @@ -24,6 +24,26 @@ data class IntUiThemeDefinition(
override fun withExtensions(vararg extensions: ProvidedValue<*>): IntUiThemeDefinition =
copy(extensionStyles = extensionStyles + extensions)

fun copy(
isDark: Boolean = this.isDark,
globalColors: GlobalColors = this.globalColors,
colorPalette: IntUiThemeColorPalette = this.colorPalette,
iconData: IntelliJThemeIconData = this.iconData,
globalMetrics: GlobalMetrics = this.globalMetrics,
defaultTextStyle: TextStyle = this.defaultTextStyle,
contentColor: Color = this.contentColor,
extensionStyles: Array<ProvidedValue<*>> = this.extensionStyles,
): IntUiThemeDefinition = IntUiThemeDefinition(
isDark = isDark,
globalColors = globalColors,
colorPalette = colorPalette,
iconData = iconData,
globalMetrics = globalMetrics,
defaultTextStyle = defaultTextStyle,
contentColor = contentColor,
extensionStyles = extensionStyles,
)

override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class IntUiDecoratedWindowStyle(

@Composable fun light(
colors: IntUiDecoratedWindowColors = IntUiDecoratedWindowColors.light(),
metrics: IntUiDecoratedWindowMetrics = IntUiDecoratedWindowMetrics(1.dp),
metrics: IntUiDecoratedWindowMetrics = IntUiDecoratedWindowMetrics(),
): IntUiDecoratedWindowStyle = IntUiDecoratedWindowStyle(colors, metrics)

@Composable fun dark(
colors: IntUiDecoratedWindowColors = IntUiDecoratedWindowColors.dark(),
metrics: IntUiDecoratedWindowMetrics = IntUiDecoratedWindowMetrics(1.dp),
metrics: IntUiDecoratedWindowMetrics = IntUiDecoratedWindowMetrics(),
): IntUiDecoratedWindowStyle = IntUiDecoratedWindowStyle(colors, metrics)
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ class IntUiDecoratedWindowColors(

@Stable
class IntUiDecoratedWindowMetrics(
override val borderWidth: Dp,
override val borderWidth: Dp = 1.dp,
) : DecoratedWindowMetrics {

override fun toString(): String = "IntUiDecoratedWindowMetrics(borderWidth=$borderWidth)"
Expand Down

0 comments on commit 14ef394

Please sign in to comment.