forked from AuroraMiddleware/gtk
GtkButton: Queue a redraw on enter/leave
We currently getting a redraw for buttons, but that is just luck. Better to make it explicit.
This commit is contained in:
parent
545704401e
commit
d09c458ced
@ -134,6 +134,7 @@ static void gtk_real_button_released (GtkButton * button);
|
||||
static void gtk_real_button_clicked (GtkButton * button);
|
||||
static void gtk_real_button_activate (GtkButton *button);
|
||||
static void gtk_button_update_state (GtkButton *button);
|
||||
static void gtk_button_enter_leave (GtkButton *button);
|
||||
static void gtk_button_add (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static GType gtk_button_child_type (GtkContainer *container);
|
||||
@ -237,8 +238,8 @@ gtk_button_class_init (GtkButtonClass *klass)
|
||||
klass->pressed = gtk_real_button_pressed;
|
||||
klass->released = gtk_real_button_released;
|
||||
klass->clicked = NULL;
|
||||
klass->enter = gtk_button_update_state;
|
||||
klass->leave = gtk_button_update_state;
|
||||
klass->enter = gtk_button_enter_leave;
|
||||
klass->leave = gtk_button_enter_leave;
|
||||
klass->activate = gtk_real_button_activate;
|
||||
|
||||
props[PROP_LABEL] =
|
||||
@ -2507,6 +2508,13 @@ _gtk_button_set_depressed (GtkButton *button,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_button_enter_leave (GtkButton *button)
|
||||
{
|
||||
gtk_button_update_state (button);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (button));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_button_update_state (GtkButton *button)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user