Allow for better theming of non-native widgets
Categories
(Core :: Widget, enhancement, P3)
Tracking
()
People
(Reporter: allo, Unassigned)
Details
Attachments
(1 file)
|
805 bytes,
image/png
|
Details |
Firefox 98 now enforces the use of non-native widgets, which are not looking good on all platforms.
For example, the scrollbars are mostly looking like Windows 10, while themes with more contrast, 3D effects or just better skeuomorphisms (see attached screenshot) cannot be immitated by the current implementation that seems to use mostly colored rectangles like Windows 10 UI.
The only options for customization seem to be these settings, which allow to change some of the colors (i.e. the bar and the handle, but not the buttons) but nothing else.
It would be nice, when there were support for image sprites. With a few elements that can easily be styled with CSS, one could add sprites (e.g. "handle-top", "handle-middle" (will be repeated), "handle-bottom", "background", "button-top", "button-bottom") as data: URLs and create a theme that can (almost) match the native theme.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
As mentioned in bug 1749645 image sprites are not feasible, I suspect, because we'd need to at the very least support scrollbar-width/scrollbar-color properties (plus a wide range of screen resolutions).
Some potential alternatives might be:
- Remoting the GTK drawing, perhaps, if we assume that we can draw a native scrollbar in the parent and then tile / repeat it on the child appropriately. Probably not great.
- Add more scrollbar styles more similar to what you want. That might not be hard, and as long as they're not very invasive we could allow them to live in the tree.
- Add some more complex custom drawing mechanism (like Houdini paint or so on). But that's also not something that you want to run every time you paint a scrollbar...
Ultimately on GTK 4 we won't even have any chance of drawing native widgets because we use foreign drawing which is removed on GTK4, so even if we wanted we couldn't draw "real" native scrollbars...
Ultimately on GTK 4 we won't even have any chance of drawing native widgets because we use foreign drawing which is removed on GTK4, so even if we wanted we couldn't draw "real" native scrollbars...
After Bug 1749645 I kind of accepted that there will be no native UI, even when native widgets have advantages to better fit into the platform's UI paradigms.
Remoting the GTK drawing
I guess no Gtk anymore.
Add more scrollbar styles more similar to what you want.
Indeed. One option I would consider is allowing themes to specifiy scrollbar styles. But on the other hand I would appreciate if I could choose a browser theme without changing the widget styles. So it's not easy to say if it is better to add them to themes or to allow to change them in some other way.
Adding more styles (e.g. high contrast, Luna (XP style), Plastique, Clearlooks, Aqua, and other popular themes that are not covered by current styles) and defining the UI in a way that userChrome.css can be used to style them for advanced users would probably be a good option.
Add some more complex custom drawing mechanism
I do not know what is possible with the current mechanisms. But if you could for example style it with CSS there would be a lot of ways to make the scrollbars look like different themes.
we'd need to at the very least support scrollbar-width/scrollbar-color properties (plus a wide range of screen resolutions).
Older Firefox versions could do this by only replacing styles scrollbars with non-native UI and you could force Firefox to use full scrollbars (e.g. because they are easier to click when the width defined by the website is too small) using addons like Stylus. But when scrollbars can be themed with CSS, one could use the whole range of options like background-repeat for defining the behavior for different sizes of the scrollbar.
Description
•