NoteBookView.st
changeset 4155 fbb899a80326
parent 4121 9e7942ceeada
child 4158 dc5245affaeb
equal deleted inserted replaced
4154:6af77b1d2c34 4155:fbb899a80326
   706 
   706 
   707     (aColor isColor and:[viewBackground ~= aColor]) ifTrue:[
   707     (aColor isColor and:[viewBackground ~= aColor]) ifTrue:[
   708         super viewBackground:aColor.
   708         super viewBackground:aColor.
   709         backgroundColor := viewBackground.
   709         backgroundColor := viewBackground.
   710         activeBackgroundColor := backgroundColor.
   710         activeBackgroundColor := backgroundColor.
   711 
   711         foregroundColor := backgroundColor contrastingBlackOrWhite.
   712         backgroundColor brightness < 0.5 ifTrue:[
   712         activeForegroundColor := foregroundColor.
   713             foregroundColor := Color white.
   713 
       
   714         foregroundColor = Color white ifTrue:[
   714             disabledForegroundColor := Color veryLightGray.
   715             disabledForegroundColor := Color veryLightGray.
   715         ] ifFalse:[
   716         ] ifFalse:[
   716             foregroundColor := Color black.
       
   717             disabledForegroundColor := backgroundColor darker.
   717             disabledForegroundColor := backgroundColor darker.
   718         ].
   718         ].
   719         activeForegroundColor := foregroundColor.
       
   720     ].
   719     ].
   721 ! !
   720 ! !
   722 
   721 
   723 !NoteBookView methodsFor:'accessing-dimension'!
   722 !NoteBookView methodsFor:'accessing-dimension'!
   724 
   723 
  3737 ! !
  3736 ! !
  3738 
  3737 
  3739 !NoteBookView class methodsFor:'documentation'!
  3738 !NoteBookView class methodsFor:'documentation'!
  3740 
  3739 
  3741 version_CVS
  3740 version_CVS
  3742     ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.174 2012-04-21 17:14:59 stefan Exp $'
  3741     ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.175 2012-12-11 15:44:10 stefan Exp $'
  3743 ! !
  3742 ! !