chiark / gitweb /
GTK API deprecation: use GtkCssProvider for window background.
authorSimon Tatham <anakin@pobox.com>
Mon, 27 Feb 2017 19:11:02 +0000 (19:11 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 27 Feb 2017 19:11:02 +0000 (19:11 +0000)
commitf3ca0e5af8b0ccb7400accc946e0a32e290b0206
tree8a805fc1d598c476dccab059e89132ee6c0be588
parent7cae89fb4b22c305b3fd98b4e1be065ad527a9f7
GTK API deprecation: use GtkCssProvider for window background.

gdk_window_set_background_rgba is deprecated as of GTK 3.22, because
apparently you can't just _say_ any more 'here is what I want my
window's background colour to be in places where a widget isn't'.
Instead you have to provide a GtkStyleProvider which can be slotted
into a wobbly tower of other providers with associated priorities, so
that the user can override your choices if they really want to.

And the easiest way to constructc a GtkStyleProvider in turn is to
write *actual CSS* and get GTK to parse it, so I end up converting my
nice numeric RGB values into a complicated text format for another
part of _the same process_ to parse back into numbers. Sigh.
gtk.c