NoteBookView.st
changeset 3548 7704472171a6
parent 3531 5437285066ab
child 3578 c26dbbad64f6
--- a/NoteBookView.st	Tue Oct 07 15:16:51 2008 +0200
+++ b/NoteBookView.st	Thu Oct 09 15:16:00 2008 +0200
@@ -168,10 +168,11 @@
     DefaultActiveTabMarkerColor isNil ifTrue:[
         DefaultActiveTabMarkerFgColor := nil.
     ] ifFalse:[
-        DefaultActiveTabMarkerFgColor :=  Color redByte:255 greenByte:138 blueByte:41.
+        DefaultActiveTabMarkerFgColor := Color redByte:255 greenByte:138 blueByte:41.
     ].
 
-    (StyleSheet at:#'noteBook.showRemoveTabIcon' default:true) ifTrue:[
+    ((StyleSheet at:#'noteBook.showRemoveTabIcon' default:true)
+    and:[ ToolbarIconLibrary notNil ]) ifTrue:[
         RemoveTabIcon := ToolbarIconLibrary removeTabIcon.
         RemoveTabEnteredIcon := ToolbarIconLibrary removeTabEnteredIcon.   
     ] ifFalse:[
@@ -1700,18 +1701,18 @@
 buttonMotion:buttonState x:x y:y
     |tab mustShowEntered|
 
-    RemoveTabIcon notNil ifTrue:[
-        tab := self tabContainingPointX:x y:y.
-        (tab notNil and:[tab == self selectedTab]) ifTrue:[
-            (showDestroyTabButton and:[destroyTabAction notNil]) ifTrue:[
-                mustShowEntered := (self destroyButtonFrameForTab:tab) containsPoint:(x@y).
-                mustShowEntered ~~ showingEnteredRemoveTabButton ifTrue:[
-                    showingEnteredRemoveTabButton := mustShowEntered.
-                    self drawDestroyButtonForTab:tab.    
-                ]
-            ].
+    "/ if we have to show a different icon while over the tab...
+    tab := self tabContainingPointX:x y:y.
+    (tab notNil and:[tab == self selectedTab]) ifTrue:[
+        (showDestroyTabButton and:[destroyTabAction notNil]) ifTrue:[
+            mustShowEntered := (self destroyButtonFrameForTab:tab) containsPoint:(x@y).
+            mustShowEntered ~~ showingEnteredRemoveTabButton ifTrue:[
+                showingEnteredRemoveTabButton := mustShowEntered.
+                self drawDestroyButtonForTab:tab.    
+            ]
         ].
     ].
+
     super buttonMotion:buttonState x:x y:y
 
     "Modified: / 01-03-2007 / 17:07:41 / cg"
@@ -3683,5 +3684,5 @@
 !NoteBookView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.153 2008-08-09 12:46:43 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.154 2008-10-09 13:16:00 cg Exp $'
 ! !