mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
GtkAssistant: Don't use a draw cb for the sidebar
We can do this with css nowadays.
This commit is contained in:
parent
a3a6ce1b42
commit
c3755d995f
@ -171,9 +171,6 @@ static void gtk_assistant_do_set_page_side_image (GtkAssistant *ass
|
||||
GtkWidget *page,
|
||||
GdkPixbuf *pixbuf);
|
||||
|
||||
static gboolean assistant_sidebar_draw_cb (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer user_data);
|
||||
static void on_assistant_close (GtkWidget *widget,
|
||||
GtkAssistant *assistant);
|
||||
static void on_assistant_apply (GtkWidget *widget,
|
||||
@ -615,7 +612,6 @@ gtk_assistant_class_init (GtkAssistantClass *class)
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkAssistant, button_size_group);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, GtkAssistant, title_size_group);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, assistant_sidebar_draw_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, assistant_remove_page_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_assistant_close);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_assistant_apply);
|
||||
@ -1069,23 +1065,6 @@ alternative_button_order (GtkAssistant *assistant)
|
||||
return result;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
assistant_sidebar_draw_cb (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer user_data)
|
||||
{
|
||||
gint width, height;
|
||||
GtkStyleContext *context;
|
||||
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
|
||||
gtk_render_background (context, cr, 0, 0, width, height);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
on_page_notify_visibility (GtkWidget *widget,
|
||||
GParamSpec *arg,
|
||||
|
@ -24,7 +24,6 @@
|
||||
<style>
|
||||
<class name="sidebar"/>
|
||||
</style>
|
||||
<signal name="draw" handler="assistant_sidebar_draw_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox" id="sidebar">
|
||||
<property name="visible">True</property>
|
||||
|
Loading…
Reference in New Issue
Block a user