UI elements sizing in Modena.css
Andy Goryachev
andy.goryachev at oracle.com
Tue Jul 9 20:04:21 UTC 2024
Since we touched the modena.css, I would like to ask the group's opinion on whether we should fix the way modena.css sizes UI elements. Please see https://bugs.openjdk.org/browse/JDK-8314683 for reference, where changing the font size also unexpectedly changed the scrollbar.
What do you think about introducing a set of variables similar to -fx-base but for sizing/padding, placing them early on to depend on the font size in the .root selector instead of the font in the actual control? Something along the lines of
.root {
-fx-size-3px: 0.25em;
...
}
.scroll-bar:horizontal > .increment-button > .increment-arrow {
-fx-padding: -fx-size-3px -fx-size-3px -fx-size-3px -fx-size-3px;
}
instead of
.scroll-bar:horizontal > .increment-button > .increment-arrow {
-fx-padding: 0.333em 0.167em 0.333em 0.167em; /* 4 2 4 2 */
}
This way we still permit the UI components resize with the main font, while keeping the sizes of all the control surfaces consistent?
This will require a trivial change in InsetsConverter.
What do you think?
-andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240709/db2456f0/attachment.htm>
More information about the openjfx-dev
mailing list