Skip to content

Commit

Permalink
make formatter and linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
hamen committed Dec 2, 2024
1 parent 75fa039 commit fd4cbb9
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 87 deletions.
32 changes: 16 additions & 16 deletions ide-laf-bridge/api/ide-laf-bridge.api
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,12 @@ public final class org/jetbrains/jewel/bridge/theme/BridgeGlobalMetricsKt {
public static final fun readFromLaF (Lorg/jetbrains/jewel/foundation/GlobalMetrics$Companion;)Lorg/jetbrains/jewel/foundation/GlobalMetrics;
}

public final class org/jetbrains/jewel/bridge/theme/BridgeSliderStylingKt {
public static final fun dark-7HESe_I (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
public static synthetic fun dark-7HESe_I$default (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
public static final fun defaults-IDSuZpE (Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics$Companion;FJFFFF)Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics;
public static synthetic fun defaults-IDSuZpE$default (Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics$Companion;FJFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics;
public static final fun light-7HESe_I (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
public static synthetic fun light-7HESe_I$default (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
}

public final class org/jetbrains/jewel/bridge/theme/BridgeThemeColorPaletteKt {
public static final fun getWindowsPopupBorder (Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette;)Landroidx/compose/ui/graphics/Color;
public static final fun readFromLaF (Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette$Companion;)Lorg/jetbrains/jewel/foundation/theme/ThemeColorPalette;
}

public final class org/jetbrains/jewel/bridge/theme/IntUiBridgeTextKt {
public static final fun retrieveConsoleTextStyle ()Landroidx/compose/ui/text/TextStyle;
public static final fun retrieveDefaultTextStyle ()Landroidx/compose/ui/text/TextStyle;
public static final fun retrieveEditorTextStyle ()Landroidx/compose/ui/text/TextStyle;
}

public final class org/jetbrains/jewel/bridge/theme/ScrollbarBridgeKt {
public final class org/jetbrains/jewel/bridge/theme/IntUiBridgeScrollbarKt {
public static final fun default (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$AlwaysVisible$Companion;)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$AlwaysVisible;
public static final fun default (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$WhenScrolling$Companion;)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$WhenScrolling;
public static final fun macOs-TZvXluI (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$WhenScrolling$Companion;FFLandroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/layout/PaddingValues;JJJJ)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$WhenScrolling;
Expand All @@ -169,6 +154,21 @@ public final class org/jetbrains/jewel/bridge/theme/ScrollbarBridgeKt {
public static synthetic fun windowsAndLinux-tYhzLtE$default (Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$AlwaysVisible$Companion;FLandroidx/compose/foundation/layout/PaddingValues;JJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/ScrollbarVisibility$AlwaysVisible;
}

public final class org/jetbrains/jewel/bridge/theme/IntUiBridgeSliderKt {
public static final fun dark-7HESe_I (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
public static synthetic fun dark-7HESe_I$default (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
public static final fun defaults-IDSuZpE (Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics$Companion;FJFFFF)Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics;
public static synthetic fun defaults-IDSuZpE$default (Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics$Companion;FJFFFFILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SliderMetrics;
public static final fun light-7HESe_I (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJ)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
public static synthetic fun light-7HESe_I$default (Lorg/jetbrains/jewel/ui/component/styling/SliderColors$Companion;JJJJJJJJJJJJJJJILjava/lang/Object;)Lorg/jetbrains/jewel/ui/component/styling/SliderColors;
}

public final class org/jetbrains/jewel/bridge/theme/IntUiBridgeTextKt {
public static final fun retrieveConsoleTextStyle ()Landroidx/compose/ui/text/TextStyle;
public static final fun retrieveDefaultTextStyle ()Landroidx/compose/ui/text/TextStyle;
public static final fun retrieveEditorTextStyle ()Landroidx/compose/ui/text/TextStyle;
}

public final class org/jetbrains/jewel/bridge/theme/SwingBridgeThemeKt {
public static final fun SwingBridgeTheme (Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,3 @@ internal fun readDefaultButtonStyle(): ButtonStyle {
focusOutlineAlignment = Stroke.Alignment.Center,
)
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package org.jetbrains.jewel.bridge.theme

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.takeOrElse
import kotlin.time.Duration.Companion.milliseconds
import org.jetbrains.jewel.bridge.retrieveColorOrUnspecified
import org.jetbrains.jewel.ui.component.styling.CircularProgressStyle
import kotlin.time.Duration.Companion.milliseconds

internal fun readCircularProgressStyle(isDark: Boolean) =
CircularProgressStyle(
frameTime = 125.milliseconds,
color =
retrieveColorOrUnspecified("ProgressIcon.color").takeOrElse {
if (isDark) Color(0xFF6F737A) else Color(0xFFA8ADBD)
},
retrieveColorOrUnspecified("ProgressIcon.color").takeOrElse {
if (isDark) Color(0xFF6F737A) else Color(0xFFA8ADBD)
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@ internal fun readEditorTabStyle(): TabStyle {
return TabStyle(
colors = colors,
metrics =
TabMetrics(
underlineThickness = retrieveIntAsDpOrUnspecified("TabbedPane.tabSelectionHeight").takeOrElse { 2.dp },
tabPadding = retrieveInsetsAsPaddingValues("TabbedPane.tabInsets"),
closeContentGap = 4.dp,
tabContentSpacing = 4.dp,
tabHeight = retrieveIntAsDpOrUnspecified("TabbedPane.tabHeight").takeOrElse { 24.dp },
),
TabMetrics(
underlineThickness = retrieveIntAsDpOrUnspecified("TabbedPane.tabSelectionHeight").takeOrElse { 2.dp },
tabPadding = retrieveInsetsAsPaddingValues("TabbedPane.tabInsets"),
closeContentGap = 4.dp,
tabContentSpacing = 4.dp,
tabHeight = retrieveIntAsDpOrUnspecified("TabbedPane.tabHeight").takeOrElse { 24.dp },
),
icons = TabIcons(close = AllIconsKeys.General.CloseSmall),
contentAlpha =
TabContentAlpha(
iconNormal = .7f,
iconDisabled = .7f,
iconPressed = 1f,
iconHovered = 1f,
iconSelected = 1f,
contentNormal = .7f,
contentDisabled = .7f,
contentPressed = 1f,
contentHovered = 1f,
contentSelected = 1f,
),
TabContentAlpha(
iconNormal = .7f,
iconDisabled = .7f,
iconPressed = 1f,
iconHovered = 1f,
iconSelected = 1f,
contentNormal = .7f,
contentDisabled = .7f,
contentPressed = 1f,
contentHovered = 1f,
contentSelected = 1f,
),
scrollbarStyle = readScrollbarStyle(isDark),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package org.jetbrains.jewel.bridge.theme

import androidx.compose.foundation.shape.CornerSize
import androidx.compose.ui.unit.dp
import kotlin.time.Duration.Companion.milliseconds
import org.jetbrains.jewel.bridge.retrieveColorOrUnspecified
import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarColors
import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarMetrics
import org.jetbrains.jewel.ui.component.styling.HorizontalProgressBarStyle
import kotlin.time.Duration.Companion.milliseconds

internal fun readHorizontalProgressBarStyle() =
HorizontalProgressBarStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ import org.jetbrains.jewel.ui.component.styling.IconButtonStyle
internal fun readIconButtonStyle(): IconButtonStyle =
IconButtonStyle(
metrics =
IconButtonMetrics(
cornerSize = CornerSize(DarculaUIUtil.BUTTON_ARC.dp / 2),
borderWidth = 1.dp,
padding = PaddingValues(0.dp),
minSize = DpSize(24.dp, 24.dp),
),
IconButtonMetrics(
cornerSize = CornerSize(DarculaUIUtil.BUTTON_ARC.dp / 2),
borderWidth = 1.dp,
padding = PaddingValues(0.dp),
minSize = DpSize(24.dp, 24.dp),
),
colors =
IconButtonColors(
foregroundSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedForeground"),
background = Color.Unspecified,
backgroundDisabled = Color.Unspecified,
backgroundSelected = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
backgroundSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedBackground"),
backgroundPressed = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
backgroundHovered = retrieveColorOrUnspecified("ActionButton.hoverBackground"),
backgroundFocused = retrieveColorOrUnspecified("ActionButton.hoverBackground"),
border = Color.Unspecified,
borderDisabled = Color.Unspecified,
borderSelected = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
borderSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedBackground"),
borderFocused = Color.Unspecified,
borderPressed = retrieveColorOrUnspecified("ActionButton.pressedBorderColor"),
borderHovered = retrieveColorOrUnspecified("ActionButton.hoverBorderColor"),
),
IconButtonColors(
foregroundSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedForeground"),
background = Color.Unspecified,
backgroundDisabled = Color.Unspecified,
backgroundSelected = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
backgroundSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedBackground"),
backgroundPressed = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
backgroundHovered = retrieveColorOrUnspecified("ActionButton.hoverBackground"),
backgroundFocused = retrieveColorOrUnspecified("ActionButton.hoverBackground"),
border = Color.Unspecified,
borderDisabled = Color.Unspecified,
borderSelected = retrieveColorOrUnspecified("ActionButton.pressedBackground"),
borderSelectedActivated = retrieveColorOrUnspecified("ToolWindow.Button.selectedBackground"),
borderFocused = Color.Unspecified,
borderPressed = retrieveColorOrUnspecified("ActionButton.pressedBorderColor"),
borderHovered = retrieveColorOrUnspecified("ActionButton.hoverBorderColor"),
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ internal fun readOutlinedButtonStyle(): ButtonStyle {
return ButtonStyle(
colors = colors,
metrics =
ButtonMetrics(
cornerSize = CornerSize(DarculaUIUtil.BUTTON_ARC.dp / 2),
padding = PaddingValues(horizontal = 14.dp), // see DarculaButtonUI.HORIZONTAL_PADDING
minSize = DpSize(minimumSize.width, minimumSize.height),
borderWidth = DarculaUIUtil.LW.dp,
focusOutlineExpand = Dp.Unspecified,
),
ButtonMetrics(
cornerSize = CornerSize(DarculaUIUtil.BUTTON_ARC.dp / 2),
padding = PaddingValues(horizontal = 14.dp), // see DarculaButtonUI.HORIZONTAL_PADDING
minSize = DpSize(minimumSize.width, minimumSize.height),
borderWidth = DarculaUIUtil.LW.dp,
focusOutlineExpand = Dp.Unspecified,
),
focusOutlineAlignment = Stroke.Alignment.Center,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import androidx.compose.foundation.shape.CornerSize
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import org.jetbrains.jewel.bridge.ScrollbarHelper
import org.jetbrains.jewel.bridge.retrieveColor
import org.jetbrains.jewel.ui.component.styling.ScrollbarColors
Expand All @@ -13,8 +15,6 @@ import org.jetbrains.jewel.ui.component.styling.ScrollbarStyle
import org.jetbrains.jewel.ui.component.styling.ScrollbarVisibility
import org.jetbrains.jewel.ui.component.styling.TrackClickBehavior
import org.jetbrains.skiko.hostOs
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds

internal fun readScrollbarStyle(isDark: Boolean): ScrollbarStyle =
ScrollbarStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ internal fun readSegmentedControlButtonStyle(): SegmentedControlButtonStyle {

val normalBorder =
listOf(
JBUI.CurrentTheme.SegmentedButton.SELECTED_START_BORDER_COLOR.toComposeColor(),
JBUI.CurrentTheme.SegmentedButton.SELECTED_END_BORDER_COLOR.toComposeColor(),
)
JBUI.CurrentTheme.SegmentedButton.SELECTED_START_BORDER_COLOR.toComposeColor(),
JBUI.CurrentTheme.SegmentedButton.SELECTED_END_BORDER_COLOR.toComposeColor(),
)
.createVerticalBrush()

val selectedDisabledBorder =
listOf(
JBUI.CurrentTheme.Button.buttonOutlineColorStart(false).toComposeColor(),
JBUI.CurrentTheme.Button.buttonOutlineColorEnd(false).toComposeColor(),
)
JBUI.CurrentTheme.Button.buttonOutlineColorStart(false).toComposeColor(),
JBUI.CurrentTheme.Button.buttonOutlineColorEnd(false).toComposeColor(),
)
.createVerticalBrush()

val colors =
Expand All @@ -41,7 +41,7 @@ internal fun readSegmentedControlButtonStyle(): SegmentedControlButtonStyle {
backgroundHovered = SolidColor(JBUI.CurrentTheme.ActionButton.hoverBackground().toComposeColor()),
backgroundSelected = selectedBackground,
backgroundSelectedFocused =
SolidColor(JBUI.CurrentTheme.SegmentedButton.FOCUSED_SELECTED_BUTTON_COLOR.toComposeColor()),
SolidColor(JBUI.CurrentTheme.SegmentedButton.FOCUSED_SELECTED_BUTTON_COLOR.toComposeColor()),
content = retrieveColorOrUnspecified("Button.foreground"),
contentDisabled = retrieveColorOrUnspecified("Label.disabledForeground"),
border = normalBorder,
Expand All @@ -54,11 +54,11 @@ internal fun readSegmentedControlButtonStyle(): SegmentedControlButtonStyle {
return SegmentedControlButtonStyle(
colors = colors,
metrics =
SegmentedControlButtonMetrics(
cornerSize = CornerSize(DarculaUIUtil.BUTTON_ARC.dp / 2),
segmentedButtonPadding = PaddingValues(horizontal = 14.dp),
minSize = DpSize(minimumSize.width, minimumSize.height),
borderWidth = DarculaUIUtil.LW.dp,
),
SegmentedControlButtonMetrics(
cornerSize = CornerSize(DarculaUIUtil.BUTTON_ARC.dp / 2),
segmentedButtonPadding = PaddingValues(horizontal = 14.dp),
minSize = DpSize(minimumSize.width, minimumSize.height),
borderWidth = DarculaUIUtil.LW.dp,
),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@ internal fun readDefaultTabStyle(): TabStyle {
scrollbarStyle = readScrollbarStyle(isDark),
)
}

0 comments on commit fd4cbb9

Please sign in to comment.