Re: Binding properties to constant values

2024-02-04 Thread Scott Palmer
I think we could (easily?) introduce a new layer for style sheets that sits at the right spot in the precedence order. The issue that makes things difficult is that the scene can have only one user agent stylesheet, so it is a pain to layer on changes to the defaults with the desired precedence.

Re: Binding properties to constant values

2024-02-01 Thread Nir Lisker
Hi John, If the issues with StyleOrigin are not as problematic as I presented, it comes out to the behavioral flexibility we have. Can we change the precedence order at this point? Do users rely on it or are surprised by it (I see the latter, but those who think it works correctly are not going

Re: Binding properties to constant values

2024-01-31 Thread John Hendrikx
Hi Nir, On 31/01/2024 22:36, Nir Lisker wrote: I would wait with the ramifications of setting competing values from different origins until the question of precedence is answered. Perhaps emitting warnings is better, though I can see some scenarios in which they will be annoying. The way

Re: Binding properties to constant values

2024-01-31 Thread Nir Lisker
> > Specialized methods will be added to `BooleanProperty`, > `DoubleProperty`, `FloatProperty`, `IntegerProperty`, and > `LongProperty`, each with one of the preexisting constant wrappers > that are already in the framework. > Some wrappers can be deduplicated (we only ever need two wrapper >

Re: Binding properties to constant values

2024-01-30 Thread Michael Strauß
Hi John, the rule that values set from code are less specific than values set in author and inline styles is probably lifted from the CSS specification, which says [0]: "The UA may choose to honor presentational attributes in an HTML source document. If so, these attributes are translated to the

Re: Binding properties to constant values

2024-01-30 Thread Scott Palmer
IMO the current CSS priorities are wrong. A value set from code should be adjacent to an in-line style in terms of precedence. They are both ways of saying saying “this particular instance should have this value” Scott > On Jan 30, 2024, at 8:31 AM, John Hendrikx wrote: > > Hi Michael, >

Re: Binding properties to constant values

2024-01-30 Thread John Hendrikx
Hi Michael, I think we first need to decide what the correct behavior is for CSS properties, as the "bind" solution IMHO is a bug. The StyleOrigin enum encodes the relative priorities of styles and user set values, but it is incomplete and not fully enforced.  There is (currently) actually

Binding properties to constant values

2024-01-30 Thread Michael Strauß
Hi everyone, I'm interested in hearing your thoughts on the following proposal, which could increase the expressiveness of the JavaFX Property API: Problem --- The JavaFX CSS system applies the following order of precedence to determine the value of a styleable property (in ascending