[libgd/wip/ernestask/gtk4: 6/22] toggle-pixbuf-renderer: use gtk_render_activity()
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/wip/ernestask/gtk4: 6/22] toggle-pixbuf-renderer: use gtk_render_activity()
- Date: Sun, 11 Mar 2018 08:31:56 +0000 (UTC)
commit d8dd947d24341746783e3bd8065cde53fcce3dfd
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Mar 10 11:19:26 2018 +0200
toggle-pixbuf-renderer: use gtk_render_activity()
gtk_paint_spinner() has been removed with no straightforward
replacement that allows to set the step value.
See https://bugzilla.gnome.org/show_bug.cgi?id=782023 and
https://bugzilla.gnome.org/show_bug.cgi?id=782396.
libgd/gd-toggle-pixbuf-renderer.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/libgd/gd-toggle-pixbuf-renderer.c b/libgd/gd-toggle-pixbuf-renderer.c
index 1eef19d..bc34d7b 100644
--- a/libgd/gd-toggle-pixbuf-renderer.c
+++ b/libgd/gd-toggle-pixbuf-renderer.c
@@ -96,6 +96,7 @@ render_activity (GdTogglePixbufRenderer *self,
gint ypad)
{
gint x, y, width, height;
+ GtkStyleContext *context;
if (self->priv->pulse == 0)
return;
@@ -105,17 +106,9 @@ render_activity (GdTogglePixbufRenderer *self,
x = cell_area->x + (cell_area->width / 2) - (width / 2) - xpad;
y = cell_area->y + (cell_area->height / 2) - (height / 2) - ypad;
+ context = gtk_widget_get_style_context (widget);
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_paint_spinner (gtk_widget_get_style (widget),
- cr,
- GTK_STATE_FLAG_ACTIVE,
- widget,
- NULL,
- (guint) self->priv->pulse - 1,
- x, y,
- width, height);
- G_GNUC_END_IGNORE_DEPRECATIONS;
+ gtk_render_activity (context, cr, x, y, width, height);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]