GtkInspector doesn't highlight selected widget ( GTK 4 )

I have used the GtkInspector in GTK3. When I switch to the Widget Object Tree View, as shown below:

and single click on a widget object, the corresponding widget is highlighted by a blink on the app. This was useful in quickly narrowing down to the widget of interest.

I don’t see this behavior in GtkInspector 4. Is this expected behavior ?

IIRC that now only happens on CSS nodes, not on widgets. I don’t know if that’s intentional or not.

There’s another missing thing, that the Inspector does not scroll to the newly picked widget in its list view, and probably not to CSS Nodes either. I guess that can be fixed now that we have list views scroll_to() API.

This feature is very useful in debugging widgets. When the clicked widget object is highlighted in the app, it also shows the allocation boundaries which gives clues to size / allocation related bugs.

Yes. That’s missing too. I just scroll manually.

I created an issue, since no one else seems to have (not for the combos of search keywords I tried, anyway):

I’ve added the missing (edit: actually, present, but not-always-fully-working) scroll-to to my other issue here:

edit: I’ve now submitted an MR fixing the missing flashing of widgets from the object tree.

1 Like

@dboles: thanks for the initiative.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.