forked from AuroraMiddleware/gtk
Stop using deprecated style context api
Use the non-deprecated one it wraps, instead. Yes, this is cheating...
This commit is contained in:
parent
396513183b
commit
6f5675ef3c
@ -2382,9 +2382,7 @@ gtk_flow_box_snapshot (GtkWidget *widget,
|
|||||||
cairo_append_path (cr, path);
|
cairo_append_path (cr, path);
|
||||||
cairo_path_destroy (path);
|
cairo_path_destroy (path);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
gtk_style_context_get (context, "border-color", &border_color, NULL);
|
||||||
gtk_style_context_get_border_color (context, &border_color);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
gtk_style_context_get_border (context, &border);
|
gtk_style_context_get_border (context, &border);
|
||||||
|
|
||||||
cairo_set_line_width (cr, border.left);
|
cairo_set_line_width (cr, border.left);
|
||||||
|
@ -1310,10 +1310,8 @@ gtk_popover_snapshot (GtkWidget *widget,
|
|||||||
if (border.bottom > 0)
|
if (border.bottom > 0)
|
||||||
{
|
{
|
||||||
GdkRGBA border_color;
|
GdkRGBA border_color;
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
||||||
gtk_style_context_get_border_color (context, &border_color);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
|
|
||||||
|
gtk_style_context_get (context, "border-color", &border_color, NULL);
|
||||||
gtk_popover_apply_tail_path (popover, cr);
|
gtk_popover_apply_tail_path (popover, cr);
|
||||||
gdk_cairo_set_source_rgba (cr, &border_color);
|
gdk_cairo_set_source_rgba (cr, &border_color);
|
||||||
|
|
||||||
|
@ -1992,9 +1992,7 @@ _gtk_style_context_get_attributes (AtkAttributeSet *attributes,
|
|||||||
GdkRGBA color;
|
GdkRGBA color;
|
||||||
gchar *value;
|
gchar *value;
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
gtk_style_context_get (context, "background-color", &color, NULL);
|
||||||
gtk_style_context_get_background_color (context, &color);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
value = g_strdup_printf ("%u,%u,%u",
|
value = g_strdup_printf ("%u,%u,%u",
|
||||||
(guint) ceil (color.red * 65536 - color.red),
|
(guint) ceil (color.red * 65536 - color.red),
|
||||||
(guint) ceil (color.green * 65536 - color.green),
|
(guint) ceil (color.green * 65536 - color.green),
|
||||||
|
@ -580,11 +580,9 @@ render_para (GtkTextRenderer *text_renderer,
|
|||||||
selection_node = gtk_text_view_get_selection_node ((GtkTextView*)text_renderer->widget);
|
selection_node = gtk_text_view_get_selection_node ((GtkTextView*)text_renderer->widget);
|
||||||
gtk_style_context_save_to_node (context, selection_node);
|
gtk_style_context_save_to_node (context, selection_node);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
gtk_style_context_get (context, "background-color", &selection, NULL);
|
||||||
gtk_style_context_get_background_color (context, &selection);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
|
|
||||||
gtk_style_context_restore (context);
|
gtk_style_context_restore (context);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -775,9 +773,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
{
|
{
|
||||||
GdkRGBA color;
|
GdkRGBA color;
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
gtk_style_context_get (context, "background-color", &color, NULL);
|
||||||
gtk_style_context_get_background_color (context, &color);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
|
|
||||||
gdk_cairo_set_source_rgba (cr, &color);
|
gdk_cairo_set_source_rgba (cr, &color);
|
||||||
|
|
||||||
|
@ -250,9 +250,7 @@ set_attributes_from_style (GtkStyleContext *context,
|
|||||||
if (!values->appearance.fg_rgba)
|
if (!values->appearance.fg_rgba)
|
||||||
values->appearance.fg_rgba = gdk_rgba_copy (&black);
|
values->appearance.fg_rgba = gdk_rgba_copy (&black);
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
gtk_style_context_get (context, "background-color", values->appearance.bg_rgba, NULL);
|
||||||
gtk_style_context_get_background_color (context, values->appearance.bg_rgba);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
gtk_style_context_get_color (context, values->appearance.fg_rgba);
|
gtk_style_context_get_color (context, values->appearance.fg_rgba);
|
||||||
|
|
||||||
if (values->font)
|
if (values->font)
|
||||||
|
@ -7310,9 +7310,7 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
|||||||
|
|
||||||
context = gtk_widget_get_style_context (GTK_WIDGET (text_view));
|
context = gtk_widget_get_style_context (GTK_WIDGET (text_view));
|
||||||
|
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
gtk_style_context_get (context, "background-color", values->appearance.bg_rgba, NULL);
|
||||||
gtk_style_context_get_background_color (context, values->appearance.bg_rgba);
|
|
||||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
||||||
gtk_style_context_get_color (context, values->appearance.fg_rgba);
|
gtk_style_context_get_color (context, values->appearance.fg_rgba);
|
||||||
|
|
||||||
if (values->font)
|
if (values->font)
|
||||||
|
Loading…
Reference in New Issue
Block a user