forked from AuroraMiddleware/gtk
GtkEntry: Refresh when activity ends
We need to queue a redraw when pulse mode is ended by setting a fraction. Noticed in gtk3-demo's search entry demo.
This commit is contained in:
parent
5d3aa54a8a
commit
8c3f04e754
@ -10617,12 +10617,15 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
|
||||
gdouble old_fraction;
|
||||
gint x, y, width, height;
|
||||
gint old_x, old_y, old_width, old_height;
|
||||
gboolean was_pulse;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY (entry));
|
||||
|
||||
widget = GTK_WIDGET (entry);
|
||||
private = entry->priv;
|
||||
|
||||
was_pulse = private->progress_pulse_mode;
|
||||
|
||||
if (private->progress_pulse_mode)
|
||||
old_fraction = -1;
|
||||
else
|
||||
@ -10641,7 +10644,8 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
|
||||
{
|
||||
get_progress_area (widget, &x, &y, &width, &height);
|
||||
|
||||
if ((x != old_x) || (y != old_y) || (width != old_width) || (height != old_height))
|
||||
if (was_pulse ||
|
||||
x != old_x || y != old_y || width != old_width || height != old_height)
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user