After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742198 - gtk_style_context_get_background_color deprecation
gtk_style_context_get_background_color deprecation
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.15.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-01-01 20:45 UTC by Morten Welinder
Modified: 2018-05-02 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2015-01-01 20:45:35 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.
Comment 1 Matthias Clasen 2015-01-09 04:55:28 UTC
the problem here is that css conceptually does not have a background color.
Comment 2 Morten Welinder 2015-01-09 16:25:25 UTC
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.
Comment 3 Daniel Boles 2017-10-12 11:35:15 UTC
but CSS does have a background-color; it is rendered below the background-image. I'm not clear on what the problem is here?
Comment 4 Matthias Clasen 2017-10-26 05:00:29 UTC
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.
Comment 5 GNOME Infrastructure Team 2018-05-02 16:20:18 UTC
-- 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.