author | Claus Gittinger <cg@exept.de> |
Tue, 21 Apr 2020 13:54:09 +0200 | |
changeset 19580 | ce40b5d1e941 |
parent 19430 | 7cdcbf30918e |
permissions | -rw-r--r-- |
17249 | 1 |
" |
2 |
COPYRIGHT (c) 2014 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
14205 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
14213
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
14 |
"{ NameSpace: Tools }" |
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
15 |
|
14205 | 16 |
AbstractSettingsApplication subclass:#FontSettingsApplication |
17 |
instanceVariableNames:'filter allOfThem labelDef buttonDef listDef menuDef textDef |
|
18 |
othersDef allFontLabelHolder buttonsFontLabelHolder |
|
19 |
textFontLabelHolder labelsFontLabelHolder listsFontLabelHolder |
|
20 |
menusFontLabelHolder otherFontLabelHolder allLabel buttonsLabel |
|
21 |
textLabel labelLabel listsLabel menuLabel inputFieldLabel |
|
22 |
inputFieldDef inputFieldFontLabelHolder otherLabel |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
23 |
linuxFontWorkaround otherDef tooltipDef tooltipFontLabelHolder |
15932 | 24 |
tooltipLabel useXftFontsOnly fontSizeSelectionHolder |
16460 | 25 |
lookSelectionHolder useXFontsOnly' |
14205 | 26 |
classVariableNames:'' |
27 |
poolDictionaries:'' |
|
28 |
category:'Interface-Smalltalk' |
|
29 |
! |
|
30 |
||
17249 | 31 |
!FontSettingsApplication class methodsFor:'documentation'! |
32 |
||
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 2014 by eXept Software AG |
|
36 |
All Rights Reserved |
|
37 |
||
38 |
This software is furnished under a license and may be used |
|
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
||
45 |
" |
|
46 |
! ! |
|
14205 | 47 |
|
48 |
!FontSettingsApplication class methodsFor:'instance creation'! |
|
49 |
||
50 |
fontForEncoding:encodingMatch |
|
51 |
||
52 |
| inst | |
|
53 |
||
54 |
inst := self new. |
|
55 |
inst encodingMatch:encodingMatch. |
|
56 |
self initialize. |
|
57 |
self open. |
|
58 |
! ! |
|
59 |
||
60 |
!FontSettingsApplication class methodsFor:'help specs'! |
|
61 |
||
17905 | 62 |
helpSpec |
14205 | 63 |
"This resource specification was automatically generated |
64 |
by the UIHelpTool of ST/X." |
|
65 |
||
66 |
"Do not manually edit this!! If it is corrupted, |
|
67 |
the UIHelpTool may not be able to read the specification." |
|
68 |
||
69 |
" |
|
70 |
UIHelpTool openOnClass:FontSettingsAppl |
|
71 |
" |
|
72 |
||
73 |
<resource: #help> |
|
74 |
||
17905 | 75 |
^ super helpSpec addPairsFrom:#( |
14205 | 76 |
|
15933 | 77 |
changeCodeFont |
78 |
'Open a font dialog to change the font used in code views only' |
|
79 |
||
80 |
changeInputFieldFont |
|
81 |
'Open a font dialog to change the font used in input fields only' |
|
82 |
||
83 |
changeLabelFont |
|
84 |
'Open a font dialog to change the font used in labels only' |
|
85 |
||
86 |
changeListFont |
|
87 |
'Open a font dialog to change the font used in lists only' |
|
88 |
||
89 |
changeMenuFont |
|
90 |
'Open a font dialog to change the font used in menus only' |
|
91 |
||
92 |
changeButtonFont |
|
93 |
'Open a font dialog to change the font used in buttons only' |
|
94 |
||
95 |
changeTooltipFont |
|
96 |
'Open a font dialog to change the font used in tooltips only' |
|
97 |
||
98 |
changeAllFont |
|
99 |
'Open a font dialog to change the font used in all views' |
|
100 |
||
14205 | 101 |
#resetToDefault |
102 |
'Reset fonts back to original default values (as specified in the window style-file and OS settings)' |
|
103 |
||
104 |
#changeToHighContrast |
|
19430 | 105 |
'Change settings for higher contrast.\Useful for presentations and outdoor operation (bright sunlight)' |
15932 | 106 |
|
107 |
#changeToNormalContrast |
|
108 |
'Change settings for normal contrast.' |
|
14205 | 109 |
|
110 |
#changeToBigFonts |
|
111 |
'Change settings for bigger fonts.\Useful for presentations' |
|
112 |
||
113 |
#changeToHugeFonts |
|
114 |
'Change settings for huge fonts.\Useful for presentations' |
|
115 |
||
15932 | 116 |
#changeToSmallFonts |
117 |
'Change settings for small fonts.\Useful on smaller screens (13 or 15 inch)' |
|
118 |
||
119 |
#changeToNormalFonts |
|
120 |
'Change settings for default font sizes.' |
|
121 |
||
14205 | 122 |
#changeToSTXLook |
123 |
'Change settings for an ST/X-like look with fixed-width code fonts' |
|
124 |
||
125 |
#changeToSTXLookXft |
|
19430 | 126 |
'Change settings for an ST/X-like look with fixed-width code fonts).\Uses better looking Xft fonts if available (XWindow only)' |
14205 | 127 |
|
128 |
#changeToSqueakLook |
|
129 |
'Change settings for a Squeak-like look with variable code fonts' |
|
130 |
||
131 |
#changeToVisualAgeLook |
|
132 |
'Change settings for a VisualAge-like look with bold variable code fonts' |
|
15933 | 133 |
|
134 |
#useXftFontsOnly |
|
16460 | 135 |
'Don''t try to use and don''t offer non-Xft fonts in font selection dialogs (XWindow only).\If checked, ST/X will use the much nicer looking, but sometimes slower Xft fonts.' |
136 |
||
137 |
#useXFontsOnly |
|
138 |
'Don''t try to use and don''t offer Xft fonts in font selection dialogs (XWindow only).\Check this, if you are working with remote displays via a slow communication line,\to suppress any Xft font usage.\(Xft font rendering requires a much higher bandwidth.)' |
|
139 |
||
14205 | 140 |
) |
141 |
||
142 |
"Created: / 17-03-2012 / 11:37:51 / cg" |
|
143 |
! ! |
|
144 |
||
145 |
!FontSettingsApplication class methodsFor:'image specs'! |
|
146 |
||
147 |
defaultIcon |
|
148 |
<resource: #programImage> |
|
149 |
||
150 |
^ ToolbarIconLibrary fontIcon |
|
151 |
! |
|
152 |
||
153 |
defaultIcon2 |
|
14417
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
154 |
<resource: #image> |
14205 | 155 |
"This resource specification was automatically generated |
156 |
by the ImageEditor of ST/X." |
|
157 |
"Do not manually edit this!! If it is corrupted, |
|
158 |
the ImageEditor may not be able to read the specification." |
|
159 |
" |
|
160 |
self defaultIcon2 inspect |
|
161 |
ImageEditor openOnClass:self andSelector:#defaultIcon2 |
|
14417
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
162 |
Icon flushCachedIcons" |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
163 |
|
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
164 |
^ Icon constantNamed:#'FontSettingsAppl class defaultIcon2' |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
165 |
ifAbsentPut:[ |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
166 |
(Depth4Image new) |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
167 |
width:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
168 |
height:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
169 |
photometric:(#palette); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
170 |
bitsPerSample:(#( 4 )); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
171 |
samplesPerPixel:(1); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
172 |
bits:(ByteArray |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
173 |
fromPackedString:' |
14205 | 174 |
@@@@@@@@@@@@@@@@@@@@@!!X @@@@@@@!!X @@@6H@@@@@@DP6H@@@Y!!H@@@@@QDY"@@@BY"@@@@ADQBY"@@@FX @@@@@DQCX @@@6H@@@@@QEP6H@@@@ @@@@ |
175 |
ADUDP @C@@@@@@@DQSH@@@L @@@@@@QEL @@@2@@@@@@ADT2@@@CH@@@@@@DQSH@@@L @@@@@@QEL @@@2@@@@@@QDT2@@@CH@@@@@QDQSH@@@@ @@@@@DQE |
|
14417
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
176 |
P @@@@@@@@@@@DQ@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b'); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
177 |
colorMapFromArray:#[ 0 0 0 255 255 255 150 150 150 213 213 213 215 48 48 134 54 54 240 240 240 ]; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
178 |
mask:((ImageMask new) |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
179 |
width:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
180 |
height:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
181 |
bits:(ByteArray |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
182 |
fromPackedString:'@@@@@G @OG0@O''<@O7>@O<?@A>? A?? A??@A<?@A<>@A<>@A<>@A=>@C?>@G<>@C<\@@8D@@H@@@@@@@@@@@@@@'); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
183 |
yourself); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
184 |
yourself |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
185 |
] |
14205 | 186 |
! ! |
187 |
||
188 |
!FontSettingsApplication class methodsFor:'interface specs'! |
|
189 |
||
190 |
windowSpec |
|
191 |
"This resource specification was automatically generated |
|
192 |
by the UIPainter of ST/X." |
|
193 |
||
194 |
"Do not manually edit this!! If it is corrupted, |
|
195 |
the UIPainter may not be able to read the specification." |
|
196 |
||
197 |
" |
|
14319
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
198 |
UIPainter new openOnClass:Tools::FontSettingsApplication andSelector:#windowSpec |
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
199 |
Tools::FontSettingsApplication new openInterface:#windowSpec |
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
200 |
Tools::FontSettingsApplication open |
14205 | 201 |
" |
202 |
||
203 |
<resource: #canvas> |
|
204 |
||
205 |
^ |
|
206 |
#(FullSpec |
|
207 |
name: windowSpec |
|
18626 | 208 |
uuid: '733e91ea-3c23-11e9-860e-b8f6b1108e05' |
14205 | 209 |
window: |
210 |
(WindowSpec |
|
211 |
label: 'Font Settings' |
|
212 |
name: 'Font Settings' |
|
14319
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
213 |
flags: 1 |
18626 | 214 |
uuid: '733e94f6-3c23-11e9-860e-b8f6b1108e05' |
14205 | 215 |
min: (Point 10 10) |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
216 |
bounds: (Rectangle 0 0 643 810) |
14205 | 217 |
) |
218 |
component: |
|
219 |
(SpecCollection |
|
220 |
collection: ( |
|
221 |
(VerticalPanelViewSpec |
|
222 |
name: 'VerticalPanel1' |
|
223 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
18626 | 224 |
uuid: '733ee168-3c23-11e9-860e-b8f6b1108e05' |
14205 | 225 |
horizontalLayout: fitSpace |
226 |
verticalLayout: topSpace |
|
227 |
horizontalSpace: 3 |
|
228 |
verticalSpace: 3 |
|
229 |
component: |
|
230 |
(SpecCollection |
|
231 |
collection: ( |
|
232 |
(TextEditorSpec |
|
233 |
name: 'TextEditor1' |
|
234 |
style: labelFont |
|
18626 | 235 |
uuid: '733ee4a6-3c23-11e9-860e-b8f6b1108e05' |
14205 | 236 |
model: infoText |
237 |
hasHorizontalScrollBar: true |
|
238 |
hasVerticalScrollBar: true |
|
239 |
miniScrollerHorizontal: true |
|
240 |
miniScrollerVertical: true |
|
241 |
isReadOnly: true |
|
242 |
hasKeyboardFocusInitially: false |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
243 |
extent: (Point 637 132) |
18626 | 244 |
viewClassName: 'ListView' |
15887 | 245 |
postBuildCallback: postBuildHelpLabel: |
246 |
) |
|
247 |
(DividerSpec |
|
248 |
name: 'Separator14' |
|
18626 | 249 |
uuid: '733ee7a8-3c23-11e9-860e-b8f6b1108e05' |
15887 | 250 |
extent: (Point 637 4) |
14205 | 251 |
) |
252 |
(ViewSpec |
|
253 |
name: 'CodeBox' |
|
18626 | 254 |
uuid: '733ee8d4-3c23-11e9-860e-b8f6b1108e05' |
14205 | 255 |
component: |
256 |
(SpecCollection |
|
257 |
collection: ( |
|
258 |
(LabelSpec |
|
259 |
label: 'Code' |
|
260 |
name: 'Label1' |
|
261 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 262 |
uuid: '733ee99c-3c23-11e9-860e-b8f6b1108e05' |
14205 | 263 |
translateLabel: true |
264 |
adjust: left |
|
265 |
) |
|
15887 | 266 |
(ActionButtonSpec |
267 |
label: 'Change...' |
|
268 |
name: 'Button1' |
|
15933 | 269 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 270 |
activeHelpKey: changeCodeFont |
18626 | 271 |
uuid: '733eebae-3c23-11e9-860e-b8f6b1108e05' |
15887 | 272 |
translateLabel: true |
273 |
tabable: true |
|
274 |
model: changeTextFont |
|
275 |
) |
|
14205 | 276 |
(LabelSpec |
277 |
label: 'Text Font' |
|
278 |
name: 'Label2' |
|
15933 | 279 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 280 |
uuid: '733eee6a-3c23-11e9-860e-b8f6b1108e05' |
14205 | 281 |
translateLabel: true |
282 |
labelChannel: textFontLabelHolder |
|
283 |
adjust: left |
|
284 |
postBuildCallback: postBuildTextFontLabel: |
|
285 |
) |
|
286 |
) |
|
287 |
||
288 |
) |
|
15887 | 289 |
extent: (Point 637 45) |
14205 | 290 |
) |
291 |
(ViewSpec |
|
292 |
name: 'InputFieldsBox' |
|
18626 | 293 |
uuid: '733eef82-3c23-11e9-860e-b8f6b1108e05' |
14205 | 294 |
component: |
295 |
(SpecCollection |
|
296 |
collection: ( |
|
297 |
(LabelSpec |
|
298 |
label: 'Input Fields' |
|
299 |
name: 'Input Fields' |
|
300 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 301 |
uuid: '733ef02c-3c23-11e9-860e-b8f6b1108e05' |
14205 | 302 |
translateLabel: true |
303 |
adjust: left |
|
304 |
) |
|
15887 | 305 |
(ActionButtonSpec |
306 |
label: 'Change...' |
|
307 |
name: 'ChangeText' |
|
15933 | 308 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 309 |
activeHelpKey: changeInputFieldFont |
18626 | 310 |
uuid: '733ef0fe-3c23-11e9-860e-b8f6b1108e05' |
15887 | 311 |
translateLabel: true |
312 |
tabable: true |
|
313 |
model: changeInputFieldFont |
|
314 |
) |
|
14205 | 315 |
(LabelSpec |
316 |
label: 'InputFields Font' |
|
317 |
name: 'InputFieldsFont' |
|
15933 | 318 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 319 |
uuid: '733ef220-3c23-11e9-860e-b8f6b1108e05' |
14205 | 320 |
translateLabel: true |
321 |
labelChannel: inputFieldFontLabelHolder |
|
322 |
adjust: left |
|
323 |
postBuildCallback: postBuildInputFieldFontLabel: |
|
324 |
) |
|
325 |
) |
|
326 |
||
327 |
) |
|
15887 | 328 |
extent: (Point 637 45) |
14205 | 329 |
) |
330 |
(ViewSpec |
|
331 |
name: 'ListsBox' |
|
18626 | 332 |
uuid: '733ef310-3c23-11e9-860e-b8f6b1108e05' |
14205 | 333 |
component: |
334 |
(SpecCollection |
|
335 |
collection: ( |
|
336 |
(LabelSpec |
|
337 |
label: 'Lists' |
|
338 |
name: 'Lists' |
|
339 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 340 |
uuid: '733ef3b0-3c23-11e9-860e-b8f6b1108e05' |
14205 | 341 |
translateLabel: true |
342 |
adjust: left |
|
343 |
) |
|
15887 | 344 |
(ActionButtonSpec |
345 |
label: 'Change...' |
|
346 |
name: 'ChangeLists' |
|
15933 | 347 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 348 |
activeHelpKey: changeListFont |
18626 | 349 |
uuid: '733ef482-3c23-11e9-860e-b8f6b1108e05' |
15887 | 350 |
translateLabel: true |
351 |
tabable: true |
|
352 |
model: changeListsFont |
|
353 |
) |
|
14205 | 354 |
(LabelSpec |
355 |
label: 'Lists Font' |
|
356 |
name: 'ListsFont' |
|
15933 | 357 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 358 |
uuid: '733ef590-3c23-11e9-860e-b8f6b1108e05' |
14205 | 359 |
translateLabel: true |
360 |
labelChannel: listsFontLabelHolder |
|
361 |
adjust: left |
|
362 |
postBuildCallback: postBuildListsFontLabel: |
|
363 |
) |
|
364 |
) |
|
365 |
||
366 |
) |
|
15887 | 367 |
extent: (Point 637 45) |
14205 | 368 |
) |
369 |
(ViewSpec |
|
370 |
name: 'MenusBox' |
|
18626 | 371 |
uuid: '733ef68a-3c23-11e9-860e-b8f6b1108e05' |
14205 | 372 |
component: |
373 |
(SpecCollection |
|
374 |
collection: ( |
|
375 |
(LabelSpec |
|
376 |
label: 'Menus' |
|
377 |
name: 'Menus' |
|
378 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 379 |
uuid: '733ef72a-3c23-11e9-860e-b8f6b1108e05' |
14205 | 380 |
translateLabel: true |
381 |
adjust: left |
|
382 |
) |
|
15887 | 383 |
(ActionButtonSpec |
384 |
label: 'Change...' |
|
385 |
name: 'ChangeMenus' |
|
15933 | 386 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 387 |
activeHelpKey: changeMenuFont |
18626 | 388 |
uuid: '733ef7f2-3c23-11e9-860e-b8f6b1108e05' |
15887 | 389 |
translateLabel: true |
390 |
tabable: true |
|
391 |
model: changeMenusFont |
|
392 |
) |
|
14205 | 393 |
(LabelSpec |
394 |
label: 'Menus Font' |
|
395 |
name: 'MenusFont' |
|
15933 | 396 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 397 |
uuid: '733ef964-3c23-11e9-860e-b8f6b1108e05' |
14205 | 398 |
translateLabel: true |
399 |
labelChannel: menusFontLabelHolder |
|
400 |
adjust: left |
|
401 |
postBuildCallback: postBuildMenuesFontLabel: |
|
402 |
) |
|
403 |
) |
|
404 |
||
405 |
) |
|
15887 | 406 |
extent: (Point 637 45) |
14205 | 407 |
) |
408 |
(ViewSpec |
|
409 |
name: 'LabelsBox' |
|
18626 | 410 |
uuid: '733efa68-3c23-11e9-860e-b8f6b1108e05' |
14205 | 411 |
component: |
412 |
(SpecCollection |
|
413 |
collection: ( |
|
414 |
(LabelSpec |
|
415 |
label: 'Labels' |
|
416 |
name: 'Labels' |
|
417 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 418 |
uuid: '733efb08-3c23-11e9-860e-b8f6b1108e05' |
14205 | 419 |
translateLabel: true |
420 |
adjust: left |
|
421 |
) |
|
15887 | 422 |
(ActionButtonSpec |
423 |
label: 'Change...' |
|
424 |
name: 'ChangeLabels' |
|
15933 | 425 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 426 |
activeHelpKey: changeLabelFont |
18626 | 427 |
uuid: '733efc3e-3c23-11e9-860e-b8f6b1108e05' |
15887 | 428 |
translateLabel: true |
429 |
tabable: true |
|
430 |
model: changeLabelsFont |
|
431 |
) |
|
14205 | 432 |
(LabelSpec |
433 |
label: 'Labels' |
|
434 |
name: 'LabelsFont' |
|
15933 | 435 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 436 |
uuid: '733efd56-3c23-11e9-860e-b8f6b1108e05' |
14205 | 437 |
translateLabel: true |
438 |
labelChannel: labelsFontLabelHolder |
|
439 |
adjust: left |
|
440 |
postBuildCallback: postBuildLabelsFontLabel: |
|
441 |
) |
|
442 |
) |
|
443 |
||
444 |
) |
|
15887 | 445 |
extent: (Point 637 45) |
14205 | 446 |
) |
447 |
(ViewSpec |
|
448 |
name: 'ButtonsBox' |
|
18626 | 449 |
uuid: '733efe46-3c23-11e9-860e-b8f6b1108e05' |
14205 | 450 |
component: |
451 |
(SpecCollection |
|
452 |
collection: ( |
|
453 |
(LabelSpec |
|
454 |
label: 'Buttons' |
|
455 |
name: 'Buttons' |
|
456 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 457 |
uuid: '733efee6-3c23-11e9-860e-b8f6b1108e05' |
14205 | 458 |
translateLabel: true |
459 |
adjust: left |
|
460 |
) |
|
15887 | 461 |
(ActionButtonSpec |
462 |
label: 'Change...' |
|
463 |
name: 'Change Buttons' |
|
15933 | 464 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 465 |
activeHelpKey: changeButtonFont |
18626 | 466 |
uuid: '733effb8-3c23-11e9-860e-b8f6b1108e05' |
15887 | 467 |
translateLabel: true |
468 |
tabable: true |
|
469 |
model: changeButtonsFont |
|
470 |
) |
|
14205 | 471 |
(LabelSpec |
472 |
label: 'Buttons Font' |
|
473 |
name: 'ButtonsFont' |
|
15933 | 474 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 475 |
uuid: '733f00c6-3c23-11e9-860e-b8f6b1108e05' |
14205 | 476 |
translateLabel: true |
477 |
labelChannel: buttonsFontLabelHolder |
|
478 |
adjust: left |
|
479 |
postBuildCallback: postBuildButtonsFontLabel: |
|
480 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
481 |
) |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
482 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
483 |
) |
15887 | 484 |
extent: (Point 637 45) |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
485 |
) |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
486 |
(ViewSpec |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
487 |
name: 'ToolTipsBox' |
18626 | 488 |
uuid: '733f01c0-3c23-11e9-860e-b8f6b1108e05' |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
489 |
component: |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
490 |
(SpecCollection |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
491 |
collection: ( |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
492 |
(LabelSpec |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
493 |
label: 'Tooltips' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
494 |
name: 'Label7' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
495 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
18626 | 496 |
uuid: '733f0260-3c23-11e9-860e-b8f6b1108e05' |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
497 |
translateLabel: true |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
498 |
adjust: left |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
499 |
) |
15887 | 500 |
(ActionButtonSpec |
501 |
label: 'Change...' |
|
502 |
name: 'Button11' |
|
15933 | 503 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
16460 | 504 |
activeHelpKey: changeTooltipFont |
18626 | 505 |
uuid: '733f0332-3c23-11e9-860e-b8f6b1108e05' |
15887 | 506 |
translateLabel: true |
507 |
tabable: true |
|
508 |
model: changeTooltipFont |
|
509 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
510 |
(LabelSpec |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
511 |
label: 'Label' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
512 |
name: 'Label8' |
15933 | 513 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
18626 | 514 |
uuid: '733f0440-3c23-11e9-860e-b8f6b1108e05' |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
515 |
translateLabel: true |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
516 |
labelChannel: tooltipFontLabelHolder |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
517 |
adjust: left |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
518 |
postBuildCallback: postBuildTooltipFontLabel: |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
519 |
) |
14205 | 520 |
) |
521 |
||
522 |
) |
|
15887 | 523 |
extent: (Point 637 45) |
14205 | 524 |
) |
525 |
(ViewSpec |
|
526 |
name: 'OtherBox' |
|
18626 | 527 |
uuid: '733f053a-3c23-11e9-860e-b8f6b1108e05' |
14205 | 528 |
component: |
529 |
(SpecCollection |
|
530 |
collection: ( |
|
531 |
(LabelSpec |
|
532 |
label: 'All Others' |
|
533 |
name: 'Label5' |
|
534 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
18626 | 535 |
uuid: '733f05d0-3c23-11e9-860e-b8f6b1108e05' |
14205 | 536 |
translateLabel: true |
537 |
adjust: left |
|
538 |
) |
|
15887 | 539 |
(ActionButtonSpec |
540 |
label: 'Change...' |
|
541 |
name: 'Button9' |
|
15933 | 542 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
18626 | 543 |
uuid: '733f06a2-3c23-11e9-860e-b8f6b1108e05' |
15887 | 544 |
translateLabel: true |
545 |
tabable: true |
|
546 |
model: changeOtherFont |
|
547 |
) |
|
14205 | 548 |
(LabelSpec |
549 |
label: 'Label' |
|
550 |
name: 'Label6' |
|
15933 | 551 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
16460 | 552 |
activeHelpKey: changeOtherFont |
18626 | 553 |
uuid: '733f07b0-3c23-11e9-860e-b8f6b1108e05' |
14205 | 554 |
translateLabel: true |
555 |
labelChannel: otherFontLabelHolder |
|
556 |
adjust: left |
|
557 |
postBuildCallback: postBuildOtherFontLabel: |
|
558 |
) |
|
559 |
(DividerSpec |
|
560 |
name: 'Separator13' |
|
561 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
18626 | 562 |
uuid: '733f0896-3c23-11e9-860e-b8f6b1108e05' |
14205 | 563 |
) |
564 |
) |
|
565 |
||
566 |
) |
|
15887 | 567 |
extent: (Point 637 45) |
14205 | 568 |
) |
569 |
(ViewSpec |
|
570 |
name: 'AllBox' |
|
18626 | 571 |
uuid: '733f0968-3c23-11e9-860e-b8f6b1108e05' |
14205 | 572 |
component: |
573 |
(SpecCollection |
|
574 |
collection: ( |
|
575 |
(LabelSpec |
|
576 |
label: 'All' |
|
577 |
name: 'All' |
|
15887 | 578 |
layout: (LayoutFrame 0 0.0 4 0 0 1.0 24 0) |
18626 | 579 |
uuid: '733f0a08-3c23-11e9-860e-b8f6b1108e05' |
14205 | 580 |
translateLabel: true |
581 |
adjust: left |
|
582 |
) |
|
583 |
(ActionButtonSpec |
|
584 |
label: 'Change...' |
|
585 |
name: 'ChangeAll' |
|
15887 | 586 |
layout: (LayoutFrame 100 0.0 11 0 205 0 33 0) |
16460 | 587 |
activeHelpKey: changeAllFont |
18626 | 588 |
uuid: '733f0ada-3c23-11e9-860e-b8f6b1108e05' |
14205 | 589 |
translateLabel: true |
590 |
tabable: true |
|
591 |
model: changeAllFont |
|
592 |
) |
|
593 |
(DividerSpec |
|
594 |
name: 'Separator1' |
|
595 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
18626 | 596 |
uuid: '733f0bf2-3c23-11e9-860e-b8f6b1108e05' |
14205 | 597 |
) |
598 |
) |
|
599 |
||
600 |
) |
|
15887 | 601 |
extent: (Point 637 45) |
14205 | 602 |
) |
603 |
(CheckBoxSpec |
|
604 |
label: 'Linux font workaround: do not reset fonts on snapshot restart' |
|
605 |
name: 'LinuxFontWorkaroundBox' |
|
18626 | 606 |
uuid: '733f0ca6-3c23-11e9-860e-b8f6b1108e05' |
14205 | 607 |
visibilityChannel: linuxFontWorkaroundVisible |
608 |
model: linuxFontWorkaround |
|
609 |
translateLabel: true |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
610 |
extent: (Point 637 30) |
14205 | 611 |
) |
15887 | 612 |
(CheckBoxSpec |
16460 | 613 |
label: 'Only Use Xft Fonts / Suppress Ugly X-Fonts (Unix Only)' |
15887 | 614 |
name: 'CheckBox1' |
15932 | 615 |
activeHelpKey: useXftFontsOnly |
18626 | 616 |
uuid: '733f4108-3c23-11e9-860e-b8f6b1108e05' |
15887 | 617 |
visibilityChannel: useXftFontsOnlyVisible |
16460 | 618 |
enableChannel: useXftFontsOnlyEnabled |
15887 | 619 |
model: useXftFontsOnly |
620 |
translateLabel: true |
|
621 |
extent: (Point 637 30) |
|
622 |
) |
|
16460 | 623 |
(CheckBoxSpec |
624 |
label: 'Only Use X Fonts / Suppress Slow Xft-Fonts (Unix Only)' |
|
625 |
name: 'CheckBox2' |
|
16482 | 626 |
activeHelpKey: useXFontsOnly |
18626 | 627 |
uuid: '733f4248-3c23-11e9-860e-b8f6b1108e05' |
16460 | 628 |
visibilityChannel: useXFontsOnlyVisible |
629 |
enableChannel: useXFontsOnlyEnabled |
|
630 |
model: useXFontsOnly |
|
631 |
translateLabel: true |
|
632 |
extent: (Point 637 30) |
|
633 |
) |
|
14205 | 634 |
(DividerSpec |
635 |
name: 'Separator12' |
|
18626 | 636 |
uuid: '733f432e-3c23-11e9-860e-b8f6b1108e05' |
14205 | 637 |
visibilityChannel: linuxFontWorkaroundVisible |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
638 |
extent: (Point 637 3) |
14205 | 639 |
) |
640 |
(ViewSpec |
|
641 |
name: 'SpecialsBox' |
|
18626 | 642 |
uuid: '733f43e2-3c23-11e9-860e-b8f6b1108e05' |
14205 | 643 |
component: |
644 |
(SpecCollection |
|
645 |
collection: ( |
|
646 |
(ActionButtonSpec |
|
647 |
label: 'Default' |
|
648 |
name: 'Button2' |
|
18626 | 649 |
layout: (LayoutFrame 0 0.0 13 0 140 0 35 0) |
14205 | 650 |
activeHelpKey: resetToDefault |
18626 | 651 |
uuid: '733f4496-3c23-11e9-860e-b8f6b1108e05' |
14205 | 652 |
translateLabel: true |
653 |
tabable: true |
|
654 |
model: changeToDefault |
|
655 |
) |
|
15932 | 656 |
(LabelSpec |
657 |
label: 'Font Size:' |
|
658 |
name: 'Label9' |
|
659 |
layout: (LayoutFrame 148 0.0 13 0 298 0 35 0) |
|
18626 | 660 |
uuid: '733f45e0-3c23-11e9-860e-b8f6b1108e05' |
15932 | 661 |
translateLabel: true |
662 |
adjust: left |
|
663 |
) |
|
664 |
(ComboListSpec |
|
665 |
name: 'ComboList1' |
|
666 |
layout: (LayoutFrame 256 0 13 0 0 1 35 0) |
|
18626 | 667 |
uuid: '733f46da-3c23-11e9-860e-b8f6b1108e05' |
15932 | 668 |
model: fontSizeSelectionHolder |
669 |
comboList: fontSizeListLabels |
|
670 |
useIndex: true |
|
671 |
) |
|
14205 | 672 |
(ActionButtonSpec |
673 |
label: 'High Contrast' |
|
15932 | 674 |
name: 'Button13' |
675 |
layout: (LayoutFrame 256 0.0 77 0 386 0 99 0) |
|
14205 | 676 |
activeHelpKey: changeToHighContrast |
18626 | 677 |
uuid: '733f4860-3c23-11e9-860e-b8f6b1108e05' |
14205 | 678 |
translateLabel: true |
679 |
tabable: true |
|
680 |
model: changeToHighContrast |
|
681 |
) |
|
15932 | 682 |
(LabelSpec |
683 |
label: 'Look:' |
|
684 |
name: 'Label10' |
|
15887 | 685 |
layout: (LayoutFrame 148 0.0 45 0 298 0 67 0) |
18626 | 686 |
uuid: '733f4982-3c23-11e9-860e-b8f6b1108e05' |
14205 | 687 |
translateLabel: true |
15932 | 688 |
adjust: left |
14205 | 689 |
) |
15932 | 690 |
(ComboListSpec |
691 |
name: 'ComboList2' |
|
692 |
layout: (LayoutFrame 256 0 45 0 0 1 67 0) |
|
18626 | 693 |
uuid: '733f4a5e-3c23-11e9-860e-b8f6b1108e05' |
15932 | 694 |
model: lookSelectionHolder |
695 |
comboList: lookListLabels |
|
696 |
useIndex: true |
|
14205 | 697 |
) |
698 |
(ActionButtonSpec |
|
15932 | 699 |
label: 'Use Xft Fonts' |
14205 | 700 |
name: 'Button10' |
18626 | 701 |
layout: (LayoutFrame 0 0.0 77 0 140 0 99 0) |
14205 | 702 |
activeHelpKey: changeToSTXLookXft |
18626 | 703 |
uuid: '733f4b26-3c23-11e9-860e-b8f6b1108e05' |
14205 | 704 |
translateLabel: true |
705 |
tabable: true |
|
15932 | 706 |
model: changeToUseXft |
14205 | 707 |
enableChannel: hasXftFonts |
708 |
) |
|
15932 | 709 |
(ActionButtonSpec |
710 |
label: 'Normal Contrast' |
|
711 |
name: 'Button14' |
|
712 |
layout: (LayoutFrame 400 0.0 77 0 530 0 99 0) |
|
713 |
activeHelpKey: changeToNormalContrast |
|
18626 | 714 |
uuid: '733f4c48-3c23-11e9-860e-b8f6b1108e05' |
15932 | 715 |
translateLabel: true |
716 |
tabable: true |
|
717 |
model: changeToNormalContrast |
|
718 |
) |
|
14205 | 719 |
) |
720 |
||
721 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
722 |
extent: (Point 637 124) |
14205 | 723 |
) |
724 |
) |
|
725 |
||
726 |
) |
|
727 |
) |
|
728 |
) |
|
729 |
||
730 |
) |
|
731 |
) |
|
732 |
! ! |
|
733 |
||
734 |
!FontSettingsApplication methodsFor:'accessing'! |
|
735 |
||
18626 | 736 |
buttonDefValue |
737 |
|v| |
|
738 |
||
739 |
(v := self buttonDef value) isNil ifTrue:[ |
|
740 |
^ self defaultFontSpecDictionary at:#Button |
|
741 |
]. |
|
742 |
^ v asFontDescription storeString |
|
743 |
||
744 |
"Created: / 01-03-2019 / 14:15:28 / Claus Gittinger" |
|
745 |
! |
|
746 |
||
14205 | 747 |
encodingMatch:aEncodingMatch |
748 |
||
749 |
aEncodingMatch notNil ifTrue:[ |
|
750 |
filter := [:f | f encoding notNil |
|
751 |
and:[aEncodingMatch match:f encoding]]. |
|
752 |
]. |
|
18626 | 753 |
! |
754 |
||
755 |
inputFieldDefValue |
|
756 |
|v| |
|
757 |
||
758 |
(v := self inputFieldDef value) isNil ifTrue:[ |
|
759 |
^ self defaultFontSpecDictionary at:#InputField |
|
760 |
]. |
|
761 |
^ v asFontDescription storeString |
|
762 |
||
763 |
"Created: / 01-03-2019 / 14:16:15 / Claus Gittinger" |
|
764 |
! |
|
765 |
||
766 |
labelDefValue |
|
767 |
|v| |
|
768 |
||
769 |
(v := self labelDef value) isNil ifTrue:[ |
|
770 |
^ self defaultFontSpecDictionary at:#Label |
|
771 |
]. |
|
772 |
^ v asFontDescription storeString |
|
773 |
||
774 |
"Created: / 01-03-2019 / 14:15:15 / Claus Gittinger" |
|
775 |
! |
|
776 |
||
777 |
listDefValue |
|
778 |
|v| |
|
779 |
||
780 |
(v := self listDef value) isNil ifTrue:[ |
|
781 |
^ self defaultFontSpecDictionary at:#List |
|
782 |
]. |
|
783 |
^ v asFontDescription storeString |
|
784 |
||
785 |
"Created: / 01-03-2019 / 14:16:25 / Claus Gittinger" |
|
786 |
! |
|
787 |
||
788 |
menuDefValue |
|
789 |
|v| |
|
790 |
||
791 |
(v := self menuDef value) isNil ifTrue:[ |
|
792 |
^ self defaultFontSpecDictionary at:#Menu |
|
793 |
]. |
|
794 |
^ v asFontDescription storeString |
|
795 |
||
796 |
"Created: / 01-03-2019 / 14:16:44 / Claus Gittinger" |
|
797 |
! |
|
798 |
||
799 |
otherDefValue |
|
800 |
|v| |
|
801 |
||
802 |
(v := self otherDef value) isNil ifTrue:[ |
|
803 |
^ self defaultFontSpecDictionary at:#Other |
|
804 |
]. |
|
805 |
^ v asFontDescription storeString |
|
806 |
||
807 |
"Created: / 01-03-2019 / 14:15:08 / Claus Gittinger" |
|
808 |
! |
|
809 |
||
810 |
textDefValue |
|
811 |
|v| |
|
812 |
||
813 |
(v := self textDef value) isNil ifTrue:[ |
|
814 |
^ self defaultFontSpecDictionary at:#Text |
|
815 |
]. |
|
816 |
^ v asFontDescription storeString |
|
817 |
||
818 |
"Created: / 01-03-2019 / 14:16:00 / Claus Gittinger" |
|
819 |
! |
|
820 |
||
821 |
tooltipDefValue |
|
822 |
|v| |
|
823 |
||
824 |
(v := self tooltipDef value) isNil ifTrue:[ |
|
825 |
^ self defaultFontSpecDictionary at:#Tooltip |
|
826 |
]. |
|
827 |
^ v asFontDescription storeString |
|
828 |
||
829 |
"Created: / 01-03-2019 / 14:16:35 / Claus Gittinger" |
|
14205 | 830 |
! ! |
831 |
||
832 |
!FontSettingsApplication methodsFor:'actions'! |
|
833 |
||
834 |
basicReadFontSettings |
|
16320 | 835 |
|prefs readFont sz lookIdx idx defaultTextFont| |
16981 | 836 |
|
837 |
self readAspects:#(useXftFontsOnly useXFontsOnly) from:currentUserPrefs. |
|
15887 | 838 |
|
16981 | 839 |
prefs := currentUserPrefs fontPreferences. |
15887 | 840 |
prefs isNil ifTrue:[ |
841 |
prefs := Dictionary new. |
|
842 |
]. |
|
843 |
||
844 |
readFont := |
|
845 |
[:key :default | |
|
846 |
|s fn| |
|
847 |
||
848 |
s := prefs at:key ifAbsent:nil. |
|
849 |
s notNil ifTrue:[ |
|
15892 | 850 |
fn := Object readFrom:s. |
15887 | 851 |
self useXftFontsOnly value ifTrue:[ |
852 |
fn := XftFontDescription for:fn |
|
853 |
]. |
|
854 |
]. |
|
855 |
fn isNil ifTrue:[ |
|
856 |
fn := default. |
|
857 |
]. |
|
858 |
fn |
|
859 |
]. |
|
860 |
||
15933 | 861 |
self allOfThem value:View defaultFont. |
18625 | 862 |
{ |
863 |
{#otherDef . #Other . View defaultFont } . |
|
864 |
{#labelDef . #Label . Label defaultFont } . |
|
865 |
{#buttonDef . #Button . Button defaultFont } . |
|
866 |
{#listDef . #List . SelectionInListView defaultFont } . |
|
867 |
{#menuDef . #Menu . MenuView defaultFont } . |
|
868 |
{#textDef . #Text . TextView defaultFont } . |
|
869 |
{#inputFieldDef . #InputField . EditField defaultFont } . |
|
870 |
{#tooltipDef . #Tooltip . ActiveHelpView defaultFont } |
|
871 |
} triplesDo:[:holderGetter :aspectName :defaultValue | |
|
872 |
|holder font| |
|
873 |
||
874 |
holder := self perform:holderGetter. |
|
875 |
font := readFont value:aspectName value:defaultValue. |
|
876 |
holder value = font ifFalse:[ |
|
877 |
holder value:font |
|
878 |
]. |
|
879 |
]. |
|
880 |
"/ self otherDef value = (readFont value:#Other value:View defaultFont) ifFalse:[ |
|
881 |
"/ self otherDef value:(readFont value:#Other value:View defaultFont). |
|
882 |
"/ ]. |
|
883 |
"/ self labelDef value:(readFont value:#Label value:Label defaultFont). |
|
884 |
"/ self buttonDef value:(readFont value:#Button value:Button defaultFont). |
|
885 |
"/ self listDef value:(readFont value:#List value:SelectionInListView defaultFont). |
|
886 |
"/ self menuDef value:(readFont value:#Menu value:MenuView defaultFont). |
|
887 |
"/ self textDef value:(readFont value:#Text value:TextView defaultFont). |
|
888 |
"/ self inputFieldDef value:(readFont value:#InputField value:EditField defaultFont). |
|
889 |
"/ self tooltipDef value:(readFont value:#Tooltip value:ActiveHelpView defaultFont). |
|
14205 | 890 |
|
15932 | 891 |
sz := TextView defaultFont size. |
892 |
idx := self fontSizeListValues indexOf:sz. |
|
893 |
idx ~~ 0 ifTrue:[ |
|
15933 | 894 |
self fontSizeSelectionHolder value:idx withoutNotifying:self. |
15932 | 895 |
]. |
896 |
||
897 |
lookIdx := nil. |
|
16320 | 898 |
defaultTextFont := TextView defaultFont. |
899 |
(defaultTextFont face = #bold) ifTrue:[ |
|
900 |
lookIdx := self lookListValues indexOf:#vage. |
|
15932 | 901 |
] ifFalse:[ |
16981 | 902 |
(defaultTextFont onDevice:self device) isFixedWidth ifTrue:[ |
16320 | 903 |
lookIdx := self lookListValues indexOf:#stx. |
15932 | 904 |
] ifFalse:[ |
16320 | 905 |
lookIdx := self lookListValues indexOf:#squeak. |
15932 | 906 |
]. |
907 |
]. |
|
15933 | 908 |
self lookSelectionHolder value:lookIdx withoutNotifying:self |
18625 | 909 |
|
14205 | 910 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
911 |
"Created: / 06-02-2012 / 12:22:39 / cg" |
|
18625 | 912 |
"Modified: / 28-02-2019 / 18:04:42 / Claus Gittinger" |
14205 | 913 |
! |
914 |
||
915 |
basicReadSettings |
|
916 |
self basicReadFontSettings. |
|
917 |
||
918 |
self readAspects: #(linuxFontWorkaround) from: currentUserPrefs |
|
919 |
||
920 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
921 |
"Modified: / 06-02-2012 / 12:22:51 / cg" |
|
922 |
! |
|
923 |
||
924 |
basicSaveSettings |
|
16460 | 925 |
"/ |fn| |
14205 | 926 |
|
16460 | 927 |
self writeAspects: #(linuxFontWorkaround useXftFontsOnly useXFontsOnly) to: currentUserPrefs. |
16981 | 928 |
currentUserPrefs fontPreferences:self fontSpecDictionary. |
15887 | 929 |
|
930 |
"/ fn := self otherDef value. |
|
931 |
"/ SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
932 |
"/ |
|
933 |
"/ fn := self labelDef value. |
|
934 |
"/ Label defaultFont:fn. |
|
935 |
"/ CheckBox defaultFont:fn. |
|
936 |
"/ |
|
937 |
"/ fn := self buttonDef value. |
|
938 |
"/ Button defaultFont:fn. |
|
939 |
"/ Toggle defaultFont:fn. |
|
940 |
"/ |
|
941 |
"/ fn := self textDef value. |
|
942 |
"/ TextView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
943 |
"/ |
|
944 |
"/ fn := self inputFieldDef value. |
|
945 |
"/ EditField withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
946 |
"/ |
|
947 |
"/ fn := self listDef value. |
|
948 |
"/ SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
949 |
"/ |
|
950 |
"/ fn := self tooltipDef value. |
|
951 |
"/ ActiveHelpView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
952 |
"/ |
|
953 |
"/ fn := self menuDef value. |
|
954 |
"/ ListView defaultFont:fn. |
|
955 |
"/ MenuView defaultFont:fn. |
|
956 |
"/ MenuPanel defaultFont:fn. |
|
957 |
"/ NoteBookView defaultFont:fn. |
|
958 |
"/ PullDownMenu defaultFont:fn. |
|
14494
680379a3dbef
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14491
diff
changeset
|
959 |
|
680379a3dbef
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14491
diff
changeset
|
960 |
DebugView newDebugger. |
14205 | 961 |
|
962 |
"Modified: / 10-10-2011 / 12:15:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
963 |
! |
|
964 |
||
965 |
changeAllFont |
|
966 |
|f| |
|
967 |
||
968 |
self withWaitCursorDo:[ |
|
969 |
f := FontPanel |
|
970 |
fontFromUserInitial:(self allOfThem value) |
|
971 |
title:(resources string:'Font for %1' with:'All') |
|
972 |
filter:filter. |
|
973 |
]. |
|
974 |
f notNil ifTrue:[ |
|
975 |
"/ self allOfThem value:(f onDevice:allLabel device). |
|
976 |
self otherDef value:(f onDevice:otherLabel device). |
|
977 |
self labelDef value:(f onDevice:labelLabel device). |
|
978 |
self buttonDef value:(f onDevice:buttonsLabel device). |
|
979 |
self listDef value:(f onDevice:listsLabel device). |
|
980 |
self menuDef value:(f onDevice:menuLabel device). |
|
981 |
self textDef value:(f onDevice:textLabel device). |
|
982 |
self inputFieldDef value:(f onDevice:inputFieldLabel device). |
|
16080 | 983 |
self tooltipDef value:(f onDevice:tooltipLabel device). |
14205 | 984 |
] |
985 |
! |
|
986 |
||
987 |
changeButtonsFont |
|
988 |
self changeFontFor:self buttonDef labelTitle:'Buttons'. |
|
989 |
! |
|
990 |
||
991 |
changeFontFor:aHolder labelTitle:labelTitle |
|
992 |
|f | |
|
993 |
||
994 |
self withWaitCursorDo:[ |
|
995 |
f := FontPanel |
|
996 |
fontFromUserInitial:(aHolder value) |
|
997 |
title:(resources string:'Font for %1' with:labelTitle) |
|
998 |
filter:filter. |
|
999 |
]. |
|
1000 |
f notNil ifTrue:[ |
|
1001 |
aHolder value:(f onDevice:self graphicsDevice). |
|
1002 |
]. |
|
1003 |
! |
|
1004 |
||
1005 |
changeInputFieldFont |
|
1006 |
self changeFontFor:self inputFieldDef labelTitle:'Input Fields'. |
|
1007 |
! |
|
1008 |
||
1009 |
changeLabelsFont |
|
1010 |
self changeFontFor:self labelDef labelTitle:'Labels'. |
|
1011 |
! |
|
1012 |
||
1013 |
changeListsFont |
|
1014 |
self changeFontFor:self listDef labelTitle:'Lists'. |
|
1015 |
! |
|
1016 |
||
1017 |
changeMenusFont |
|
1018 |
self changeFontFor:self menuDef labelTitle:'Menus'. |
|
1019 |
! |
|
1020 |
||
1021 |
changeOtherFont |
|
1022 |
self changeFontFor:self otherDef labelTitle:'All Others'. |
|
1023 |
! |
|
1024 |
||
1025 |
changeTextFont |
|
1026 |
self changeFontFor:self textDef labelTitle:'Edited Text'. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1027 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1028 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1029 |
changeTooltipFont |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1030 |
self changeFontFor:self tooltipDef labelTitle:'Tooltops'. |
15932 | 1031 |
! |
1032 |
||
16981 | 1033 |
defaultFontSpecDictionary |
1034 |
^ Dictionary new |
|
18626 | 1035 |
at:#Other put:View defaultFont asFontDescription storeString; |
1036 |
at:#Label put:View defaultFont asFontDescription storeString; |
|
1037 |
at:#Button put:Button defaultFont asFontDescription storeString; |
|
1038 |
at:#Text put:TextView defaultFont asFontDescription storeString; |
|
1039 |
at:#InputField put:EditField defaultFont asFontDescription storeString; |
|
1040 |
at:#List put:SelectionInListView defaultFont asFontDescription storeString; |
|
1041 |
at:#Tooltip put:ActiveHelpView defaultFont asFontDescription storeString; |
|
1042 |
at:#Menu put:MenuView defaultFont asFontDescription storeString; |
|
16981 | 1043 |
yourself |
18626 | 1044 |
|
1045 |
"Modified: / 01-03-2019 / 14:13:44 / Claus Gittinger" |
|
16981 | 1046 |
! |
1047 |
||
15932 | 1048 |
fontSizeSelectionChanged |
1049 |
|idx sz| |
|
1050 |
||
1051 |
idx := self fontSizeSelectionHolder value. |
|
1052 |
sz := self fontSizeListValues at:idx ifAbsent:nil. |
|
1053 |
sz notNil ifTrue:[ |
|
1054 |
self changeToFontsWithSize:sz |
|
1055 |
]. |
|
1056 |
! |
|
1057 |
||
16978 | 1058 |
fontSpecDictionary |
1059 |
^ Dictionary new |
|
18626 | 1060 |
at:#Other put:(self otherDefValue); |
1061 |
at:#Label put:(self labelDefValue); |
|
1062 |
at:#Button put:(self buttonDefValue); |
|
1063 |
at:#Text put:(self textDefValue); |
|
1064 |
at:#InputField put:(self inputFieldDefValue); |
|
1065 |
at:#List put:(self listDefValue); |
|
1066 |
at:#Tooltip put:(self tooltipDefValue); |
|
1067 |
at:#Menu put:(self menuDefValue); |
|
16978 | 1068 |
yourself |
18625 | 1069 |
|
18626 | 1070 |
"Modified: / 01-03-2019 / 14:18:37 / Claus Gittinger" |
16978 | 1071 |
! |
1072 |
||
15932 | 1073 |
lookSelectionChanged |
1074 |
|idx look| |
|
1075 |
||
1076 |
idx := self lookSelectionHolder value. |
|
1077 |
look := self lookListValues at:idx ifAbsent:nil. |
|
1078 |
look notNil ifTrue:[ |
|
1079 |
look == #stx ifTrue:[ |
|
1080 |
self changeToSTXLook |
|
1081 |
] ifFalse:[ |
|
1082 |
look == #squeak ifTrue:[ |
|
1083 |
self changeToSqueakLook |
|
1084 |
] ifFalse:[ |
|
1085 |
look == #vage ifTrue:[ |
|
1086 |
self changeToVisualAgeLook |
|
1087 |
] |
|
1088 |
] |
|
1089 |
]. |
|
1090 |
]. |
|
17152 | 1091 |
! |
1092 |
||
1093 |
readFontsFromWidgetDefaults |
|
1094 |
|sz idx| |
|
1095 |
||
1096 |
self allOfThem value:View defaultFont. |
|
1097 |
self otherDef value:(View defaultFont). |
|
1098 |
self labelDef value:(Label defaultFont). |
|
1099 |
self buttonDef value:(Button defaultFont). |
|
1100 |
self listDef value:(SelectionInListView defaultFont). |
|
1101 |
self menuDef value:(MenuView defaultFont). |
|
1102 |
self textDef value:(TextView defaultFont). |
|
1103 |
self inputFieldDef value:(EditField defaultFont). |
|
1104 |
self tooltipDef value:(ActiveHelpView defaultFont). |
|
1105 |
||
1106 |
sz := TextView defaultFont size. |
|
1107 |
idx := self fontSizeListValues indexOf:sz. |
|
1108 |
idx ~~ 0 ifTrue:[ |
|
1109 |
self fontSizeSelectionHolder value:idx withoutNotifying:self. |
|
1110 |
]. |
|
14205 | 1111 |
! ! |
1112 |
||
1113 |
!FontSettingsApplication methodsFor:'actions-common looks'! |
|
1114 |
||
1115 |
changeToBigFonts |
|
15932 | 1116 |
self changeToFontsWithSize:16 |
14205 | 1117 |
! |
1118 |
||
1119 |
changeToDefault |
|
1120 |
"/View readStyleSheetAndUpdateAllStyleCaches. |
|
17152 | 1121 |
SimpleView readStyleSheet. |
14205 | 1122 |
View updateAllStyleCaches. |
17152 | 1123 |
self readFontsFromWidgetDefaults. |
14205 | 1124 |
|
1125 |
"Created: / 06-02-2012 / 12:06:00 / cg" |
|
1126 |
! |
|
1127 |
||
1128 |
changeToFix:fixFont variable:variableFont |
|
1129 |
self textDef value:fixFont. |
|
1130 |
self inputFieldDef value:fixFont. |
|
1131 |
||
1132 |
self menuDef value:variableFont. |
|
1133 |
self listDef value:variableFont. |
|
1134 |
self labelDef value:variableFont. |
|
1135 |
self buttonDef value:variableFont. |
|
1136 |
self otherDef value:variableFont. |
|
16080 | 1137 |
self tooltipDef value:variableFont. |
14205 | 1138 |
|
1139 |
self allOfThem value:variableFont. |
|
1140 |
||
1141 |
"Created: / 06-02-2012 / 12:18:34 / cg" |
|
1142 |
! |
|
1143 |
||
15932 | 1144 |
changeToFontsWithSize:points |
1145 |
|f fixFont variableFont| |
|
1146 |
||
1147 |
f := TextView defaultFont. |
|
1148 |
f := f asSize:points. |
|
1149 |
TextView defaultFont:f. |
|
1150 |
||
1151 |
fixFont := (self textDef value "TextView defaultFont" asSize:points). |
|
1152 |
variableFont := (self labelDef value "Label defaultFont" asSize:points). |
|
1153 |
self changeToFix:fixFont variable:variableFont. |
|
1154 |
! |
|
1155 |
||
14205 | 1156 |
changeToHighContrast |
1157 |
|fixFont variableFont| |
|
1158 |
||
15932 | 1159 |
fixFont := (self textDef value "TextView defaultFont") asFace:'bold'. |
1160 |
variableFont := (self labelDef value "Label defaultFont") asFace:'bold'. |
|
14205 | 1161 |
self changeToFix:fixFont variable:variableFont. |
1162 |
||
1163 |
"Created: / 06-02-2012 / 12:12:47 / cg" |
|
1164 |
! |
|
1165 |
||
1166 |
changeToHugeFonts |
|
15932 | 1167 |
self changeToFontsWithSize:18 |
1168 |
! |
|
1169 |
||
1170 |
changeToNormalContrast |
|
14205 | 1171 |
|fixFont variableFont| |
1172 |
||
15932 | 1173 |
fixFont := (self textDef value "TextView defaultFont") asFace:'medium'. |
1174 |
variableFont := (self labelDef value "Label defaultFont") asFace:'medium'. |
|
14205 | 1175 |
self changeToFix:fixFont variable:variableFont. |
1176 |
||
15932 | 1177 |
"Created: / 06-02-2012 / 12:12:47 / cg" |
14205 | 1178 |
! |
1179 |
||
1180 |
changeToSTXLook |
|
15932 | 1181 |
self changeToSTXLookWithSize:(TextView defaultFont size) |
1182 |
! |
|
1183 |
||
1184 |
changeToSTXLookSmall |
|
1185 |
|f| |
|
1186 |
||
1187 |
f := TextView defaultFont. |
|
1188 |
f := f asSize:10. |
|
1189 |
TextView defaultFont:f. |
|
1190 |
||
1191 |
self changeToSTXLook. |
|
1192 |
! |
|
1193 |
||
1194 |
changeToSTXLookSmallXft |
|
1195 |
|f| |
|
1196 |
||
1197 |
f := TextView defaultFont. |
|
1198 |
f := f asSize:10. |
|
1199 |
TextView defaultFont:f. |
|
1200 |
||
1201 |
self changeToSTXLookXft |
|
1202 |
! |
|
1203 |
||
1204 |
changeToSTXLookWithSize:points |
|
14205 | 1205 |
|fixFont variableFont| |
1206 |
||
15932 | 1207 |
fixFont := (Font family:'courier new' face:'medium' style:'roman' size:points). |
1208 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:points). |
|
14205 | 1209 |
self changeToFix:fixFont variable:variableFont. |
1210 |
||
1211 |
"Created: / 17-03-2012 / 11:23:16 / cg" |
|
1212 |
! |
|
1213 |
||
1214 |
changeToSTXLookXft |
|
1215 |
|fixFont variableFont| |
|
1216 |
||
16094 | 1217 |
self hasXftFonts ifFalse:[ |
14205 | 1218 |
self changeToSTXLook. |
1219 |
^ self. |
|
1220 |
]. |
|
1221 |
||
16094 | 1222 |
fixFont := XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size). |
1223 |
variableFont := XftFontDescription family:'Arial' face:'regular' style:'roman' size:(TextView defaultFont size). |
|
14205 | 1224 |
self changeToFix:fixFont variable:variableFont. |
1225 |
! |
|
1226 |
||
15932 | 1227 |
changeToSmallFonts |
1228 |
self changeToFontsWithSize:10 |
|
1229 |
! |
|
1230 |
||
14205 | 1231 |
changeToSqueakLook |
1232 |
|variableFont| |
|
1233 |
||
1234 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
1235 |
self changeToFix:variableFont variable:variableFont. |
|
1236 |
||
1237 |
"Created: / 17-03-2012 / 11:22:59 / cg" |
|
1238 |
! |
|
1239 |
||
15932 | 1240 |
changeToUseXft |
1241 |
||
1242 |
|fixFont variableFont| |
|
1243 |
||
16094 | 1244 |
self hasXftFonts ifFalse:[ |
15932 | 1245 |
^ self. |
1246 |
]. |
|
1247 |
||
1248 |
TextView defaultFont:(XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size)). |
|
1249 |
Label defaultFont:(XftFontDescription family:'Arial' face:'regular' style:'roman' size:(Label defaultFont size)). |
|
1250 |
||
16094 | 1251 |
fixFont := XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size). |
1252 |
variableFont := XftFontDescription family:'Arial' face:'regular' style:'roman' size:(TextView defaultFont size). |
|
15932 | 1253 |
self changeToFix:fixFont variable:variableFont. |
1254 |
! |
|
1255 |
||
14205 | 1256 |
changeToVisualAgeLook |
1257 |
|variableFont variableBoldFont| |
|
1258 |
||
17850 | 1259 |
variableBoldFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
14205 | 1260 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
1261 |
self changeToFix:variableBoldFont variable:variableBoldFont. |
|
1262 |
||
1263 |
self menuDef value:variableFont. |
|
1264 |
||
1265 |
"Created: / 17-03-2012 / 11:22:18 / cg" |
|
1266 |
! ! |
|
1267 |
||
1268 |
!FontSettingsApplication methodsFor:'aspects'! |
|
1269 |
||
1270 |
allFontLabelHolder |
|
1271 |
||
1272 |
allFontLabelHolder isNil ifTrue:[ |
|
1273 |
allFontLabelHolder := '' asValue. |
|
1274 |
]. |
|
1275 |
^ allFontLabelHolder. |
|
1276 |
! |
|
1277 |
||
1278 |
allOfThem |
|
1279 |
"return/create the 'allOfThem' value holder (automatically generated)" |
|
1280 |
||
1281 |
allOfThem isNil ifTrue:[ |
|
1282 |
allOfThem := ValueHolder new. |
|
1283 |
allOfThem addDependent:self. |
|
1284 |
]. |
|
1285 |
^ allOfThem |
|
1286 |
! |
|
1287 |
||
1288 |
buttonDef |
|
1289 |
"return/create the 'buttonDef' value holder (automatically generated)" |
|
1290 |
||
1291 |
buttonDef isNil ifTrue:[ |
|
1292 |
buttonDef := ValueHolder new. |
|
1293 |
buttonDef addDependent:self. |
|
1294 |
]. |
|
1295 |
^ buttonDef |
|
1296 |
! |
|
1297 |
||
1298 |
buttonsFontLabelHolder |
|
1299 |
||
1300 |
buttonsFontLabelHolder isNil ifTrue:[ |
|
1301 |
buttonsFontLabelHolder := '' asValue. |
|
1302 |
]. |
|
1303 |
^ buttonsFontLabelHolder. |
|
1304 |
! |
|
1305 |
||
15932 | 1306 |
fontSizeLabelsAndValues |
1307 |
^ #( |
|
1308 |
('Default (12)' 12) |
|
1309 |
(nil nil) |
|
1310 |
('Tiny (8)' 8) |
|
1311 |
('Small (10)' 10) |
|
1312 |
('Big (16)' 16) |
|
1313 |
('Huge (18)' 18) |
|
1314 |
('<keep as is>' nil) |
|
1315 |
) |
|
1316 |
! |
|
1317 |
||
1318 |
fontSizeListLabels |
|
1319 |
^ self fontSizeLabelsAndValues collect:[:each | each first]. |
|
1320 |
! |
|
1321 |
||
1322 |
fontSizeListValues |
|
1323 |
^ self fontSizeLabelsAndValues collect:[:each | each second]. |
|
1324 |
! |
|
1325 |
||
1326 |
fontSizeSelectionHolder |
|
1327 |
fontSizeSelectionHolder isNil ifTrue:[ |
|
1328 |
fontSizeSelectionHolder := nil asValue. |
|
1329 |
fontSizeSelectionHolder onChangeSend:#fontSizeSelectionChanged to:self. |
|
1330 |
]. |
|
1331 |
^ fontSizeSelectionHolder |
|
1332 |
! |
|
1333 |
||
14205 | 1334 |
infoText |
1335 |
^ (self resources |
|
1336 |
string:'FONT_SETTINGS_INFO' |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1337 |
default:'Please notice that changes only affect new windows. |
19408 | 1338 |
Existing windows usually remember their initial font as created. |
14205 | 1339 |
If required, reopen some of the views, including the Launcher itself. |
1340 |
||
1341 |
Also notice: |
|
19408 | 1342 |
unless you save changed settings, |
14205 | 1343 |
only the current session is affected by changes here.') withCRs |
1344 |
||
1345 |
"Created: / 17-08-2010 / 10:52:00 / cg" |
|
1346 |
! |
|
1347 |
||
1348 |
inputFieldDef |
|
1349 |
inputFieldDef isNil ifTrue:[ |
|
1350 |
inputFieldDef := ValueHolder new. |
|
1351 |
inputFieldDef addDependent:self. |
|
1352 |
]. |
|
1353 |
^ inputFieldDef |
|
1354 |
! |
|
1355 |
||
1356 |
inputFieldFontLabelHolder |
|
1357 |
||
1358 |
inputFieldFontLabelHolder isNil ifTrue:[ |
|
1359 |
inputFieldFontLabelHolder := '' asValue. |
|
1360 |
]. |
|
1361 |
^ inputFieldFontLabelHolder. |
|
1362 |
! |
|
1363 |
||
1364 |
labelDef |
|
1365 |
"return/create the 'labelDef' value holder (automatically generated)" |
|
1366 |
||
1367 |
labelDef isNil ifTrue:[ |
|
1368 |
labelDef := ValueHolder new. |
|
1369 |
labelDef addDependent:self. |
|
1370 |
]. |
|
1371 |
^ labelDef |
|
1372 |
! |
|
1373 |
||
1374 |
labelsFontLabelHolder |
|
1375 |
labelsFontLabelHolder isNil ifTrue:[ |
|
1376 |
labelsFontLabelHolder := '' asValue. |
|
1377 |
]. |
|
1378 |
^ labelsFontLabelHolder. |
|
1379 |
! |
|
1380 |
||
1381 |
linuxFontWorkaround |
|
1382 |
linuxFontWorkaround isNil ifTrue:[ |
|
1383 |
linuxFontWorkaround := false asValue. |
|
1384 |
linuxFontWorkaround onChangeSend:#updateModifiedChannel to:self |
|
1385 |
]. |
|
1386 |
^ linuxFontWorkaround. |
|
1387 |
||
1388 |
"Created: / 10-10-2011 / 12:14:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1389 |
! |
|
1390 |
||
1391 |
linuxFontWorkaroundVisible |
|
1392 |
^OperatingSystem getOSType == #linux |
|
1393 |
||
1394 |
"Created: / 10-10-2011 / 12:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1395 |
! |
|
1396 |
||
1397 |
listDef |
|
1398 |
"return/create the 'listDef' value holder (automatically generated)" |
|
1399 |
||
1400 |
listDef isNil ifTrue:[ |
|
1401 |
listDef := ValueHolder new. |
|
1402 |
listDef addDependent:self. |
|
1403 |
]. |
|
1404 |
^ listDef |
|
1405 |
! |
|
1406 |
||
1407 |
listsFontLabelHolder |
|
1408 |
||
1409 |
listsFontLabelHolder isNil ifTrue:[ |
|
1410 |
listsFontLabelHolder := '' asValue. |
|
1411 |
]. |
|
1412 |
^ listsFontLabelHolder. |
|
1413 |
! |
|
1414 |
||
15932 | 1415 |
lookLabelsAndValues |
1416 |
^ #( |
|
1417 |
('ST/X Look (monospace font for code)' #stx) |
|
1418 |
('Squeak Look (variable font for code)' #squeak) |
|
1419 |
('V''Age Look (variable bold font for code)' #vage) |
|
1420 |
('<keep as is>' nil) |
|
1421 |
) |
|
1422 |
! |
|
1423 |
||
1424 |
lookListLabels |
|
1425 |
^ self lookLabelsAndValues collect:[:each | each first]. |
|
1426 |
! |
|
1427 |
||
1428 |
lookListValues |
|
1429 |
^ self lookLabelsAndValues collect:[:each | each second]. |
|
1430 |
! |
|
1431 |
||
1432 |
lookSelectionHolder |
|
1433 |
lookSelectionHolder isNil ifTrue:[ |
|
1434 |
lookSelectionHolder := nil asValue. |
|
1435 |
lookSelectionHolder onChangeSend:#lookSelectionChanged to:self. |
|
1436 |
]. |
|
1437 |
^ lookSelectionHolder |
|
1438 |
! |
|
1439 |
||
14205 | 1440 |
menuDef |
1441 |
"return/create the 'menuDef' value holder (automatically generated)" |
|
1442 |
||
1443 |
menuDef isNil ifTrue:[ |
|
1444 |
menuDef := ValueHolder new. |
|
1445 |
menuDef addDependent:self. |
|
1446 |
]. |
|
1447 |
^ menuDef |
|
1448 |
! |
|
1449 |
||
1450 |
menusFontLabelHolder |
|
1451 |
||
1452 |
menusFontLabelHolder isNil ifTrue:[ |
|
1453 |
menusFontLabelHolder := '' asValue. |
|
1454 |
]. |
|
1455 |
^ menusFontLabelHolder. |
|
1456 |
! |
|
1457 |
||
1458 |
otherDef |
|
1459 |
otherDef isNil ifTrue:[ |
|
1460 |
otherDef := ValueHolder new. |
|
1461 |
otherDef addDependent:self. |
|
1462 |
]. |
|
1463 |
^ otherDef |
|
1464 |
! |
|
1465 |
||
1466 |
otherFontLabelHolder |
|
1467 |
||
1468 |
otherFontLabelHolder isNil ifTrue:[ |
|
1469 |
otherFontLabelHolder := '' asValue. |
|
1470 |
]. |
|
1471 |
^ otherFontLabelHolder. |
|
1472 |
! |
|
1473 |
||
1474 |
textDef |
|
1475 |
"return/create the 'textDef' value holder (automatically generated)" |
|
1476 |
||
1477 |
textDef isNil ifTrue:[ |
|
1478 |
textDef := ValueHolder new. |
|
1479 |
textDef addDependent:self. |
|
1480 |
]. |
|
1481 |
^ textDef |
|
1482 |
! |
|
1483 |
||
1484 |
textFontLabelHolder |
|
1485 |
||
1486 |
textFontLabelHolder isNil ifTrue:[ |
|
1487 |
textFontLabelHolder := '' asValue. |
|
1488 |
]. |
|
1489 |
^ textFontLabelHolder. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1490 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1491 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1492 |
tooltipDef |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1493 |
tooltipDef isNil ifTrue:[ |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1494 |
tooltipDef := ValueHolder new. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1495 |
tooltipDef addDependent:self. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1496 |
]. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1497 |
^ tooltipDef |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1498 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1499 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1500 |
tooltipFontLabelHolder |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1501 |
tooltipFontLabelHolder isNil ifTrue:[ |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1502 |
tooltipFontLabelHolder := '' asValue. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1503 |
]. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1504 |
^ tooltipFontLabelHolder. |
15887 | 1505 |
! |
1506 |
||
16460 | 1507 |
useXFontsOnly |
1508 |
useXFontsOnly isNil ifTrue:[ |
|
1509 |
useXFontsOnly := false asValue. |
|
1510 |
useXFontsOnly onChangeSend:#useXftSettingsChanged to:self |
|
1511 |
]. |
|
1512 |
^ useXFontsOnly. |
|
1513 |
! |
|
1514 |
||
1515 |
useXFontsOnlyEnabled |
|
1516 |
^ builder valueAspectFor:#useXFontsOnlyEnabled initialValue:true |
|
1517 |
! |
|
1518 |
||
1519 |
useXFontsOnlyVisible |
|
1520 |
||
18943 | 1521 |
^ Screen isX11Platform |
1522 |
||
1523 |
"Modified: / 25-07-2019 / 12:32:23 / Claus Gittinger" |
|
16460 | 1524 |
! |
1525 |
||
15887 | 1526 |
useXftFontsOnly |
1527 |
useXftFontsOnly isNil ifTrue:[ |
|
1528 |
useXftFontsOnly := false asValue. |
|
16460 | 1529 |
useXftFontsOnly onChangeSend:#useXftSettingsChanged to:self |
15887 | 1530 |
]. |
1531 |
^ useXftFontsOnly. |
|
1532 |
! |
|
1533 |
||
16460 | 1534 |
useXftFontsOnlyEnabled |
1535 |
^ builder valueAspectFor:#useXftFontsOnlyEnabled initialValue:true |
|
1536 |
! |
|
1537 |
||
15887 | 1538 |
useXftFontsOnlyVisible |
1539 |
||
18943 | 1540 |
^ Screen isX11Platform |
1541 |
||
1542 |
"Modified: / 25-07-2019 / 12:32:28 / Claus Gittinger" |
|
16460 | 1543 |
! |
1544 |
||
1545 |
useXftSettingsChanged |
|
1546 |
|enableUseXft enableUseX| |
|
1547 |
||
1548 |
self updateModifiedChannel. |
|
1549 |
||
1550 |
enableUseXft := enableUseX := true. |
|
1551 |
||
1552 |
self useXftFontsOnly value ifTrue:[ |
|
1553 |
enableUseX := false |
|
1554 |
]. |
|
1555 |
self useXFontsOnly value ifTrue:[ |
|
1556 |
enableUseXft := false |
|
1557 |
]. |
|
1558 |
||
1559 |
self useXFontsOnlyEnabled value:enableUseX. |
|
1560 |
self useXftFontsOnlyEnabled value:enableUseXft |
|
14205 | 1561 |
! ! |
1562 |
||
1563 |
!FontSettingsApplication methodsFor:'change & update'! |
|
1564 |
||
1565 |
update:something with:aParameter from:changedObject |
|
1566 |
|whichLabel whichFontLabelHolder| |
|
1567 |
||
1568 |
builder notNil ifTrue:[ |
|
1569 |
changedObject == self allOfThem ifTrue:[ |
|
1570 |
whichLabel := allLabel. |
|
1571 |
whichFontLabelHolder := self allFontLabelHolder. |
|
1572 |
]. |
|
1573 |
changedObject == self otherDef ifTrue:[ |
|
1574 |
whichLabel := otherLabel. |
|
1575 |
whichFontLabelHolder := self otherFontLabelHolder. |
|
1576 |
]. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1577 |
changedObject == self tooltipDef ifTrue:[ |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1578 |
whichLabel := tooltipLabel. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1579 |
whichFontLabelHolder := self tooltipFontLabelHolder. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1580 |
]. |
14205 | 1581 |
changedObject == self labelDef ifTrue:[ |
1582 |
whichLabel := labelLabel. |
|
1583 |
whichFontLabelHolder := self labelsFontLabelHolder. |
|
1584 |
]. |
|
1585 |
changedObject == self buttonDef ifTrue:[ |
|
1586 |
whichLabel := buttonsLabel. |
|
1587 |
whichFontLabelHolder := self buttonsFontLabelHolder. |
|
1588 |
]. |
|
1589 |
changedObject == self listDef ifTrue:[ |
|
1590 |
whichLabel := listsLabel. |
|
1591 |
whichFontLabelHolder := self listsFontLabelHolder. |
|
1592 |
]. |
|
1593 |
changedObject == self menuDef ifTrue:[ |
|
1594 |
whichLabel := menuLabel. |
|
1595 |
whichFontLabelHolder := self menusFontLabelHolder. |
|
1596 |
]. |
|
1597 |
changedObject == self textDef ifTrue:[ |
|
1598 |
whichLabel := textLabel. |
|
1599 |
whichFontLabelHolder := self textFontLabelHolder. |
|
1600 |
]. |
|
1601 |
changedObject == self inputFieldDef ifTrue:[ |
|
1602 |
whichLabel := inputFieldLabel. |
|
1603 |
whichFontLabelHolder := self inputFieldFontLabelHolder. |
|
1604 |
]. |
|
1605 |
whichLabel notNil ifTrue:[ |
|
1606 |
self updateFontOfLabel:whichLabel andFontNameHolder:whichFontLabelHolder from:changedObject. |
|
1607 |
^ self. |
|
1608 |
] |
|
1609 |
]. |
|
1610 |
super update:something with:aParameter from:changedObject |
|
1611 |
! |
|
1612 |
||
1613 |
updateAllFontLabels |
|
1614 |
self update:#value with:nil from:self allOfThem. |
|
1615 |
self update:#value with:nil from:self otherDef. |
|
1616 |
self update:#value with:nil from:self labelDef. |
|
1617 |
self update:#value with:nil from:self buttonDef. |
|
1618 |
self update:#value with:nil from:self listDef. |
|
1619 |
self update:#value with:nil from:self menuDef. |
|
1620 |
self update:#value with:nil from:self textDef. |
|
1621 |
self update:#value with:nil from:self inputFieldDef. |
|
16080 | 1622 |
self update:#value with:nil from:self tooltipDef. |
14205 | 1623 |
! |
1624 |
||
1625 |
updateFontOfLabel:labelWidget andFontNameHolder:fontNameHolder from:changedObject |
|
1626 |
|f label| |
|
1627 |
||
1628 |
f := changedObject value. |
|
1629 |
labelWidget font:f. |
|
1630 |
label := f isNil ifTrue:[ |
|
1631 |
'' |
|
1632 |
] ifFalse:[ |
|
1633 |
f userFriendlyName |
|
1634 |
]. |
|
1635 |
fontNameHolder value:label. |
|
1636 |
self updateModifiedChannel |
|
1637 |
! ! |
|
1638 |
||
1639 |
!FontSettingsApplication methodsFor:'help'! |
|
1640 |
||
1641 |
helpFilename |
|
1642 |
^ 'Launcher/fontSettings.html' |
|
1643 |
! ! |
|
1644 |
||
1645 |
!FontSettingsApplication methodsFor:'initialization & release'! |
|
1646 |
||
1647 |
postBuildAllFontLabel:aWidget |
|
1648 |
||
1649 |
allLabel := aWidget. |
|
1650 |
! |
|
1651 |
||
1652 |
postBuildButtonsFontLabel:aWidget |
|
1653 |
||
1654 |
buttonsLabel := aWidget. |
|
1655 |
! |
|
1656 |
||
14569
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1657 |
postBuildHelpLabel:aWidget |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1658 |
aWidget level:0. |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1659 |
aWidget scrolledView backgroundColor:self window viewBackground. |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1660 |
aWidget font:(Label defaultFont). |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1661 |
! |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1662 |
|
14205 | 1663 |
postBuildInputFieldFontLabel:aWidget |
1664 |
||
1665 |
inputFieldLabel := aWidget. |
|
1666 |
! |
|
1667 |
||
1668 |
postBuildLabelsFontLabel:aWidget |
|
1669 |
||
1670 |
labelLabel := aWidget. |
|
1671 |
! |
|
1672 |
||
1673 |
postBuildListsFontLabel:aWidget |
|
1674 |
||
1675 |
listsLabel := aWidget. |
|
1676 |
! |
|
1677 |
||
1678 |
postBuildMenuesFontLabel:aWidget |
|
1679 |
||
1680 |
menuLabel := aWidget. |
|
1681 |
! |
|
1682 |
||
1683 |
postBuildOtherFontLabel:aWidget |
|
1684 |
||
1685 |
otherLabel := aWidget. |
|
1686 |
! |
|
1687 |
||
1688 |
postBuildTextFontLabel:aWidget |
|
1689 |
||
1690 |
textLabel := aWidget. |
|
1691 |
! |
|
1692 |
||
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1693 |
postBuildTooltipFontLabel:aWidget |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1694 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1695 |
tooltipLabel := aWidget. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1696 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1697 |
|
14205 | 1698 |
postBuildWith:aBuilder |
1699 |
"/ self readSettings. |
|
1700 |
self updateAllFontLabels. |
|
18625 | 1701 |
self modifiedChannel value:false. |
14205 | 1702 |
super postBuildWith:aBuilder |
18625 | 1703 |
|
1704 |
"Modified: / 28-02-2019 / 18:09:24 / Claus Gittinger" |
|
14205 | 1705 |
! ! |
1706 |
||
1707 |
!FontSettingsApplication methodsFor:'queries'! |
|
1708 |
||
1709 |
hasUnsavedChanges |
|
18625 | 1710 |
((currentUserPrefs fontPreferences ? self defaultFontSpecDictionary) sameContentsAs: self fontSpecDictionary) ifFalse:[ |
1711 |
^ true |
|
1712 |
]. |
|
1713 |
(self hasChangedAspectIn:#(linuxFontWorkaround useXftFontsOnly useXFontsOnly) asComparedTo:currentUserPrefs) ifTrue:[ |
|
1714 |
^ true |
|
1715 |
]. |
|
1716 |
^ false |
|
1717 |
||
1718 |
"Modified: / 28-02-2019 / 18:20:59 / Claus Gittinger" |
|
14205 | 1719 |
! |
1720 |
||
1721 |
hasXftFonts |
|
16094 | 1722 |
^ self graphicsDevice supportsXftFonts |
14205 | 1723 |
! ! |
1724 |
||
1725 |
!FontSettingsApplication class methodsFor:'documentation'! |
|
1726 |
||
1727 |
version |
|
15887 | 1728 |
^ '$Header$' |
14205 | 1729 |
! |
1730 |
||
1731 |
version_CVS |
|
15887 | 1732 |
^ '$Header$' |
14205 | 1733 |
! ! |
1734 |