CheckBox.st
changeset 6207 f1153d2737ef
parent 6194 29981ae53019
child 6238 1f70ed3090a4
equal deleted inserted replaced
6206:eafcd0d072f5 6207:f1153d2737ef
   288     "extract values from the styleSheet and cache them in class variables"
   288     "extract values from the styleSheet and cache them in class variables"
   289 
   289 
   290     <resource: #style (#'checkBox.labelForegroundColor'
   290     <resource: #style (#'checkBox.labelForegroundColor'
   291                        #'checkBox.disabledLabelForegroundColor'
   291                        #'checkBox.disabledLabelForegroundColor'
   292                        #'checkBox.disabledLabelEtchedForegroundColor'
   292                        #'checkBox.disabledLabelEtchedForegroundColor'
   293                        #'checkBox.toggleLeft')>
   293                        #'checkBox.toggleLeft' #'label.font')>
   294 
   294 
   295     DefaultFont                         := StyleSheet fontAt:'label.font'.
   295     DefaultFont                         := StyleSheet fontAt:'label.font'.
   296     DefaultLabelForegroundColor         := StyleSheet colorAt:'checkBox.labelForegroundColor'.
   296     DefaultLabelForegroundColor         := StyleSheet colorAt:'checkBox.labelForegroundColor'.
   297     DefaultDisabledLabelForegroundColor := StyleSheet colorAt:'checkBox.disabledLabelForegroundColor'.
   297     DefaultDisabledLabelForegroundColor := StyleSheet colorAt:'checkBox.disabledLabelForegroundColor'.
   298     DefaultDisabledLabelForegroundColor isNil ifTrue:[
   298     DefaultDisabledLabelForegroundColor isNil ifTrue:[
   300     ].
   300     ].
   301     DefaultDisabledLabelEtchedForegroundColor := StyleSheet colorAt:'checkBox.disabledLabelEtchedForegroundColor'.
   301     DefaultDisabledLabelEtchedForegroundColor := StyleSheet colorAt:'checkBox.disabledLabelEtchedForegroundColor'.
   302     DefaultDisabledLabelEtchedForegroundColor isNil ifTrue:[
   302     DefaultDisabledLabelEtchedForegroundColor isNil ifTrue:[
   303         DefaultDisabledLabelEtchedForegroundColor := StyleSheet colorAt:'button.disabledEtchedForegroundColor'.
   303         DefaultDisabledLabelEtchedForegroundColor := StyleSheet colorAt:'button.disabledEtchedForegroundColor'.
   304     ].
   304     ].
   305     CheckToggleLeft                     := StyleSheet at:'checkBox.toggleLeft' default:true
   305     CheckToggleLeft := StyleSheet at:'checkBox.toggleLeft' default:true
   306 
   306 
   307     "
   307     "
   308      self updateStyleCache
   308      self updateStyleCache
   309     "
   309     "
   310 
   310 
   537 !
   537 !
   538 
   538 
   539 font:aFont
   539 font:aFont
   540     "set the font. Forward to the label & resize myself.
   540     "set the font. Forward to the label & resize myself.
   541      CAVEAT: with the addition of Text objects,
   541      CAVEAT: with the addition of Text objects,
   542 	     this method is going to be obsoleted by a textStyle
   542              this method is going to be obsoleted by a textStyle
   543 	     method, which allows specific control over
   543              method, which allows specific control over
   544 	     normalFont/boldFont/italicFont parameters."
   544              normalFont/boldFont/italicFont parameters."
   545 
   545 
   546     labelView font:aFont.
   546     labelView font:aFont.
   547     labelView forceResize.
   547     labelView forceResize.
   548     self layoutChanged.
   548     self layoutChanged.
   549     self resize.
   549     self resize.