Apart of using or not the CSS package...
I have a new idea as well, is somewhat an idea I already had some time ago.
In this repository https://github.com/bgrabitmap/BGRAJSONStyles
I coded a thing that works like the .css you found on a website, but with BGRABitmap.
The idea is to have string properties that can handle the style properties.
For example for color, instead of using TColor on LCL or Colorty in MSEide, we can use a string that reads the values for example:
'rgb(100,200,200)'
or in hex
'#FFFFFF'
and for the gradients like is done in a website
https://www.w3schools.com/css/css3_gradients.asp
'background-image: linear-gradient(direction, color-stop1, color-stop2, ...);'
but for our own drawers. Instead of publishing each property in the 'Styles' or 'BGStyles' property, we publish a JSON property, where you can set all the properties from a file, or type them with code, as you wish.
That's another idea for making the drawers.
An advantage of using this, for example say we want to draw the BGRAControls BCButton, it has StateNormal, StateHover, StatePressed, missing StateDisabled and StateFocused.
With JSON styles we can add properties like
button:normal {
background-color: "red"
}
button:hover {
background-color: "green"
}
button: disabled {
background-color: "gray"
}
That in a plain .json file that's human readable. Instead of messing with the object inspector, we can use that kind of files to theme the controls. Like is done in a website. We can reuse that JSON files between projects, instead of loading styles in the object inspector, just place the file in the project directory and that's all.
Well this is another idea, is for implementing the drawers.
I'm not sure wich way to follow 👎