Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.854.mcz ==================== Summary ==================== Name: System-mt.854 Author: mt Time: 31 July 2016, 11:27:38.353418 am UUID: b8b7f590-e108-a54f-8217-2ba1b4fd793d Ancestors: System-mt.853 *** Widget Refactorings and UI Themes (Part 7 of 11) *** Look-up and store default fonts in the current theme. =============== Diff against System-mt.853 =============== Item was changed: ----- Method: Preferences class>>setBalloonHelpFontTo: (in category 'prefs - fonts') ----- setBalloonHelpFontTo: aFont + UserInterfaceTheme current + set: #balloonHelpFont + to: aFont; + apply.! - Smalltalk at: #BalloonMorph ifPresent: - [:thatClass | thatClass setBalloonFontTo: aFont]! Item was changed: ----- Method: Preferences class>>setButtonFontTo: (in category 'prefs - fonts') ----- setButtonFontTo: aFont + + UserInterfaceTheme current + set: #standardButtonFont + to: aFont; + apply.! - Parameters at: #standardButtonFont put: aFont! Item was changed: ----- Method: Preferences class>>setCodeFontTo: (in category 'prefs - fonts') ----- setCodeFontTo: aFont "Establish the code font." + UserInterfaceTheme current + set: #standardCodeFont + to: aFont; + apply.! - Parameters at: #standardCodeFont put: aFont! Item was changed: ----- Method: Preferences class>>setEToysFontTo: (in category 'prefs - fonts') ----- setEToysFontTo: aFont "change the font used in eToys environment" + + UserInterfaceTheme current + set: #eToysFont + to: aFont; + apply.! - Parameters at: #eToysFont put: aFont! Item was changed: ----- Method: Preferences class>>setEToysTitleFontTo: (in category 'prefs - fonts') ----- setEToysTitleFontTo: aFont "change the font used in eToys environment" + + UserInterfaceTheme current + set: #eToysTitleFont + to: aFont; + apply.! - Parameters at: #eToysTitleFont put: aFont! Item was changed: ----- Method: Preferences class>>setFlapsFontTo: (in category 'prefs - fonts') ----- setFlapsFontTo: aFont + UserInterfaceTheme current + set: #standardFlapFont + to: aFont; + apply. + + "FlapTab allSubInstancesDo: + [:aFlapTab | aFlapTab reformatTextualTab]"! - Parameters at: #standardFlapFont put: aFont. - FlapTab allSubInstancesDo: - [:aFlapTab | aFlapTab reformatTextualTab]! Item was changed: ----- Method: Preferences class>>setHaloLabelFontTo: (in category 'prefs - fonts') ----- setHaloLabelFontTo: aFont "change the font used in eToys environment" + + UserInterfaceTheme current + set: #haloLabelFont + to: aFont; + apply.! - Parameters at: #haloLabelFont put: aFont! Item was changed: ----- Method: Preferences class>>setListFontTo: (in category 'prefs - fonts') ----- setListFontTo: aFont "Set the list font as indicated" + UserInterfaceTheme current + set: #standardListFont + to: aFont; + apply. + + "Smalltalk at: #ListParagraph ifPresent: [:lp | lp initialize]. + Smalltalk at: #Flaps ifPresent: [:flaps | flaps replaceToolsFlap]"! - Parameters at: #standardListFont put: aFont. - Smalltalk at: #ListParagraph ifPresent: [:lp | lp initialize]. - Smalltalk at: #Flaps ifPresent: [:flaps | flaps replaceToolsFlap]! Item was changed: ----- Method: Preferences class>>setMenuFontTo: (in category 'prefs - fonts') ----- setMenuFontTo: aFont + + UserInterfaceTheme current + set: #standardMenuFont + to: aFont; + apply. + + "Smalltalk at: #PopUpMenu ifPresent:[:aClass| aClass setMenuFontTo: aFont]. + TheWorldMainDockingBar updateInstances."! - "rbb 2/18/2005 12:54 - How should this be changed to work - with the UIManager, if at all?" - Parameters at: #standardMenuFont put: aFont. - Smalltalk at: #PopUpMenu ifPresent:[:aClass| aClass setMenuFontTo: aFont]. - TheWorldMainDockingBar updateInstances.! Item was changed: ----- Method: Preferences class>>setPaintBoxButtonFontTo: (in category 'prefs - fonts') ----- setPaintBoxButtonFontTo: aFont "change the font used in the buttons in PaintBox." + + UserInterfaceTheme current + set: #paintBoxButtonFont + to: aFont; + apply.! - Parameters at: #paintBoxButtonFont put: aFont! Item was changed: ----- Method: Preferences class>>setWindowTitleFontTo: (in category 'prefs - fonts') ----- setWindowTitleFontTo: aFont "Set the window-title font to be as indicated" + UserInterfaceTheme current + set: #windowTitleFont + to: aFont; + apply. + + "(Smalltalk hasClassNamed: #StandardSystemView) - Parameters at: #windowTitleFont put: aFont. - (Smalltalk hasClassNamed: #StandardSystemView) ifTrue: [(Smalltalk at: #StandardSystemView) setLabelStyle]. (Smalltalk hasClassNamed: #Flaps) + ifTrue: [(Smalltalk at: #Flaps) replaceToolsFlap]" - ifTrue: [(Smalltalk at: #Flaps) replaceToolsFlap] ! Item was changed: ----- Method: Preferences class>>standardBalloonHelpFont (in category 'prefs - fonts') ----- standardBalloonHelpFont + + ^ (UserInterfaceTheme current get: #balloonHelpFont) + ifNil: [TextStyle defaultFont]! - ^BalloonMorph balloonFont! Item was changed: ----- Method: Preferences class>>standardButtonFont (in category 'prefs - fonts') ----- standardButtonFont + + ^ (UserInterfaceTheme current get: #standardButtonFont) + ifNil: [TextStyle defaultFont]! - "Answer an attractive font to use for buttons" - "Answer the font to be used for textual flap tab labels" - ^ Parameters - at: #standardButtonFont - ifAbsentPut: [StrikeFont familyName: #ComicBold size: 16]! Item was changed: ----- Method: Preferences class>>standardCodeFont (in category 'prefs - fonts') ----- standardCodeFont + + ^ (UserInterfaceTheme current get: #standardCodeFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in code" - ^ Parameters at: #standardCodeFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardDefaultTextFont (in category 'prefs - fonts') ----- standardDefaultTextFont + + ^ (UserInterfaceTheme current get: #standardDefaultTextFont) + ifNil: [TextStyle defaultFont]! - ^TextStyle defaultFont! Item was changed: ----- Method: Preferences class>>standardEToysFont (in category 'prefs - fonts') ----- standardEToysFont + + ^ (UserInterfaceTheme current get: #eToysFont) + ifNil: [self standardButtonFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #eToysFont ifAbsentPut: [self standardButtonFont]! Item was changed: ----- Method: Preferences class>>standardEToysTitleFont (in category 'prefs - fonts') ----- standardEToysTitleFont + + ^ (UserInterfaceTheme current get: #eToysTitleFont) + ifNil: [self standardEToysFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #eToysTitleFont ifAbsentPut: [self standardEToysFont]! Item was changed: ----- Method: Preferences class>>standardFlapFont (in category 'prefs - fonts') ----- standardFlapFont + + ^ (UserInterfaceTheme current get: #standardFlapFont) + ifNil: [self standardButtonFont]! - "Answer the font to be used for textual flap tab labels" - ^ Parameters at: #standardFlapFont ifAbsentPut: [self standardButtonFont]! Item was changed: ----- Method: Preferences class>>standardHaloLabelFont (in category 'prefs - fonts') ----- standardHaloLabelFont + + ^ (UserInterfaceTheme current get: #haloLabelFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #haloLabelFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardListFont (in category 'prefs - fonts') ----- standardListFont + + ^ (UserInterfaceTheme current get: #standardListFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in lists" - ^ Parameters at: #standardListFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardMenuFont (in category 'prefs - fonts') ----- standardMenuFont + + ^ (UserInterfaceTheme current get: #standardMenuFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in menus" - ^ Parameters at: #standardMenuFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardPaintBoxButtonFont (in category 'prefs - fonts') ----- standardPaintBoxButtonFont + + ^ (UserInterfaceTheme current get: #paintBoxButtonFont) + ifNil: [self standardButtonFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #paintBoxButtonFont ifAbsentPut: [self standardButtonFont]! Item was changed: ----- Method: Preferences class>>standardSystemFont (in category 'prefs - fonts') ----- standardSystemFont "Answer the standard system font " + ^ (UserInterfaceTheme current get: #standardSystemFont) + ifNil: [TextStyle defaultFont]! - ^(TextConstants at: #DefaultTextStyle) defaultFont! Item was changed: ----- Method: Preferences class>>windowTitleFont (in category 'prefs - fonts') ----- windowTitleFont "Answer the standard font to use for window titles" + + ^ (UserInterfaceTheme current get: #windowTitleFont) + ifNil: [TextStyle defaultFont]! - ^ Parameters at: #windowTitleFont ifAbsentPut: [StrikeFont familyName: #NewYork size: 15]! |
Free forum by Nabble | Edit this page |