--- a/Tools__FontSettingsApplication.st Sun Oct 23 11:40:29 2016 +0200
+++ b/Tools__FontSettingsApplication.st Mon Oct 24 15:22:57 2016 +0200
@@ -665,11 +665,10 @@
basicReadFontSettings
|prefs readFont sz lookIdx idx defaultTextFont|
-
- self useXftFontsOnly value:(UserPreferences current useXftFontsOnly).
- self useXFontsOnly value:(UserPreferences current useXFontsOnly).
+
+ self readAspects:#(useXftFontsOnly useXFontsOnly) from:currentUserPrefs.
- prefs := UserPreferences current fontPreferences.
+ prefs := currentUserPrefs fontPreferences.
prefs isNil ifTrue:[
prefs := Dictionary new.
].
@@ -712,8 +711,7 @@
(defaultTextFont face = #bold) ifTrue:[
lookIdx := self lookListValues indexOf:#vage.
] ifFalse:[
- "XFT fonts always return false for #isFixedWidth"
- (defaultTextFont isXftFont or:[(defaultTextFont onDevice:self device) isFixedWidth]) ifTrue:[
+ (defaultTextFont onDevice:self device) isFixedWidth ifTrue:[
lookIdx := self lookListValues indexOf:#stx.
] ifFalse:[
lookIdx := self lookListValues indexOf:#squeak.
@@ -738,7 +736,7 @@
"/ |fn|
self writeAspects: #(linuxFontWorkaround useXftFontsOnly useXFontsOnly) to: currentUserPrefs.
- UserPreferences current fontPreferences:self fontSpecDictionary.
+ currentUserPrefs fontPreferences:self fontSpecDictionary.
"/ fn := self otherDef value.
"/ SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn].
@@ -843,6 +841,19 @@
self changeFontFor:self tooltipDef labelTitle:'Tooltops'.
!
+defaultFontSpecDictionary
+ ^ Dictionary new
+ at:#Other put:View defaultFont storeString;
+ at:#Label put:View defaultFont storeString;
+ at:#Button put:Button defaultFont storeString;
+ at:#Text put:TextView defaultFont storeString;
+ at:#InputField put:EditField defaultFont storeString;
+ at:#List put:SelectionInListView defaultFont storeString;
+ at:#Tooltip put:ActiveHelpView defaultFont storeString;
+ at:#Menu put:MenuView defaultFont storeString;
+ yourself
+!
+
fontSizeSelectionChanged
|idx sz|
@@ -1475,12 +1486,8 @@
!FontSettingsApplication methodsFor:'queries'!
hasUnsavedChanges
- UserPreferences current fontPreferences ~= self fontSpecDictionary ifTrue:[^ true].
- (self hasChangedAspectIn: #(linuxFontWorkaround useXftFontsOnly) asComparedTo:currentUserPrefs) ifTrue:[^ true].
-
- ^ false
-
- "Modified: / 10-10-2011 / 12:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ (currentUserPrefs fontPreferences ? self defaultFontSpecDictionary) ~= self fontSpecDictionary ifTrue:[^ true].
+ ^ self hasChangedAspectIn:#(linuxFontWorkaround useXftFontsOnly useXFontsOnly) asComparedTo:currentUserPrefs.
!
hasXftFonts