`NoteBookView`: take `DefaultActiveTabMarkerFgColor` from stylesheet jv
authorJan Vrany <jan.vrany@labware.com>
Thu, 19 Aug 2021 22:15:18 +0100
branchjv
changeset 6257 8d5c522fb553
parent 6256 e00dd2ef4b29
child 6258 74671fcd6bb4
`NoteBookView`: take `DefaultActiveTabMarkerFgColor` from stylesheet ...rather than hard-coding it! The hardcoded value is used as a default for backward compatibility, although it'd be more sensible to use `DefaultActiveTabMarkerColor` as default.
NoteBookView.st
--- a/NoteBookView.st	Thu Aug 19 10:46:10 2021 +0100
+++ b/NoteBookView.st	Thu Aug 19 22:15:18 2021 +0100
@@ -1,6 +1,7 @@
 "
  COPYRIGHT (c) 1997 by eXept Software AG
  COPYRIGHT (c) 2017 Jan Vrany
+ COPYRIGHT (c) 2021 LabWare
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -56,6 +57,7 @@
 "
  COPYRIGHT (c) 1997 by eXept Software AG
  COPYRIGHT (c) 2017 Jan Vrany
+ COPYRIGHT (c) 2021 LabWare
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -163,7 +165,7 @@
                        #'noteBook.activeForegroundColor' #'noteBook.activeBackgroundColor'
                        #'noteBook.lightColor' #'noteBook.halfLightColor' #'noteBook.shadowColor'
                        #'noteBook.halfShadowColor' #'noteBook.edgeStyle'
-                       #'noteBook.activeTabMarkerColor'
+                       #'noteBook.activeTabMarkerColor' #'noteBook.activeTabMarkerColor2'
                        #'noteBook.showRemoveTabIcon' 
                       )>
 
@@ -209,7 +211,13 @@
     DefaultActiveTabMarkerColor isNil ifTrue:[
         DefaultActiveTabMarkerFgColor := nil.
     ] ifFalse:[
-        DefaultActiveTabMarkerFgColor := Color redByte:255 greenByte:138 blueByte:41.
+        "/ Originally, a hard-coded color was assigned to
+        "/ DefaultActiveTabMarkerFgColor. Why the hell the color
+        "/ was NOT taken from stylesheet? Sigh.
+
+        "/ DefaultActiveTabMarkerFgColor := Color redByte:255 greenByte:138 blueByte:41.
+        DefaultActiveTabMarkerFgColor := StyleSheet colorAt:#'noteBook.activeTabMarkerColor2'
+                                                    default:[Color redByte:255 greenByte:138 blueByte:41]
     ].
 
     ((StyleSheet at:#'noteBook.showRemoveTabIcon' default:true)
@@ -225,6 +233,8 @@
     "
      self updateStyleCache
     "
+
+    "Modified (format): / 19-08-2021 / 22:12:57 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !NoteBookView class methodsFor:'image specs'!