From d7075d9913c9395c6202d393d6f17b5c8478976d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 18 Jan 2010 04:16:39 +0100 Subject: [PATCH] [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 --- js/ui/lookingGlass.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 783d3ef0f..403324b5f 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -295,7 +295,14 @@ Inspector.prototype = { let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, stageX, stageY); - displayText.text = ' ' + 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 = ''; + let style = '