#REFACTORING by cg
class: Tools::CodeView2::GutterView
added: #computePreferredExtent
removed: #preferredExtent
--- a/Tools__CodeView2.st Sat Nov 10 00:36:12 2018 +0100
+++ b/Tools__CodeView2.st Sat Nov 10 00:40:40 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
All Rights Reserved
@@ -2573,6 +2575,20 @@
"Created: / 07-10-2011 / 19:54:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+computePreferredExtent
+ | font w h |
+
+ font := self font.
+ w := (font widthOf:'00') + self padding.
+ h := textView notNil
+ ifTrue:[textView height]
+ ifFalse:[font height * 12].
+
+ ^ (preferredExtent := w @ h)
+
+ "Created: / 09-11-2018 / 20:03:11 / Claus Gittinger"
+!
+
padding
^self paddingLeft + self paddingRight
@@ -2601,24 +2617,6 @@
"Modified: / 16-02-2012 / 22:40:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-preferredExtent
- | font w h |
-
- explicitExtent notNil ifTrue:[ ^ explicitExtent ].
- preferredExtent notNil ifTrue:[ ^ preferredExtent ].
-
- font := self font.
- w := (font widthOf:'00') + self padding.
- h := textView notNil
- ifTrue:[textView height]
- ifFalse:[font height * 12].
-
- ^preferredExtent := w @ h
-
- "Modified: / 16-06-2011 / 14:03:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 26-03-2012 / 11:19:54 / cg"
-!
-
usedWidthForAcceptCancel
^ (codeView notNil and:[codeView showAcceptCancelBar]) ifTrue:[widthAcceptCancel ? 0] ifFalse:[0]
! !