Tools__CodeView2.st
branchjv
changeset 16256 65473fc50115
parent 16156 9b9fa51009d2
parent 16243 d10057b93404
child 16572 ab23beb4bba6
--- a/Tools__CodeView2.st	Sat Apr 02 06:55:28 2016 +0200
+++ b/Tools__CodeView2.st	Sun Apr 03 07:05:07 2016 +0200
@@ -2736,9 +2736,9 @@
     cancelColor := Color red.
     diffColor := Color yellow.
 
-    acceptColor := acceptColor lighter onDevice:self graphicsDevice.
-    cancelColor := cancelColor lighter lighter onDevice:self graphicsDevice.
-    diffColor := diffColor lighter lighter onDevice:self graphicsDevice.
+    acceptColor := acceptColor lighter onDevice:device.
+    cancelColor := cancelColor lighter lighter onDevice:device.
+    diffColor := diffColor lighter lighter onDevice:device.
 
     self enableMotionEvents.   "/ for per-line tooltips
 
@@ -2949,14 +2949,15 @@
      Color of drawn objects should be taken from lineFont, lineColor"
 
     |lineString yTop yBaseline fontAscent fontDescent
-     textW requiredW oldFont newFont oldColor newColor myFont|
+     textW requiredW oldFont newFont oldColor newColor myFont textViewFont|
 
     shown ifFalse:[ ^ self ]. "/ Do not bother if the view is not shown.
     textView isNil ifTrue:[^ self].     "/ happens when shown in UIPainter
-
+        
     requiredW := self width.
     myFont := gc font.
-
+    textViewFont := textView font.
+    
     showLineNumbers ifTrue:[
         lineString := self displayedString:line.
 
@@ -2974,8 +2975,8 @@
         ].
         newFont ~~ oldFont ifTrue:[
             "/ ensure that the line number lines are not higher than the text lines
-            (newFont heightOn:self graphicsDevice) > (textView font heightOn:self graphicsDevice) ifTrue:[
-                newFont := textView font.
+            (newFont heightOn:device) > (textViewFont heightOn:device) ifTrue:[
+                newFont := textViewFont.
             ].
             newFont ~~ oldFont ifTrue:[
                 self font:newFont.
@@ -2984,9 +2985,8 @@
         ].
     ].
 
-    fontAscent := textView font ascentOn:self graphicsDevice.
-    fontDescent := textView font descentOn:self graphicsDevice.
-
+    fontAscent := textViewFont ascentOn:device.
+    fontDescent := textViewFont descentOn:device.
 
     yTop := (self yOfTextViewLine:line) ? 0.
     yBaseline := yTop + fontAscent.