Question/feedback regarding Windows Hi DPI support and how it will affect applications

2015-02-17 Thread Jim Graham
I'm currently investigating what changes we need to make to get Windows HiDPI support up and running. As it stands, anyone with a Hi DPI Windows machine will see all Java and JavaFX programs run very tiny since the Java executables have declared that we are DPI Aware in the program manifest

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
OK, so the major problem I see is that a lot of layout is done outside layoutChildren, using code like this: needlePane = new Pane(); needlePane.widthProperty().addListener( (observable) - { drawNeedlePane(); }); What I think should be done is, instead of trying to hack around Pane, create

Re: Event when CSS is applied

2015-02-17 Thread David Grieve
On 2/17/15 8:02 AM, Tom Eugelink wrote: I have a skin (of a control) that centers a Text node. This Text node can be styled via CSS, so this styling is a factor when centering. because larger font means wider text. The centering works perfectly, the only problem is figuring out when to

Re: Event when CSS is applied

2015-02-17 Thread Tom Eugelink
needsLayoutProperty() is not available on Text, and I figure that on the container it in the end will call layoutChildren, which I'm using already. On 17-2-2015 14:24, Benjamin Gudehus wrote: Basically I would like to be informed when the styling of a node has been applied or changed. There

Re: Event when CSS is applied

2015-02-17 Thread Benjamin Gudehus
Basically I would like to be informed when the styling of a node has been applied or changed. There are isNeedsLayout() and needsLayoutProperty() and they might give Node-based information whether the the layout and thus the styling was applied. I guess this might be true, since doCSSPass() is

Re: Event when CSS is applied

2015-02-17 Thread Tom Eugelink
Registering to fontProperty works, but potentially requires a lot of listeners on every property that may affect the size, like effect, scale, etc. So I'm leaving it in layoutChildren for now; better once to many than not often enough. Would adding such an event be a big change? On

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
Hi Tom, suppose you have such an event and can tell whether CSS of your Text has changed. But is changed CSS the only time you want to re-position the Text? I guess you also need to re-position it when the size of the parent changes. I imagine the logic for determining whether you need to

Re: Event when CSS is applied

2015-02-17 Thread David Grieve
On 2/17/15 1:30 PM, Tom Eugelink wrote: The control is a codewise polish up one of Gerrit's gauges (with permission!) and pulled into JFXtras (with tests and all). For an idea on what we are talking about: https://www.youtube.com/watch?v=RH5X1uBu1d8 The process of centering the Text in that

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
On Tue, Feb 17, 2015 at 1:30 PM, Tom Eugelink t...@tbee.org wrote: The control is a codewise polish up one of Gerrit's gauges (with permission!) and pulled into JFXtras (with tests and all). For an idea on what we are talking about: https://www.youtube.com/watch?v=RH5X1uBu1d8 The process of

Re: Event when CSS is applied

2015-02-17 Thread Tom Eugelink
On 17-2-2015 20:01, David Grieve wrote: On 2/17/15 1:30 PM, Tom Eugelink wrote: The control is a codewise polish up one of Gerrit's gauges (with permission!) and pulled into JFXtras (with tests and all). For an idea on what we are talking about: https://www.youtube.com/watch?v=RH5X1uBu1d8

Re: Event when CSS is applied

2015-02-17 Thread Tomas Mikula
Maybe if you can post the relevant part of your layoutChildren method so that others can look if they can suggest an improvement. Tomas On Tue, Feb 17, 2015 at 5:05 PM, Tom Eugelink t...@tbee.org wrote: On 17-2-2015 20:01, David Grieve wrote: On 2/17/15 1:30 PM, Tom Eugelink wrote: The

Event when CSS is applied

2015-02-17 Thread Tom Eugelink
I have a skin (of a control) that centers a Text node. This Text node can be styled via CSS, so this styling is a factor when centering. because larger font means wider text. The centering works perfectly, the only problem is figuring out when to center the node. At the moment I'm centering