mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
inspector: Properly update flashing hilight
Previously, the inspector would not change the hilight while the previous hilight was still flashing. This is inconvenient while arrowing through the object selection treeview though where you want the currently selected row to hilight when arrowing quickly.
This commit is contained in:
parent
0b2bded110
commit
4d7369d1a8
@ -199,6 +199,8 @@ static void
|
||||
start_flash (GtkInspectorWindow *iw,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
clear_flash (iw);
|
||||
|
||||
iw->flash_count = 1;
|
||||
iw->flash_widget = widget;
|
||||
g_signal_connect_after (widget, "draw", G_CALLBACK (draw_flash), iw);
|
||||
@ -447,12 +449,15 @@ void
|
||||
gtk_inspector_flash_widget (GtkInspectorWindow *iw,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
if (iw->flash_cnx != 0)
|
||||
return;
|
||||
|
||||
if (!gtk_widget_get_visible (widget) || !gtk_widget_get_mapped (widget))
|
||||
return;
|
||||
|
||||
if (iw->flash_cnx != 0)
|
||||
{
|
||||
g_source_remove (iw->flash_cnx);
|
||||
iw->flash_cnx = 0;
|
||||
}
|
||||
|
||||
start_flash (iw, widget);
|
||||
iw->flash_cnx = g_timeout_add (150, (GSourceFunc) on_flash_timeout, iw);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user