The scope mechanism now seems to be gone through the update The Trunk: System-mt.963.mcz
Removes "scope" from UI themes. Encapsulates look-up for properties in the current theme into short-living a request object.
Thank you Marcel for the update
If I now do the first example of Stephane (initial mail in this thread).
| m uit |
m := Morph new. uit := m userInterfaceTheme.
an UserInterfaceThemeRequest
The UserInterfaceThemeRequest object has the following instance variables
1. a properties dictionary (323 entries for the Squeak theme) 2. name (which is 'SqueakTheme') 3. ignoreApply boolean 4. next (which is nil) 5. lastScaleFactor (which is nil).
Questions: a) I do not see when and how the properties dictionary is initialized
UserInterfactTheme just has initialize super initialize. name := 'unnamed'. properties := Dictionary new.
There is a method SqueakTheme create [1]
b) What are instance variables 3..5 used for?
c) UserInterfaceTheme subclasses {CommunityTheme . MonokaiTheme . SolarizedTheme . SqueakTheme . EtoysTheme}
Are there other themes in addition? One like a traditional OS uses?
--Hannes
[1] SqueakTheme create
"This is the default theme for Squeak. self create apply. " ^ (self named: 'Squeak') in: [:theme | "General morph stuff." theme set: #keyboardFocusColor for: #Morph to: (TranslucentColor r: 0.3 g: 0.5 b: 0.5 alpha: 0.5); set: #keyboardFocusWidth for: #Morph to: 3; set: #softShadowColor for: #Morph to: (Color black alpha: 0.01); set: #softShadowOffset for: #Morph to: (10@8 corner: 10@12); set: #hardShadowColor for: #Morph to: (Color black alpha: 0.5); set: #hardShadowOffset for: #Morph to: 1@1. theme set: #background for: #MorphicProject to: self linenblue. self addFonts: theme; addWindowColors: theme; addSyntaxHighlighting: theme; addMenusAndDockingBars: theme; addDialogs: theme; addButtons: theme; addScrollables: theme; addToolColors: theme; addMVC: theme. theme]
On 9/22/17, Stéphane Rollandin lecteur@zogotounga.net wrote:
Stéphane
Could you please summarize in one mail which changes to the UserInterface theme mechanism you propose and why you think that should be done?
I do not have a definite mechanism in mind; I just did some quick brainstorming with Marcel...
I do think we should get rid of the scope mechanism though (see my initial post in this thread for details).
Stef