--- a/Tools__CodeView2.st Tue Aug 28 14:18:45 2018 +0200
+++ b/Tools__CodeView2.st Tue Aug 28 15:06:19 2018 +0200
@@ -52,8 +52,9 @@
instanceVariableNames:'codeView textView textViewScroller widthAcceptCancel
widthAnnotations widthDiffInfo numberOfLines acceptColor
cancelColor diffColor menuHolder currentBlockNodeHolder
- showLineNumbers blockWaitingForPossibleDoubleClick compareAction'
- classVariableNames:''
+ showLineNumbers blockWaitingForPossibleDoubleClick compareAction
+ lineNrColor'
+ classVariableNames:'DefaultLineNrColor'
poolDictionaries:''
privateIn:CodeView2
!
@@ -2459,6 +2460,19 @@
^ self
! !
+!CodeView2::GutterView class methodsFor:'defaults'!
+
+updateStyleCache
+ DefaultLineNrColor := StyleSheet
+ colorAt:#'gutter.lineNrColor'
+ default:[
+ View defaultViewBackgroundColor brightness < 0.8
+ ifTrue:[Color grey:75]
+ ifFalse:[Color grey]]
+
+ "Created: / 28-08-2018 / 14:59:31 / Claus Gittinger"
+! !
+
!CodeView2::GutterView class methodsFor:'documentation'!
documentation
@@ -2902,6 +2916,22 @@
!CodeView2::GutterView methodsFor:'initialize & release'!
+initStyle
+ super initStyle.
+
+ acceptColor := Color greenCaringForColorBlindness.
+ cancelColor := Color redCaringForColorBlindness.
+ diffColor := Color yellow.
+
+ acceptColor := acceptColor lighter onDevice:device.
+ cancelColor := cancelColor lighter lighter onDevice:device.
+ diffColor := diffColor lighter lighter onDevice:device.
+
+ lineNrColor := DefaultLineNrColor ? Color grey.
+
+ "Created: / 28-08-2018 / 14:58:43 / Claus Gittinger"
+!
+
initialize
super initialize.
@@ -2913,18 +2943,13 @@
widthAnnotations := "16"8.
widthDiffInfo := 5.
- acceptColor := Color greenCaringForColorBlindness.
- cancelColor := Color redCaringForColorBlindness.
- diffColor := Color yellow.
-
- acceptColor := acceptColor lighter onDevice:device.
- cancelColor := cancelColor lighter lighter onDevice:device.
- diffColor := diffColor lighter lighter onDevice:device.
+ self initStyle.
self enableMotionEvents. "/ for per-line tooltips
"Created: / 16-06-2011 / 13:47:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 03-02-2017 / 14:05:03 / cg"
+ "Modified: / 28-08-2018 / 14:58:55 / Claus Gittinger"
!
release
@@ -2974,11 +2999,18 @@
"return special color for given line if required, nil otherwise"
"used only if lineFont returns nil"
- ^ Color grey.
- "/ ^ nil
+ lineNrColor isNil ifTrue:[
+ View defaultViewBackgroundColor brightness < 0.8 ifTrue:[
+ lineNrColor := Color grey:75.
+ ] ifFalse:[
+ lineNrColor := Color grey.
+ ].
+ ].
+ ^ lineNrColor.
"Created: / 14-12-2009 / 15:01:31 / Jindra <a>"
"Modified: / 28-04-2017 / 08:04:53 / cg"
+ "Modified: / 28-08-2018 / 15:05:44 / Claus Gittinger"
!
lineDisplayable:lineNr