[lookingGlass] Add style information to the picker
Currently the picker displays information on the hovered actor's position and the object itself. Adding style id and class of StWidgets to the displayed information can be very helpful for identifying a particular actor or code segment. https://bugzilla.gnome.org/show_bug.cgi?id=611211
This commit is contained in:
parent
72cb4bf346
commit
d7075d9913
@ -295,7 +295,14 @@ Inspector.prototype = {
|
|||||||
let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL,
|
let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL,
|
||||||
stageX,
|
stageX,
|
||||||
stageY);
|
stageY);
|
||||||
displayText.text = '<inspect x: ' + stageX + ' y: ' + stageY + '> ' + target;
|
let id, style_class;
|
||||||
|
if (target instanceof St.Widget) {
|
||||||
|
id = target.get_theme_node().get_element_id();
|
||||||
|
style_class = target.get_theme_node().get_element_class();
|
||||||
|
}
|
||||||
|
let position = '<inspect x: ' + stageX + ' y: ' + stageY + '>';
|
||||||
|
let style = '<style id: ' + id + ' class: ' + style_class + '>';
|
||||||
|
displayText.text = position + ' ' + style + ' ' + target;
|
||||||
if (borderPaintTarget != null)
|
if (borderPaintTarget != null)
|
||||||
borderPaintTarget.disconnect(borderPaintId);
|
borderPaintTarget.disconnect(borderPaintId);
|
||||||
borderPaintTarget = target;
|
borderPaintTarget = target;
|
||||||
|
Loading…
Reference in New Issue
Block a user