class: Tools::TagsBrowser
authorClaus Gittinger <cg@exept.de>
Sat, 21 Jun 2014 10:51:54 +0200
changeset 14526 a60031f581d2
parent 14525 bd238db12086
child 14527 5d2cb6b8ac49
class: Tools::TagsBrowser
Tools__TagsBrowser.st
--- a/Tools__TagsBrowser.st	Fri Jun 20 15:03:00 2014 +0200
+++ b/Tools__TagsBrowser.st	Sat Jun 21 10:51:54 2014 +0200
@@ -2585,35 +2585,37 @@
 drawLabelAt:anIndex x:x y:y h:h
     "draw the label at position x/y without clearing the background
     "
-    |item label typeIdentifier
+    |item label typeIdentifier font
      y0 widthOfTypeIdentifier inset inSelection lineNrString|
 
     item := list at:anIndex ifAbsent:nil.
     item isNil ifTrue:[^ self].
 
+    font := gc font.
+
     label := item printString ? ''.
     (inSelection := self isInSelection:anIndex) ifTrue:[
-	self paint:hilightFgColor on:hilightBgColor.
-	label := label string.   "/ to avoid printing blue on blue
+        self paint:hilightFgColor on:hilightBgColor.
+        label := label string.   "/ to avoid printing blue on blue
     ] ifFalse:[
-	self paint:fgColor on:bgColor.
+        self paint:fgColor on:bgColor.
     ].
 
     lineNrString := ' [ %1 ]' bindWith:item lineNumber.
     inSelection ifFalse:[
-	lineNrString := lineNrString colorizeAllWith:Color darkGrey.
+        lineNrString := lineNrString colorizeAllWith:Color darkGrey.
     ].
     label := label asText , lineNrString.
 
-    y0 := y - (((gc font height) + 1 - h) // 2) + gc font ascent.
+    y0 := y - (((font height) + 1 - h) // 2) + font ascent.
 
     typeIdentifier := item typeIdentifierInList.
     typeIdentifier isNil ifTrue:[
-	widthOfTypeIdentifier := 0
+        widthOfTypeIdentifier := 0
     ] ifFalse:[
-	typeIdentifier := Text string:typeIdentifier emphasis:#bold.
-	typeIdentifier displayOn:self x:x y:y0.
-	widthOfTypeIdentifier := self font widthOf:typeIdentifier.
+        typeIdentifier := Text string:typeIdentifier emphasis:#bold.
+        typeIdentifier displayOn:self x:x y:y0.
+        widthOfTypeIdentifier := (font widthOf:typeIdentifier)+(font widthOf:Character space).
     ].
     inset := TypeInset max:widthOfTypeIdentifier.
 
@@ -2801,13 +2803,14 @@
 !TagsBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.51 2014-06-10 10:23:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.52 2014-06-21 08:51:54 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.51 2014-06-10 10:23:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.52 2014-06-21 08:51:54 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__TagsBrowser.st,v 1.51 2014-06-10 10:23:28 cg Exp $'
+    ^ '$Id: Tools__TagsBrowser.st,v 1.52 2014-06-21 08:51:54 cg Exp $'
 ! !
+