HanSolo / medusa

A JavaFX library for Gauges
Apache License 2.0
688 stars 129 forks source link

Amp: Problem with value text size #159

Open DJViking opened 5 years ago

DJViking commented 5 years ago

Problem with the size of the value text (both Amp and PlainAmp).

Without custom CSS root style: screenshot_20190203_124224

With custom CSS root style: screenshot_20190203_124158

CSS

.root {
    -fx-font-size: 1em;
}

The Font size 1em is same as default, but setting it in my CSS root style makes the value font very small. When setting the custom CSS root style the Font is no longer LCD, but STANDARD.

Tried setting custom font, but it does not use it.

.customFontEnabled(true)
.customFont(Font.font("Roboto", 32))

When resizing using the custom CSS the value flickers with the same size as without the custom CSS.

HanSolo commented 5 years ago

This is because the LCD in the AmpSkin and PlainAmpSkin are simple Labels which have the default style. As soon as you change that it will override the values I set in the skin. You can see that the text will set back to the selected LCDFont when you resize the window with the control. I will see what I can do here, would like to avoid using CSS at all for Medusa.