*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 12 Feb 2004 15:58:27 +0100
changeset 2626 2f0df284f022
parent 2625 f9e502987d9a
child 2627 c08a4b177a2d
*** empty log message ***
CharacterSetView.st
--- a/CharacterSetView.st	Thu Feb 12 15:52:56 2004 +0100
+++ b/CharacterSetView.st	Thu Feb 12 15:58:27 2004 +0100
@@ -129,7 +129,7 @@
     bLast action:last.
 
     rangeLabel := Label label:'RangeStart .. RangeStop' in:panel.
-    codePointLabel := Label label:'Click on glyph to see its codePoint.' in:panel.
+    codePointLabel := Label label:clickLabel in:panel.
     codePointLabel foregroundColor:(Color blue).
 
     update value.
@@ -195,26 +195,33 @@
     dY := (hRow - (font height)) // 2 + (font ascent).
 
     0 to:15 do:[:row |
-        |y0 y rowBase|
+        |y0 y1 y rowBase|
 
         rowBase := row * 16r10.
         y := y0 := row * hRow.
+        y := y rounded asInteger.
         y := y + dY.
-        y := y rounded asInteger.
+
+        y1 := (row+1) * hRow.
+        y1 := y1 rounded asInteger.
+
         0 to:15 do:[:col |
-            |x0 x codePoint s|
+            |x0 x1 x codePoint s|
 
             codePoint := rowBase + col.
             s := (Character value:(self codePage * 16r100) + codePoint) asString.
 
             x := x0 := (col * wCol) rounded asInteger.
+            x := x rounded asInteger.
             x := x + (wCol / 2).
-            x := x - ((font widthOf:s) / 2).
-            x := x rounded asInteger.
+            x := x - ((font widthOf:s) // 2).
+
+            x1 := ((col+1) * wCol) rounded asInteger.
+            x1 := x1 rounded asInteger.
 
             codePoint == self selectedCodePoint ifTrue:[
                 self paint:(Color red).
-                self fillRectangle:((x0@y0 extent:wCol@hRow) insetBy:1).
+                self fillRectangle:((x0+1)@(y0+1) corner:(x1)@(y1)).
                 self paint:(Color white).
                 self displayString:s x:x y:y.
                 self paint:(Color black).
@@ -289,5 +296,5 @@
 !CharacterSetView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/CharacterSetView.st,v 1.5 2004-02-12 14:52:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/CharacterSetView.st,v 1.6 2004-02-12 14:58:27 cg Exp $'
 ! !