Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.716.mcz ==================== Summary ==================== Name: System-mt.716 Author: mt Time: 3 April 2015, 5:07:50.544 pm UUID: 5739fe6f-df77-bb41-8dcc-1ff566ff6848 Ancestors: System-topa.715 Refactored window color handling. Added a #normalColor to the specs because I will remove the #duller-hack from SystemWindow and this ensures that users will not be overwhelmed by bright colors. =============== Diff against System-topa.715 =============== Item was changed: ----- Method: Object class>>windowColorSpecification (in category '*System-Support-window color') ----- windowColorSpecification "Answer a WindowColorSpec object that declares my preference. This is a backstop for classes that don't otherwise define a preference." ^ WindowColorSpec classSymbol: self name + wording: 'Default' brightColor: #veryVeryLightGray + pastelColor: #veryVeryLightGray + normalColor: #veryVeryLightGray - wording: 'Default' brightColor: #white - pastelColor: #white helpMessage: 'Other windows without color preferences.'! Item was removed: - ----- Method: Preferences class>>installMissingWindowColors (in category 'window colors') ----- - installMissingWindowColors - "Install the factory-provided bright window colors -- a one-time bootstrap" - "Preferences installMissingWindowColors" - - self windowColorTable do: - [:aColorSpec | | color | - color := (Color colorFrom: aColorSpec brightColor). - self setWindowColorFor: aColorSpec classSymbol to: color]! Item was added: + ----- Method: Preferences class>>installNormalWindowColors (in category 'window colors') ----- + installNormalWindowColors + "Install the factory-provided default window colors for all tools" + + "Preferences installNormalWindowColors" + + self installWindowColorsVia: [:aSpec | aSpec normalColor]! Item was changed: ----- Method: Preferences class>>windowColorFor: (in category 'window colors') ----- windowColorFor: aModelClassName | classToCheck prefSymbol | self checkForWindowColors. classToCheck := Smalltalk at: aModelClassName. prefSymbol := self windowColorPreferenceForClassNamed: classToCheck name. [(classToCheck ~~ Object) and: [(self preferenceAt: prefSymbol) isNil]] whileTrue: [classToCheck := classToCheck superclass. prefSymbol := self windowColorPreferenceForClassNamed: classToCheck name]. + ^self valueOfPreference: prefSymbol ifAbsent: [self uniformWindowColor].! - ^self valueOfPreference: prefSymbol ifAbsent: [Color white].! Item was changed: Object subclass: #WindowColorSpec + instanceVariableNames: 'classSymbol wording brightColor pastelColor normalColor helpMessage' - instanceVariableNames: 'classSymbol wording brightColor pastelColor helpMessage' classVariableNames: '' poolDictionaries: '' category: 'System-Support'! Item was added: + ----- Method: WindowColorSpec class>>classSymbol:wording:brightColor:pastelColor:normalColor:helpMessage: (in category 'instance creation') ----- + classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg + + ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg! Item was changed: ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'initialization') ----- classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg "Initialize the receiver's instance variables" + self + classSymbol: sym + wording: wrd + brightColor: brCol + pastelColor: paCol + normalColor: (Color colorFrom: brCol) duller + helpMessage: hlpMsg! - classSymbol := sym. - wording := wrd. - brightColor := brCol. - pastelColor := paCol. - helpMessage := hlpMsg! Item was added: + ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:normalColor:helpMessage: (in category 'initialization') ----- + classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg + "Initialize the receiver's instance variables" + + classSymbol := sym. + wording := wrd. + brightColor := brCol. + pastelColor := paCol. + normalColor := noCol. + helpMessage := hlpMsg! Item was added: + ----- Method: WindowColorSpec>>normalColor (in category 'access') ----- + normalColor + + ^ normalColor! Item was changed: ----- Method: WindowColorSpec>>printOn: (in category 'printing') ----- printOn: aStream "Print the receiver on a stream" super printOn: aStream. classSymbol printOn: aStream. + aStream nextPutAll: ' bright: ', brightColor printString, ' pastel: ', pastelColor printString, ' normal: ', normalColor printString! - aStream nextPutAll: ' bright: ', brightColor printString, ' pastel: ', pastelColor printString! |
Free forum by Nabble | Edit this page |