1+ ' From Cuis7.7 [latest update: #7825] on 2 February 2026 at 3:12:48 pm' !
2+
3+ !PreferenceSet class methodsFor: ' sys event handlers' stamp: ' jmv 2/Feb/2026 15:12:35' !
4+ defaultFontSize: aPreference
5+ "
6+ Preferences at: #defaultFontSize put: '12'
7+ Preferences at: #defaultFontSize put: 14
8+ Preferences at: #defaultFontSize put: 21
9+ "
10+ | pointSize pointSizeForBigCursors font titleFont |
11+ pointSize := aPreference value.
12+ pointSizeForBigCursors := 12 * DisplayScreen hostOSScaleFactor.
13+ font := FontFamily familyName: FontFamily defaultFamilyName pointSize: pointSize.
14+ Preferences name: #standardListFont category: #font value: font.
15+ Preferences name: #standardMenuFont category: #font value: font.
16+ Preferences name: #standardCodeFont category: #font value: font.
17+ Preferences name: #standardButtonFont category: #font value: font.
18+ FontFamily defaultFamilyName: font familyName defaultPointSize: pointSize.
19+ titleFont := FontFamily familyName: FontFamily defaultFamilyName pointSize: pointSize * 12 // 10 .
20+ Preferences name: #windowTitleFont category: #font value: titleFont.
21+ MorphicCanvas allSubclassesDo: [ :c | c guiSizePreferenceChanged ].
22+ UISupervisor ui ifNotNil: [ :w | w fontPreferenceChanged ].
23+ (Preferences at: #biggerCursors ) == (pointSize > pointSizeForBigCursors) ifFalse: [
24+ Preferences at: #biggerCursors put: (pointSize > pointSizeForBigCursors). Cursor initialize.
25+ Cursor defaultCursor activateCursor ].
26+ MenuItemMorph initializeSubMenuMarker.
27+ ^ font! !
28+
29+ PreferenceSet defaultFontSize: (Preferences at: #defaultFontSize ).!
0 commit comments