GNOME Bugzilla – Bug 742198
gtk_style_context_get_background_color deprecation
Last modified: 2018-05-02 16:20:18 UTC
gtk_style_context_get_background_color is now deprecated in favour of gtk_render_background. Insofar this relates to user code peeking into gtk's widget internals that makes sense. However, for an implementation of a new widget it does not make sense. Such an implementation has a clear need to access its own style information and gtk_render_background is irrelevant for such use. Specifically I want this for a canvas which is easily 16M pixels tall and very wide too. Obviously we only want to render the visible part. So please consider un-deprecating gtk_style_context_get_background_color for widget implementation use.
the problem here is that css conceptually does not have a background color.
By "conceptually" you mean that when "background-color: #ffffff;" is used then it is really shorthand for a solid-color repeated image? I'm open for ideas here, but tests a while back with just rendering the background for the exposed area did not look promising. Basically, that will render something that doesn't fit in by virtual of having rounded corners at the expose region or having colour issues.
but CSS does have a background-color; it is rendered below the background-image. I'm not clear on what the problem is here?
the problem is that the background color is optional - it may not be set, and even if it is set, it is only a small fraction of the css background definition. If a widget picks it out and ignores the rest, that does a disservice to people who want to use css to theme widgets.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/520.