Skip to content

Commit

Permalink
Minor code cleanup (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
rock3r authored Sep 23, 2024
1 parent d5d3e6f commit 19d44da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public fun JewelTheme.Companion.createDefaultTextStyle(
hyphens: Hyphens = Hyphens.Unspecified,
textMotion: TextMotion? = null,
): TextStyle =
TextStyle.Default.copy(
TextStyle(
color = color,
fontSize = fontSize,
fontWeight = fontWeight,
Expand Down Expand Up @@ -108,7 +108,7 @@ public fun JewelTheme.Companion.createDefaultTextStyle(
hyphens: Hyphens = Hyphens.Unspecified,
textMotion: TextMotion? = null,
): TextStyle =
TextStyle.Default.copy(
TextStyle(
brush = brush,
alpha = alpha,
fontSize = fontSize,
Expand Down Expand Up @@ -162,7 +162,7 @@ public fun JewelTheme.Companion.createEditorTextStyle(
hyphens: Hyphens = Hyphens.Unspecified,
textMotion: TextMotion? = null,
): TextStyle =
TextStyle.Default.copy(
TextStyle(
color = color,
fontSize = fontSize,
fontWeight = fontWeight,
Expand Down Expand Up @@ -216,7 +216,7 @@ public fun JewelTheme.Companion.createEditorTextStyle(
hyphens: Hyphens = Hyphens.Unspecified,
textMotion: TextMotion? = null,
): TextStyle =
TextStyle.Default.copy(
TextStyle(
brush = brush,
alpha = alpha,
fontSize = fontSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ import androidx.compose.ui.input.key.KeyEventType
import androidx.compose.ui.input.key.isAltPressed
import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.key.type
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.Density
import androidx.compose.ui.window.application
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.decodeToSvgPainter
import org.jetbrains.jewel.foundation.theme.JewelTheme
import org.jetbrains.jewel.foundation.util.JewelLogger
import org.jetbrains.jewel.intui.standalone.Inter
import org.jetbrains.jewel.intui.standalone.JetBrainsMono
import org.jetbrains.jewel.intui.standalone.theme.IntUiTheme
import org.jetbrains.jewel.intui.standalone.theme.createDefaultTextStyle
import org.jetbrains.jewel.intui.standalone.theme.createEditorTextStyle
Expand All @@ -39,8 +36,8 @@ fun main() {
val icon = svgResource("icons/jewel-logo.svg")

application {
val textStyle = JewelTheme.createDefaultTextStyle(fontFamily = FontFamily.Inter)
val editorStyle = JewelTheme.createEditorTextStyle(fontFamily = FontFamily.JetBrainsMono)
val textStyle = JewelTheme.createDefaultTextStyle()
val editorStyle = JewelTheme.createEditorTextStyle()

val themeDefinition =
if (MainViewModel.theme.isDark()) {
Expand Down

0 comments on commit 19d44da

Please sign in to comment.