[gnome-shell] [lookingGlass] Add style information to the picker
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [lookingGlass] Add style information to the picker
- Date: Fri, 26 Feb 2010 22:26:35 +0000 (UTC)
commit d7075d9913c9395c6202d393d6f17b5c8478976d
Author: Florian Müllner <fmuellner src gnome org>
Date: Mon Jan 18 04:16:39 2010 +0100
[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 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index 783d3ef..403324b 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 = '<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)
borderPaintTarget.disconnect(borderPaintId);
borderPaintTarget = target;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]