Conditional reduction of javafx font

I notice when I add a tooltip to something (either through Scene Builder, or in my controller), every time I click on it, the font gets smaller and smaller. I tried the Internet for most of the day, looking for everything related to this and cannot find any information about what is happening.

The font below is displayed whenever the mouse is over a control using a tooltip. It starts at 16, which I installed, then inexplicably starts to contract. Is this a problem with the library or am I something wrong?

Font[name=System Regular, family=System, style=Regular, size=16.0]
Font[name=System Regular, family=System, style=Regular, size=11.600000381469727]
Font[name=System Regular, family=System, style=Regular, size=9.899999618530273]
Font[name=System Regular, family=System, style=Regular, size=9.899999618530273]
Font[name=System Regular, family=System, style=Regular, size=9.899999618530273]
+4
source share
2 answers

Chrismelman's answer didn’t work for me, but I changed his mind so he did.

Before:

<Tooltip text="Some Text.">
   <font>
      <Font size="24.0" />
   </font>
</Tooltip>

After:

<Tooltip text="Some Text." style="-fx-font-size: 24px"/>

, , "-fx-font-size" , , "pt" "px" .

+2

, .

:

<Tooltip text="Some Text.">
   <font>
      <Font size="24.0" />
   </font>
</Tooltip>

:

<Tooltip text="Some Text." style="--fx-font: 18pt &quot;System&quot;;"/>

. , , .

0

Source: https://habr.com/ru/post/1540788/


All Articles