nimakro
08/02/2017, 11:04 AMbaseColor
in PropertyHolder
I would like to use some other properties defined in the default Stylesheet from JavaFx like -fx-inner-border
but I can't use cssprop
. So how would I define some properties in my own Type-Safe-Css class referencing the default stylesheet (Modena)? Or do we just have to add all of the root variables from the stylesheet in PropertyHolder
if so I would be happy to sent a PR.Ruckus
08/02/2017, 2:55 PMcssproperty
function specifically for this. It requires a type and you can override the name. For example, the NewViewTransitionStyles
(in the test apps) defines a nuke
custom property for theming:
val nuke by cssproperty<Paint>()
...
box and red {
nuke.value = nukeRed
}
Sadly we have to use the nuke.value
format since we can't override =
.nimakro
08/02/2017, 9:05 PMcssproperty
. I guess I did ask the wrong question. I am just wondering if there is a reason why not all the root properties defined in (Modena) are defined in PropertyHolder
class. If create a custom controls I often want to use the default color properties (like -fx-base-color
...) so that I can just change the base colors and all the controls change accordingly?Ruckus
08/02/2017, 9:10 PMcssproperty
workaround would be good enough for the others for now.Ruckus
08/02/2017, 9:11 PMnimakro
08/02/2017, 9:16 PMprop.value
thing 😀.... but v2 sounds like a plan.... I am actually playing with a MaterialStylesheet/Theme which allows to use the default controls, but it will take a while till it will be any where close to be usable 🙈Ruckus
08/02/2017, 9:23 PMnimakro
08/02/2017, 9:34 PMRuckus
08/02/2017, 9:35 PMnimakro
08/02/2017, 9:41 PMRuckus
08/02/2017, 9:53 PM