mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-02 14:36:48 +00:00
Get rid of deprecated functions to customize widget colors
Since commit cc455b7f91, the background
color has not been set correctly for Gtk+ 3.18 (Fedora 23), while it was
working fine for more recent version 3.20 (Fedora 24). Tracked down to
some changes in GtkNotebook code which can not be easily backported.
Instead of customizing background and foreground colors, let's just
stick with the default colors provided by theme.
Related https://bugs.freedesktop.org/show_bug.cgi?id=94276
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
parent
f212c5a358
commit
8a32e0bfee
@ -71,7 +71,6 @@ static void
|
||||
virt_viewer_notebook_init (VirtViewerNotebook *self)
|
||||
{
|
||||
VirtViewerNotebookPrivate *priv;
|
||||
GdkRGBA color;
|
||||
|
||||
self->priv = GET_PRIVATE(self);
|
||||
priv = self->priv;
|
||||
@ -81,15 +80,6 @@ virt_viewer_notebook_init (VirtViewerNotebook *self)
|
||||
gtk_notebook_set_show_border(GTK_NOTEBOOK(self), FALSE);
|
||||
gtk_widget_show_all(priv->status);
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(self), priv->status, NULL);
|
||||
gdk_rgba_parse(&color, "white");
|
||||
/* FIXME:
|
||||
* This method has been deprecated in 3.16.
|
||||
* For more details on how to deal with this in the future, please, see:
|
||||
* https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-color
|
||||
* For the bug report about this deprecated function, please, see:
|
||||
* https://bugs.freedesktop.org/show_bug.cgi?id=94276
|
||||
*/
|
||||
gtk_widget_override_color(priv->status, GTK_STATE_FLAG_NORMAL, &color);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -297,7 +297,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
|
||||
{
|
||||
VirtViewerWindowPrivate *priv;
|
||||
GtkWidget *vbox;
|
||||
GdkRGBA color;
|
||||
GSList *accels;
|
||||
|
||||
self->priv = GET_PRIVATE(self);
|
||||
@ -340,15 +339,6 @@ virt_viewer_window_init (VirtViewerWindow *self)
|
||||
virt_viewer_window_toolbar_setup(self);
|
||||
|
||||
gtk_box_pack_end(GTK_BOX(vbox), GTK_WIDGET(priv->notebook), TRUE, TRUE, 0);
|
||||
gdk_rgba_parse(&color, "black");
|
||||
/* FIXME:
|
||||
* This method has been deprecated in 3.16.
|
||||
* For more details on how to deal with this in the future, please, see:
|
||||
* https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-background-color
|
||||
* For the bug report about this deprecated function, please, see:
|
||||
* https://bugs.freedesktop.org/show_bug.cgi?id=94276
|
||||
*/
|
||||
gtk_widget_override_background_color(GTK_WIDGET(priv->notebook), GTK_STATE_FLAG_NORMAL, &color);
|
||||
|
||||
priv->window = GTK_WIDGET(gtk_builder_get_object(priv->builder, "viewer"));
|
||||
gtk_window_add_accel_group(GTK_WINDOW(priv->window), priv->accel_group);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user