--- a/SimpleView.st Mon Dec 20 12:08:12 2010 +0100
+++ b/SimpleView.st Mon Dec 20 14:40:45 2010 +0100
@@ -1299,8 +1299,8 @@
anyway."
<resource: #style (#viewSpacing #font #borderWidth #borderColor
- #viewBackground #shadowColor #lightColor
- #focusColor #focusBorderWidth)>
+ #viewBackground #shadowColor #lightColor
+ #focusColor #focusBorderWidth)>
|bgGrey currentScreen|
@@ -1309,72 +1309,72 @@
and keep the values in fast class variables
"
StyleSheet isNil ifTrue:[
- self setDefaultStyle.
- self readStyleSheet.
- ].
-
- currentScreen := Screen current.
+ self setDefaultStyle.
+ self readStyleSheet.
+ ].
+
+ currentScreen := Screen current ? Screen default.
Grey := StyleSheet viewGrey.
Grey isNil ifTrue:[
- Grey := Color grey
+ Grey := Color grey
].
Grey := Grey onDevice:currentScreen.
StyleSheet fileReadFailed ifTrue:[
- bgGrey := White
+ bgGrey := White
] ifFalse:[
- currentScreen hasGrayscales ifTrue:[
- bgGrey := Grey
- ] ifFalse:[
- bgGrey := White
- ]
+ currentScreen hasGrayscales ifTrue:[
+ bgGrey := Grey
+ ] ifFalse:[
+ bgGrey := White
+ ]
].
bgGrey := bgGrey onDevice:currentScreen.
ViewSpacing := StyleSheet at:#viewSpacing.
ViewSpacing isNil ifTrue:[
- ViewSpacing := currentScreen defaultStyleValueFor:#viewSpacing.
+ ViewSpacing := currentScreen defaultStyleValueFor:#viewSpacing.
].
DefaultBorderColor := StyleSheet colorAt:#borderColor.
DefaultBorderColor isNil ifTrue:[
- DefaultBorderColor := currentScreen defaultStyleValueFor:#borderColor
+ DefaultBorderColor := currentScreen defaultStyleValueFor:#borderColor
].
StyleSheet fileReadFailed ifTrue:[
- DefaultBorderWidth := 1.
- DefaultShadowColor := Black.
- DefaultLightColor := White.
- DefaultFocusColor := Black.
- DefaultFocusBorderWidth := 1.
- DefaultViewBackgroundColor := White.
+ DefaultBorderWidth := 1.
+ DefaultShadowColor := Black.
+ DefaultLightColor := White.
+ DefaultFocusColor := Black.
+ DefaultFocusBorderWidth := 1.
+ DefaultViewBackgroundColor := White.
] ifFalse:[
- DefaultBorderWidth := StyleSheet at:#borderWidth default:0.
- DefaultViewBackgroundColor := StyleSheet colorAt:#viewBackground default:bgGrey.
- DefaultShadowColor := StyleSheet colorAt:#shadowColor.
- DefaultLightColor := StyleSheet colorAt:#lightColor.
- DefaultFocusColor := StyleSheet colorAt:#focusColor default:Color red.
- DefaultFocusBorderWidth := StyleSheet at:'focusBorderWidth' default:2.
+ DefaultBorderWidth := StyleSheet at:#borderWidth default:0.
+ DefaultViewBackgroundColor := StyleSheet colorAt:#viewBackground default:bgGrey.
+ DefaultShadowColor := StyleSheet colorAt:#shadowColor.
+ DefaultLightColor := StyleSheet colorAt:#lightColor.
+ DefaultFocusColor := StyleSheet colorAt:#focusColor default:Color red.
+ DefaultFocusBorderWidth := StyleSheet at:'focusBorderWidth' default:2.
].
self == SimpleView ifTrue:[
- DefaultFont := StyleSheet at:#font.
- DefaultFont isNil ifTrue:[
- DefaultFont := Font family:'courier' face:'medium' style:'roman' size:12.
- ].
- DefaultFont := DefaultFont onDevice:currentScreen.
+ DefaultFont := StyleSheet at:#font.
+ DefaultFont isNil ifTrue:[
+ DefaultFont := Font family:'courier' face:'medium' style:'roman' size:12.
+ ].
+ DefaultFont := DefaultFont onDevice:currentScreen.
] ifFalse:[
- DefaultFont := nil
+ DefaultFont := nil
].
DefaultViewBackgroundColor isNil ifTrue:[
- 'SimpleView [warning]: bad viewBackground in style - using white' errorPrintCR.
- DefaultViewBackgroundColor := White
- ].
-
- "Modified: / 29.4.1997 / 11:16:52 / dq"
- "Modified: / 8.3.1999 / 01:36:05 / cg"
+ 'SimpleView [warning]: bad viewBackground in style - using white' errorPrintCR.
+ DefaultViewBackgroundColor := White
+ ].
+
+ "Modified: / 29-04-1997 / 11:16:52 / dq"
+ "Modified: / 20-12-2010 / 14:40:22 / cg"
!
viewSpacing
@@ -10740,11 +10740,11 @@
!SimpleView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.680 2010-12-09 17:14:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.681 2010-12-20 13:40:45 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.680 2010-12-09 17:14:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.681 2010-12-20 13:40:45 cg Exp $'
! !
SimpleView initialize!