Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Appearance property "base" works incorrect, if appearance from parent theme has string value. #9429
For example, appearance for "datefield" from theme "qx.theme.modern.Appearance" has value:
If create custom theme and extend "qx.theme.modern.Appearance", then in custom theme create apearance with the same name "datefield" and use property "base: true":
In this case the result appearance does not have properties from parent theme.
Qooxdoo Playground example: http://tinyurl.com/y8hj6b82
I can't find a problem in your description. What I ment with my comment was that there is no textColor on the level of datefield that is used somewhere, so it will not have any effect.
Maybe the problem is different:
Problem is not about textColor, I know that textColor on the level datefield does not have any effect. It just was bad example.
Yes, include: 'combobox' can help in this case, but, I think, it just workaround.
The function qx.theme.manager.Appearance.styleFrom uses common this.__aliasMap for all themes. For my custom theme datefield appearance is Entry, so when styleFrom calculates this appearnce, item "datefield": "datefield" is added to alias map. Then styleFrom calculates datefield appearance from Modern theme, but it does not resolve new id, it just gets existing alias from map. But alias "datefield": "datefield" is not correct for Modern theme. For Modern theme it should be "datefield": "combobox"
I've slightly modified an example:
If we want to style text color of a textfield as subcontrol of a datefield, the issue is also reproducible.
Compare this with styling combobox/datefield (it is commented out in the example) - in this case paddings and other stylings are not lost, because they are still picked up from the parent theme.
added a commit
Mar 15, 2018
So, it looks like "base" call for an appearance that overrides appearance with alias set through "string form" (e.g. "datefield/textfield": "combobox/textfield") does not do it's job, because not all the style properties of parent appearance are picked up.
We can put in the parent theme, instead of string alias:
In this case everything will be mapped correctly, and also in inherited appearance all the styles will be picked up correctly.
The "aliases" section of docs:
Says "There is no type of implicit inheritance." So does this mean in particular that properties that are obtained through alias will not be inherited?