-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default-font-size
and default-font-family
don't work in the Live-Preview
#4298
Comments
Yes indeed, this also applies to the other I'm not sure how to solve that best yet... |
We could change the signatures of say Unless......... perhaps the other way of doing this is - at resolution time - to walk /up/ the item tree, starting at |
Another slightly related issue is that if one use I guess the short term solution is indeed to walk up the item tree. But that is a fairly slow operation, we might not want to do that for every rendering of every Text. Adding some kind of WindowContext might not be a bad idea either. |
OIivier had a great idea for an optimisation here: We have to walk up the tree, but instead of traversing item by item we can traverse from component to component and just check if item at index 0 is a WindowItem. If it isn't, continue the walk. |
default-font-size
don't work in the vscode plugin "Slint Live-Preview"default-font-size
and default-font-family
don't work in the Live-Preview
... by changing the resolution for the `WindowItem` to traverse the item tree from the current item, instead of going to the window. This doesn't quite fix #4298 because `rem` resolution is still missing. That requires the built-in default font size function to be fixed as well, which is non-trivial. cc #4298
... by changing the resolution for the `WindowItem` to traverse the item tree from the current item, instead of going to the window. This doesn't quite fix #4298 because `rem` resolution is still missing. That requires the built-in default font size function to be fixed as well, which is non-trivial. cc #4298
System: Win10
VS code :1.83.0
Slint plugin:1.3.2
The
default-font-size
property just don't work in preview, but work when build and run.The text was updated successfully, but these errors were encountered: