#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Mon, 27 May 2019 13:28:21 +0200
changeset 3667 0b24b3e8c949
parent 3666 7ec8466f4f67
child 3668 d86e171efa4c
#FEATURE by cg class: Tools::ViewTreeInspectorApplication::ViewTreeItem changed: #icon class: Tools::ViewTreeInspectorApplication::ViewTreeModel::ItemList changed: #additionalLabelForItem:
Tools__ViewTreeApplication.st
--- a/Tools__ViewTreeApplication.st	Sun May 19 11:49:14 2019 +0200
+++ b/Tools__ViewTreeApplication.st	Mon May 27 13:28:21 2019 +0200
@@ -3300,9 +3300,15 @@
     |specClass model|
 
     menuItem notNil ifTrue:[
-	menuItem label isImage ifTrue:[
-	    ^ menuItem label magnifiedTo:20@20.
-	].
+        menuItem isSeparator ifTrue:[
+            (parent widget perform:#isVerticalLayout ifNotUnderstood:[^ DividerSpec icon]) ifTrue:[
+                ^ DividerSpec horizontalIcon.
+            ].    
+            ^ DividerSpec verticalIcon.
+        ].    
+        menuItem label isImage ifTrue:[
+            ^ menuItem label magnifiedTo:20@20.
+        ].
     ].
 
     specClass := self specClass.
@@ -3310,11 +3316,12 @@
 
     model := self treeModel.
     model notNil ifTrue:[
-	^ model iconAt:specClass ifNonePut:[specClass icon]
+        ^ model iconAt:specClass ifNonePut:[specClass icon]
     ].
     ^ specClass icon
 
     "Modified: / 16-08-2017 / 13:00:35 / cg"
+    "Modified: / 27-05-2019 / 13:27:28 / Claus Gittinger"
 !
 
 label
@@ -4764,35 +4771,46 @@
 additionalLabelForItem:anItem
     "answer the additional lable for an item or nil"
 
-    |widget l applClass applClassName key|
+    |widget l applClass applClassName key label|
 
     l := nil.
     showWidgetNames == true ifTrue:[
-	(widget := anItem widget) notNil ifTrue:[
-	    l := '"', widget name, '"'
-	] ifFalse:[
-	    l := '"', anItem menuItem label asString, '"'
-	].
+        (widget := anItem widget) notNil ifTrue:[
+            l := '"', widget name, '"'
+        ] ifFalse:[
+            "/ a menuItem
+            anItem menuItem isSeparator ifTrue:[
+            ] ifFalse:[    
+                label := anItem menuItem label.
+                label isImage ifTrue:[
+                    l := ''
+                ] ifFalse:[
+                    l := '"', label asString, '"'
+                ].
+                l := l , ' value: ',anItem menuItem itemValue printString.
+            ].
+        ].
     ].
 
     anItem isApplicationClass ifTrue:[
-	applClass := anItem applicationClass.
-	applClass notNil ifTrue:[
-	    applClassName := '[', applClass name allBold, ']'.
-	    l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName
-	].
+        applClass := anItem applicationClass.
+        applClass notNil ifTrue:[
+            applClassName := '[', applClass name allBold, ']'.
+            l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName
+        ].
     ].
 
     application notNil ifTrue:[
-	key := application builder namedComponents keyAtValue:widget ifAbsent:nil.
-	key notNil ifTrue:[
-	    l := l , ' #',key
-	].
+        key := application builder namedComponents keyAtValue:widget ifAbsent:nil.
+        key notNil ifTrue:[
+            l := l , ' #',key
+        ].
     ].
 
     ^ l
 
     "Modified: / 16-08-2017 / 12:47:12 / cg"
+    "Modified: / 27-05-2019 / 13:19:35 / Claus Gittinger"
 !
 
 showWidgetNames