[squeak-dev] The Trunk: System-tfel.923.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 18 09:06:02 UTC 2017


Tim Felgentreff uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tfel.923.mcz

==================== Summary ====================

Name: System-tfel.923
Author: tfel
Time: 18 January 2017, 10:05:39.926932 am
UUID: d9dcb1e9-52fe-435e-9d88-96f921f9fd20
Ancestors: System-ul.922

add methods to quickly increase/decrease fonts

=============== Diff against System-ul.922 ===============

Item was added:
+ ----- Method: Preferences class>>changeFontSize: (in category 'prefs - fonts') -----
+ changeFontSize: delta
+ 	| theme base fonts |
+ 	delta = 0 ifTrue: [self restoreDefaultFonts].
+ 	(UserInterfaceTheme current name beginsWith: 'Demo')
+ 		ifFalse: [
+ 			"Create DEMO version of current theme."
+ 			theme := UserInterfaceTheme named: 'Demo'.
+ 			theme merge: UserInterfaceTheme current overwrite: true.
+ 			theme apply].
+ 
+ 	base := (TextStyle defaultFont name beginsWith: 'Darkmap')
+ 		ifTrue: ['Darkmap DejaVu Sans'] ifFalse: ['Bitmap DejaVu Sans'].
+ 
+ 	fonts := {
+ 		{#SystemFont. base}.
+ 		{#FixedFont. 'BitstreamVeraSansMono'}.
+ 		{#ListFont. base}.
+ 		{#FlapFont. base}.
+ 		{#EToysFont. base}.
+ 		{#PaintBoxButtonFont. base}.
+ 		{#MenuFont. base}.
+ 		{#WindowTitleFont. base, ' B'}.
+ 		{#BalloonHelpFont. base}.
+ 		{#CodeFont. base}.
+ 		{#ButtonFont. base}.
+ 	} collect: [:ary || newPtSize |
+ 		newPtSize := (self perform: ('standard', ary first) asSymbol) pointSize + delta.
+ 		{('set', ary first, 'To:') asSymbol. ary second. newPtSize}
+ 	].
+ 	self setDefaultFonts: fonts.
+ !

Item was added:
+ ----- Method: Preferences class>>decreaseFontSize (in category 'prefs - fonts') -----
+ decreaseFontSize
+ 
+ 	self changeFontSize: -3.
+ !

Item was added:
+ ----- Method: Preferences class>>increaseFontSize (in category 'prefs - fonts') -----
+ increaseFontSize
+ 
+ 	self changeFontSize: 3.
+ !

Item was added:
+ ----- Method: Preferences class>>setFlapFontTo: (in category 'prefs - fonts') -----
+ setFlapFontTo: aFont
+ 
+ 	UserInterfaceTheme current
+ 		set: #standardFlapFont
+ 		to: aFont;
+ 		apply.	
+ 		
+ 	"FlapTab allSubInstancesDo:
+ 		[:aFlapTab | aFlapTab reformatTextualTab]"!

Item was added:
+ ----- Method: Preferences class>>standardWindowTitleFont (in category 'prefs - fonts') -----
+ standardWindowTitleFont
+ 	"Answer the standard font to use for window titles"
+ 
+ 	^ (UserInterfaceTheme current get: #windowTitleFont)
+ 		ifNil: [TextStyle defaultFont]!



More information about the Squeak-dev mailing list