Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1034.mcz ==================== Summary ==================== Name: Kernel-mt.1034 Author: mt Time: 31 July 2016, 10:21:08.99049 am UUID: f57f51f9-aa84-5e4e-90cb-a9c6228e3cd4 Ancestors: Kernel-topa.1033 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Kernel-topa.1033 =============== Item was changed: Object subclass: #Model instanceVariableNames: 'dependents' + classVariableNames: 'UseColorfulWindows WindowActiveOnFirstClick' - classVariableNames: 'WindowActiveOnFirstClick' poolDictionaries: '' category: 'Kernel-Models'! !Model commentStamp: '<historical>' prior: 0! Provides a superclass for classes that function as models. The only behavior provided is fast dependents maintenance, which bypasses the generic DependentsFields mechanism. 1/23/96 sw! Item was added: + ----- Method: Model class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ { + { #uniformWindowColor. 'Colors'. 'The color to be used when all windows should have the same color' }. + { #customWindowColor. 'Colors'. 'The color to be used when all windows can have their own color' }. + }! Item was added: + ----- Method: Model class>>useColorfulWindows (in category 'preferences') ----- + useColorfulWindows + <preference: 'Use colorful windows' + categoryList: #(Morphic windows) + description: 'When true, windows have colors specific to their kind.' + type: #Boolean> + ^UseColorfulWindows ifNil:[true]! Item was added: + ----- Method: Model class>>useColorfulWindows: (in category 'preferences') ----- + useColorfulWindows: aBoolean + + UseColorfulWindows = aBoolean ifTrue: [^ self]. + UseColorfulWindows := aBoolean. + + (Smalltalk classNamed: #SystemWindow) ifNotNil: [:c | c refreshAllWindows]. + (Smalltalk classNamed: #TheWorldMainDockingBar) ifNotNil: [:c | c updateInstances].! Item was added: + ----- Method: Model>>applyUserInterfaceTheme (in category 'morphic ui') ----- + applyUserInterfaceTheme + + self dependents do: [:ea | + ea isSystemWindow ifTrue: [ + ea refreshWindowColor]].! Item was added: + ----- Method: Model>>canApplyUserInterfaceTheme (in category 'morphic ui') ----- + canApplyUserInterfaceTheme + ^ self dependents notEmpty! Item was added: + ----- Method: Model>>defaultBackgroundColor (in category 'morphic ui') ----- + defaultBackgroundColor + + self flag: #remove. "Use #windowColorToUse" + ^ self windowColorToUse! Item was added: + ----- Method: Model>>defaultWindowColor (in category 'morphic ui') ----- + defaultWindowColor + + ^ self uniformWindowColor! Item was added: + ----- Method: Model>>uniformWindowColor (in category 'morphic ui') ----- + uniformWindowColor + + ^ self userInterfaceTheme uniformWindowColor ifNil: [Color veryVeryLightGray]! Item was added: + ----- Method: Model>>windowColorToUse (in category 'morphic ui') ----- + windowColorToUse + + ^ Color colorFrom: (self class useColorfulWindows + ifTrue: [self userInterfaceTheme customWindowColor ifNil: [self defaultWindowColor]] + ifFalse: [self uniformWindowColor])! Item was removed: - ----- Method: Object>>defaultBackgroundColor (in category 'user interface') ----- - defaultBackgroundColor - "Answer the color to be used as the base window color for a window whose model is an object of the receiver's class" - - ^ Preferences windowColorFor: self class name! Item was added: + ----- Method: StringHolder>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.9 g: 0.9 b: 0.719)! |
Free forum by Nabble | Edit this page |