Closed cmot17 closed 11 months ago
These both seem possibly related:
https://bugreports.qt.io/browse/QTBUG-71741 https://bugreports.qt.io/browse/QTBUG-73852
It also seems like the style difference is because Apple changed the native style sometime after Mojave - might be a Qt issue.
Yes this looks like a Qt bug.
In the long term, we would like to have a specific rendering backend for Mac that does not use Qt. But this is not really in our priority right now, and it would be a lot of work.
@ogoffart Would you accept a PR adding native theme(s) to the GL backend?
(This is definitely not a guarantee that I'll make one due to the amount of work required, but I'd be interested in trying.)
@n-raine yes of course we would accept. It would be amazing. It's just that this can be a huge task.
There are different way to go with this: either implement a similar enough looking theme in .skint. It won't look exactly native but it might be good enough. Or implement the native style with native code that draw the widgets using calls to the macOs libraries.
Either way, i'd be happy to review or answer questions
I think I'll go with the first one if possible. One of the many things I like about Slint is that there's very little room for security vulnerabilities; as I understand it, when using the GL backend, almost everything is done in safe Rust, including vector graphics rendering. Adding a native theme to the GL backend would therefore improve security.
when using the GL backend, almost everything is done in safe Rust, including vector graphics rendering.
Unfortunately that's not the case. Basically any call to a GL driver is "unsafe" - the driver can do anything with those pointers to texture data provided.
I know, I just meant that the vector graphics drawing itself is done in safe Rust (rather than rasterizing on the GPU or in C/C++)
The cupertino style is now recommended on macOS. (and that's the default in 1.3) closing issue related to the Qt style on macOS
How did you achieve the native style? Do you need to customize the theme? Why does mine look so different from yours?
Here is an example of a tabbed view from Handbrake, which matches the system style:
Here is what it looks like in the "gallery" example:
Besides the obvious style differences, the line from the box underneath the tabs is visible in the SixtyFPS version, under the tabs that are not currently selected.