JetBrains / jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Apache License 2.0
636 stars 30 forks source link

Set default color of Divider composable #356

Closed YasserDbeis closed 2 months ago

YasserDbeis commented 2 months ago

The current color and fallback style create a transparent appearance for the Divider under Classic UI's Darkula theme. This change fixes such issue.

Manually verified that the color is correct for both new and Classic UI in all available themes.

rock3r commented 2 months ago

As I suspected, the issue is that we're reading the right LaF key, but it doesn't exist in Old UI:

image

The proper fix is to init the DividerStyle in IntUiBridge not by directly reading Borders.color, since that only exists in the new UI, but by calling JBColor.border().toComposeColorOrUnspecified(), since they have a hardcoded default value in there that makes it work on Old UI too.

That's the same thing that the split layout styling does, eventually.

rock3r commented 2 months ago

Since it's been a few days, I took the liberty to close this and implement the proper fix in #362

YasserDbeis commented 2 months ago

Thank you!