Closed matsekberg closed 5 months ago
Your parent object has a size of zero (w=0 and h=0). The children must fit in it. When you change your object to :
{"page":4,"id":99,"obj":"btn","x":0,"y":0,"h"480,"w":320,"toggle":1,"bg_color90":"#880000","bg_color91":"#005500","bg_color92":"#00FF00","bg_color93":"#FF0000","text_font":24, "radius30":7}
All buttons are visible. But I don't think that's what you want. This is not an bug. It just doesn't work that way. Parents are normally TABVIEWS or PAGES but they don't save "bg_color90":"#880000"
or "toggle":1
for example.
My understanding from the documentation is that if the child has the same property as the parent, then the child will override. X, y, h and w should be taken from the children.
I could try make the leftmost button a parent and the other children.
Some properties (typically that are related to text and opacity) can be inherited, .i.e. not all properties are inheritable.
You need to set toggle
, bg_color90
,bg_color91
,bg_color92
,bg_color93
,radius30
on each button individually.
There is no way to group styling properties in the way you are trying to achieve...
You can create a parent obj
object and set the text_font
there once. All x
and y
coordinates will be relative to the parent.
Ok so me trying to use parent as a template won’t work that well. And you see no reason to implement it that way? In order to simplify the config file.
Maybe in due time... but you can implement this too if you really needed it. I have made the whole project open source so users can benefit and contribute alike...
Perform all steps below and tick them with [x]
Describe the bug
I try to reduce the size of configuration by using parent objects but cant get it to work. Only objects with explicit properties displays correct.
To Reproduce
This is the config:
id 99 is supposed to hold stylings and other common properties. id 5, 6 and 7 has a parentid pointing to the 99 object with common props. id 8 uses explicit same properties.
Expected behavior
The expected behaviour is four buttons with equal styling and size.
Screenshots or video
The image show that only id 8 (with explicit properties) s displayed.
This is the expected design:
Info