author | Stefan Vogel <sv@exept.de> |
Wed, 30 Apr 2014 12:09:15 +0200 | |
changeset 14297 | 3f2d9aac889d |
parent 14213 | ebed72d87fe8 |
child 14319 | a84b4a0c15ca |
permissions | -rw-r--r-- |
14205 | 1 |
"{ Package: 'stx:libtool' }" |
2 |
||
14213
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
3 |
"{ NameSpace: Tools }" |
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
4 |
|
14205 | 5 |
AbstractSettingsApplication subclass:#FontSettingsApplication |
6 |
instanceVariableNames:'filter allOfThem labelDef buttonDef listDef menuDef textDef |
|
7 |
othersDef allFontLabelHolder buttonsFontLabelHolder |
|
8 |
textFontLabelHolder labelsFontLabelHolder listsFontLabelHolder |
|
9 |
menusFontLabelHolder otherFontLabelHolder allLabel buttonsLabel |
|
10 |
textLabel labelLabel listsLabel menuLabel inputFieldLabel |
|
11 |
inputFieldDef inputFieldFontLabelHolder otherLabel |
|
12 |
linuxFontWorkaround otherDef' |
|
13 |
classVariableNames:'' |
|
14 |
poolDictionaries:'' |
|
15 |
category:'Interface-Smalltalk' |
|
16 |
! |
|
17 |
||
18 |
||
19 |
!FontSettingsApplication class methodsFor:'instance creation'! |
|
20 |
||
21 |
fontForEncoding:encodingMatch |
|
22 |
||
23 |
| inst | |
|
24 |
||
25 |
inst := self new. |
|
26 |
inst encodingMatch:encodingMatch. |
|
27 |
self initialize. |
|
28 |
self open. |
|
29 |
! ! |
|
30 |
||
31 |
!FontSettingsApplication class methodsFor:'defaults'! |
|
32 |
||
33 |
widgetList |
|
34 |
||
35 |
^ #( |
|
36 |
'All' |
|
37 |
'Labels' |
|
38 |
'Buttons' |
|
39 |
'Lists' |
|
40 |
'Menus' |
|
41 |
'Edited Text' |
|
42 |
'Others' |
|
43 |
) |
|
44 |
! ! |
|
45 |
||
46 |
!FontSettingsApplication class methodsFor:'help specs'! |
|
47 |
||
48 |
flyByHelpSpec |
|
49 |
"This resource specification was automatically generated |
|
50 |
by the UIHelpTool of ST/X." |
|
51 |
||
52 |
"Do not manually edit this!! If it is corrupted, |
|
53 |
the UIHelpTool may not be able to read the specification." |
|
54 |
||
55 |
" |
|
56 |
UIHelpTool openOnClass:FontSettingsAppl |
|
57 |
" |
|
58 |
||
59 |
<resource: #help> |
|
60 |
||
61 |
^ super flyByHelpSpec addPairsFrom:#( |
|
62 |
||
63 |
#resetToDefault |
|
64 |
'Reset fonts back to original default values (as specified in the window style-file and OS settings)' |
|
65 |
||
66 |
#changeToHighContrast |
|
67 |
'Change settings for higher contrast.\Useful for presentations and outdor operation' |
|
68 |
||
69 |
#changeToBigFonts |
|
70 |
'Change settings for bigger fonts.\Useful for presentations' |
|
71 |
||
72 |
#changeToHugeFonts |
|
73 |
'Change settings for huge fonts.\Useful for presentations' |
|
74 |
||
75 |
#changeToSTXLook |
|
76 |
'Change settings for an ST/X-like look with fixed-width code fonts' |
|
77 |
||
78 |
#changeToSTXLookXft |
|
79 |
'Change settings for an ST/X-like look with fixed-width code fonts).\Uses better looking Xft fonts if avaiable (XWindow only)' |
|
80 |
||
81 |
#changeToSqueakLook |
|
82 |
'Change settings for a Squeak-like look with variable code fonts' |
|
83 |
||
84 |
#changeToVisualAgeLook |
|
85 |
'Change settings for a VisualAge-like look with bold variable code fonts' |
|
86 |
) |
|
87 |
||
88 |
"Created: / 17-03-2012 / 11:37:51 / cg" |
|
89 |
! ! |
|
90 |
||
91 |
!FontSettingsApplication class methodsFor:'image specs'! |
|
92 |
||
93 |
defaultIcon |
|
94 |
<resource: #programImage> |
|
95 |
||
96 |
^ ToolbarIconLibrary fontIcon |
|
97 |
! |
|
98 |
||
99 |
defaultIcon2 |
|
100 |
"This resource specification was automatically generated |
|
101 |
by the ImageEditor of ST/X." |
|
102 |
||
103 |
"Do not manually edit this!! If it is corrupted, |
|
104 |
the ImageEditor may not be able to read the specification." |
|
105 |
||
106 |
" |
|
107 |
self defaultIcon2 inspect |
|
108 |
ImageEditor openOnClass:self andSelector:#defaultIcon2 |
|
109 |
Icon flushCachedIcons |
|
110 |
" |
|
111 |
||
112 |
<resource: #image> |
|
113 |
||
114 |
^Icon |
|
115 |
constantNamed:#'FontSettingsAppl class defaultIcon2' |
|
116 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
117 |
@@@@@@@@@@@@@@@@@@@@@!!X @@@@@@@!!X @@@6H@@@@@@DP6H@@@Y!!H@@@@@QDY"@@@BY"@@@@ADQBY"@@@FX @@@@@DQCX @@@6H@@@@@QEP6H@@@@ @@@@ |
|
118 |
ADUDP @C@@@@@@@DQSH@@@L @@@@@@QEL @@@2@@@@@@ADT2@@@CH@@@@@@DQSH@@@L @@@@@@QEL @@@2@@@@@@QDT2@@@CH@@@@@QDQSH@@@@ @@@@@DQE |
|
119 |
P @@@@@@@@@@@DQ@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 150 150 150 213 213 213 215 48 48 134 54 54 240 240 240]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@G @OG0@O''<@O7>@O<?@A>? A?? A??@A<?@A<>@A<>@A<>@A=>@C?>@G<>@C<\@@8D@@H@@@@@@@@@@@@@@') ; yourself); yourself] |
|
120 |
! ! |
|
121 |
||
122 |
!FontSettingsApplication class methodsFor:'interface specs'! |
|
123 |
||
124 |
windowSpec |
|
125 |
"This resource specification was automatically generated |
|
126 |
by the UIPainter of ST/X." |
|
127 |
||
128 |
"Do not manually edit this!! If it is corrupted, |
|
129 |
the UIPainter may not be able to read the specification." |
|
130 |
||
131 |
" |
|
132 |
UIPainter new openOnClass:FontSettingsAppl andSelector:#windowSpec |
|
133 |
FontSettingsAppl new openInterface:#windowSpec |
|
134 |
FontSettingsAppl open |
|
135 |
" |
|
136 |
||
137 |
<resource: #canvas> |
|
138 |
||
139 |
^ |
|
140 |
#(FullSpec |
|
141 |
name: windowSpec |
|
142 |
window: |
|
143 |
(WindowSpec |
|
144 |
label: 'Font Settings' |
|
145 |
name: 'Font Settings' |
|
146 |
min: (Point 10 10) |
|
147 |
bounds: (Rectangle 0 0 641 753) |
|
148 |
) |
|
149 |
component: |
|
150 |
(SpecCollection |
|
151 |
collection: ( |
|
152 |
(VerticalPanelViewSpec |
|
153 |
name: 'VerticalPanel1' |
|
154 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
155 |
horizontalLayout: fitSpace |
|
156 |
verticalLayout: topSpace |
|
157 |
horizontalSpace: 3 |
|
158 |
verticalSpace: 3 |
|
159 |
component: |
|
160 |
(SpecCollection |
|
161 |
collection: ( |
|
162 |
(TextEditorSpec |
|
163 |
name: 'TextEditor1' |
|
164 |
style: labelFont |
|
165 |
model: infoText |
|
166 |
hasHorizontalScrollBar: true |
|
167 |
hasVerticalScrollBar: true |
|
168 |
miniScrollerHorizontal: true |
|
169 |
miniScrollerVertical: true |
|
170 |
isReadOnly: true |
|
171 |
hasKeyboardFocusInitially: false |
|
172 |
extent: (Point 635 132) |
|
173 |
viewClassName: 'ListView' |
|
174 |
) |
|
175 |
(ViewSpec |
|
176 |
name: 'CodeBox' |
|
177 |
component: |
|
178 |
(SpecCollection |
|
179 |
collection: ( |
|
180 |
(LabelSpec |
|
181 |
label: 'Code' |
|
182 |
name: 'Label1' |
|
183 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
184 |
translateLabel: true |
|
185 |
adjust: left |
|
186 |
) |
|
187 |
(LabelSpec |
|
188 |
label: 'Text Font' |
|
189 |
name: 'Label2' |
|
190 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
191 |
translateLabel: true |
|
192 |
labelChannel: textFontLabelHolder |
|
193 |
adjust: left |
|
194 |
postBuildCallback: postBuildTextFontLabel: |
|
195 |
) |
|
196 |
(ActionButtonSpec |
|
197 |
label: 'Change...' |
|
198 |
name: 'Button1' |
|
199 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
200 |
translateLabel: true |
|
201 |
tabable: true |
|
202 |
model: changeTextFont |
|
203 |
) |
|
204 |
(DividerSpec |
|
205 |
name: 'Separator11' |
|
206 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
207 |
) |
|
208 |
) |
|
209 |
||
210 |
) |
|
211 |
extent: (Point 635 50) |
|
212 |
) |
|
213 |
(ViewSpec |
|
214 |
name: 'InputFieldsBox' |
|
215 |
component: |
|
216 |
(SpecCollection |
|
217 |
collection: ( |
|
218 |
(LabelSpec |
|
219 |
label: 'Input Fields' |
|
220 |
name: 'Input Fields' |
|
221 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
222 |
translateLabel: true |
|
223 |
adjust: left |
|
224 |
) |
|
225 |
(LabelSpec |
|
226 |
label: 'InputFields Font' |
|
227 |
name: 'InputFieldsFont' |
|
228 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
229 |
translateLabel: true |
|
230 |
labelChannel: inputFieldFontLabelHolder |
|
231 |
adjust: left |
|
232 |
postBuildCallback: postBuildInputFieldFontLabel: |
|
233 |
) |
|
234 |
(ActionButtonSpec |
|
235 |
label: 'Change...' |
|
236 |
name: 'ChangeText' |
|
237 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
238 |
translateLabel: true |
|
239 |
tabable: true |
|
240 |
model: changeInputFieldFont |
|
241 |
) |
|
242 |
(DividerSpec |
|
243 |
name: 'Separator10' |
|
244 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
245 |
) |
|
246 |
) |
|
247 |
||
248 |
) |
|
249 |
extent: (Point 635 50) |
|
250 |
) |
|
251 |
(ViewSpec |
|
252 |
name: 'ListsBox' |
|
253 |
component: |
|
254 |
(SpecCollection |
|
255 |
collection: ( |
|
256 |
(LabelSpec |
|
257 |
label: 'Lists' |
|
258 |
name: 'Lists' |
|
259 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
260 |
translateLabel: true |
|
261 |
adjust: left |
|
262 |
) |
|
263 |
(LabelSpec |
|
264 |
label: 'Lists Font' |
|
265 |
name: 'ListsFont' |
|
266 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
267 |
translateLabel: true |
|
268 |
labelChannel: listsFontLabelHolder |
|
269 |
adjust: left |
|
270 |
postBuildCallback: postBuildListsFontLabel: |
|
271 |
) |
|
272 |
(ActionButtonSpec |
|
273 |
label: 'Change...' |
|
274 |
name: 'ChangeLists' |
|
275 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
276 |
translateLabel: true |
|
277 |
tabable: true |
|
278 |
model: changeListsFont |
|
279 |
) |
|
280 |
(DividerSpec |
|
281 |
name: 'Separator8' |
|
282 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
283 |
) |
|
284 |
) |
|
285 |
||
286 |
) |
|
287 |
extent: (Point 635 50) |
|
288 |
) |
|
289 |
(ViewSpec |
|
290 |
name: 'MenusBox' |
|
291 |
component: |
|
292 |
(SpecCollection |
|
293 |
collection: ( |
|
294 |
(LabelSpec |
|
295 |
label: 'Menus' |
|
296 |
name: 'Menus' |
|
297 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
298 |
translateLabel: true |
|
299 |
adjust: left |
|
300 |
) |
|
301 |
(LabelSpec |
|
302 |
label: 'Menus Font' |
|
303 |
name: 'MenusFont' |
|
304 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
305 |
translateLabel: true |
|
306 |
labelChannel: menusFontLabelHolder |
|
307 |
adjust: left |
|
308 |
postBuildCallback: postBuildMenuesFontLabel: |
|
309 |
) |
|
310 |
(ActionButtonSpec |
|
311 |
label: 'Change...' |
|
312 |
name: 'ChangeMenus' |
|
313 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
314 |
translateLabel: true |
|
315 |
tabable: true |
|
316 |
model: changeMenusFont |
|
317 |
) |
|
318 |
(DividerSpec |
|
319 |
name: 'Separator9' |
|
320 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
321 |
) |
|
322 |
) |
|
323 |
||
324 |
) |
|
325 |
extent: (Point 635 50) |
|
326 |
) |
|
327 |
(ViewSpec |
|
328 |
name: 'LabelsBox' |
|
329 |
component: |
|
330 |
(SpecCollection |
|
331 |
collection: ( |
|
332 |
(LabelSpec |
|
333 |
label: 'Labels' |
|
334 |
name: 'Labels' |
|
335 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
336 |
translateLabel: true |
|
337 |
adjust: left |
|
338 |
) |
|
339 |
(LabelSpec |
|
340 |
label: 'Labels' |
|
341 |
name: 'LabelsFont' |
|
342 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
343 |
translateLabel: true |
|
344 |
labelChannel: labelsFontLabelHolder |
|
345 |
adjust: left |
|
346 |
postBuildCallback: postBuildLabelsFontLabel: |
|
347 |
) |
|
348 |
(ActionButtonSpec |
|
349 |
label: 'Change...' |
|
350 |
name: 'ChangeLabels' |
|
351 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
352 |
translateLabel: true |
|
353 |
tabable: true |
|
354 |
model: changeLabelsFont |
|
355 |
) |
|
356 |
(DividerSpec |
|
357 |
name: 'Separator6' |
|
358 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
359 |
) |
|
360 |
) |
|
361 |
||
362 |
) |
|
363 |
extent: (Point 635 50) |
|
364 |
) |
|
365 |
(ViewSpec |
|
366 |
name: 'ButtonsBox' |
|
367 |
component: |
|
368 |
(SpecCollection |
|
369 |
collection: ( |
|
370 |
(LabelSpec |
|
371 |
label: 'Buttons' |
|
372 |
name: 'Buttons' |
|
373 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
374 |
translateLabel: true |
|
375 |
adjust: left |
|
376 |
) |
|
377 |
(LabelSpec |
|
378 |
label: 'Buttons Font' |
|
379 |
name: 'ButtonsFont' |
|
380 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
381 |
translateLabel: true |
|
382 |
labelChannel: buttonsFontLabelHolder |
|
383 |
adjust: left |
|
384 |
postBuildCallback: postBuildButtonsFontLabel: |
|
385 |
) |
|
386 |
(ActionButtonSpec |
|
387 |
label: 'Change...' |
|
388 |
name: 'Change Buttons' |
|
389 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
390 |
translateLabel: true |
|
391 |
tabable: true |
|
392 |
model: changeButtonsFont |
|
393 |
) |
|
394 |
(DividerSpec |
|
395 |
name: 'Separator7' |
|
396 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
397 |
) |
|
398 |
) |
|
399 |
||
400 |
) |
|
401 |
extent: (Point 635 50) |
|
402 |
) |
|
403 |
(ViewSpec |
|
404 |
name: 'OtherBox' |
|
405 |
component: |
|
406 |
(SpecCollection |
|
407 |
collection: ( |
|
408 |
(LabelSpec |
|
409 |
label: 'All Others' |
|
410 |
name: 'Label5' |
|
411 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
412 |
translateLabel: true |
|
413 |
adjust: left |
|
414 |
) |
|
415 |
(LabelSpec |
|
416 |
label: 'Label' |
|
417 |
name: 'Label6' |
|
418 |
layout: (LayoutFrame 110 0 22 0 -5 1 44 0) |
|
419 |
translateLabel: true |
|
420 |
labelChannel: otherFontLabelHolder |
|
421 |
adjust: left |
|
422 |
postBuildCallback: postBuildOtherFontLabel: |
|
423 |
) |
|
424 |
(ActionButtonSpec |
|
425 |
label: 'Change...' |
|
426 |
name: 'Button9' |
|
427 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
428 |
translateLabel: true |
|
429 |
tabable: true |
|
430 |
model: changeOtherFont |
|
431 |
) |
|
432 |
(DividerSpec |
|
433 |
name: 'Separator13' |
|
434 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
435 |
) |
|
436 |
) |
|
437 |
||
438 |
) |
|
439 |
extent: (Point 635 50) |
|
440 |
) |
|
441 |
(ViewSpec |
|
442 |
name: 'AllBox' |
|
443 |
component: |
|
444 |
(SpecCollection |
|
445 |
collection: ( |
|
446 |
(LabelSpec |
|
447 |
label: 'All' |
|
448 |
name: 'All' |
|
449 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
450 |
translateLabel: true |
|
451 |
adjust: left |
|
452 |
) |
|
453 |
(ActionButtonSpec |
|
454 |
label: 'Change...' |
|
455 |
name: 'ChangeAll' |
|
456 |
layout: (LayoutFrame 0 0.0 22 0 105 0 44 0) |
|
457 |
translateLabel: true |
|
458 |
tabable: true |
|
459 |
model: changeAllFont |
|
460 |
) |
|
461 |
(DividerSpec |
|
462 |
name: 'Separator1' |
|
463 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
464 |
) |
|
465 |
) |
|
466 |
||
467 |
) |
|
468 |
extent: (Point 635 50) |
|
469 |
) |
|
470 |
(CheckBoxSpec |
|
471 |
label: 'Linux font workaround: do not reset fonts on snapshot restart' |
|
472 |
name: 'LinuxFontWorkaroundBox' |
|
473 |
visibilityChannel: linuxFontWorkaroundVisible |
|
474 |
model: linuxFontWorkaround |
|
475 |
translateLabel: true |
|
476 |
extent: (Point 635 30) |
|
477 |
) |
|
478 |
(DividerSpec |
|
479 |
name: 'Separator12' |
|
480 |
visibilityChannel: linuxFontWorkaroundVisible |
|
481 |
extent: (Point 635 3) |
|
482 |
) |
|
483 |
(ViewSpec |
|
484 |
name: 'SpecialsBox' |
|
485 |
component: |
|
486 |
(SpecCollection |
|
487 |
collection: ( |
|
488 |
(LabelSpec |
|
489 |
label: 'Common Settings:' |
|
490 |
name: 'Label4' |
|
491 |
layout: (LayoutFrame 0 0.0 11 0 0 1.0 33 0) |
|
492 |
translateLabel: true |
|
493 |
adjust: left |
|
494 |
) |
|
495 |
(ActionButtonSpec |
|
496 |
label: 'Default' |
|
497 |
name: 'Button2' |
|
498 |
layout: (LayoutFrame 0 0.0 35 0 130 0 57 0) |
|
499 |
activeHelpKey: resetToDefault |
|
500 |
translateLabel: true |
|
501 |
tabable: true |
|
502 |
model: changeToDefault |
|
503 |
) |
|
504 |
(ActionButtonSpec |
|
505 |
label: 'High Contrast' |
|
506 |
name: 'Button3' |
|
507 |
layout: (LayoutFrame 148 0.0 35 0 298 0 57 0) |
|
508 |
activeHelpKey: changeToHighContrast |
|
509 |
translateLabel: true |
|
510 |
tabable: true |
|
511 |
model: changeToHighContrast |
|
512 |
) |
|
513 |
(ActionButtonSpec |
|
514 |
label: 'Big Fonts' |
|
515 |
name: 'Button4' |
|
516 |
layout: (LayoutFrame 309 0.0 35 0 459 0 57 0) |
|
517 |
activeHelpKey: changeToBigFonts |
|
518 |
translateLabel: true |
|
519 |
tabable: true |
|
520 |
model: changeToBigFonts |
|
521 |
) |
|
522 |
(ActionButtonSpec |
|
523 |
label: 'Huge Fonts' |
|
524 |
name: 'Button5' |
|
525 |
layout: (LayoutFrame 470 0.0 35 0 620 0 57 0) |
|
526 |
activeHelpKey: changeToHugeFonts |
|
527 |
translateLabel: true |
|
528 |
tabable: true |
|
529 |
model: changeToHugeFonts |
|
530 |
) |
|
531 |
(ActionButtonSpec |
|
532 |
label: 'ST/X Look' |
|
533 |
name: 'Button8' |
|
534 |
layout: (LayoutFrame 148 0.0 67 0 298 0 89 0) |
|
535 |
activeHelpKey: changeToSTXLook |
|
536 |
translateLabel: true |
|
537 |
tabable: true |
|
538 |
model: changeToSTXLook |
|
539 |
) |
|
540 |
(ActionButtonSpec |
|
541 |
label: 'Squeak Look' |
|
542 |
name: 'Button6' |
|
543 |
layout: (LayoutFrame 309 0.0 67 0 459 0 89 0) |
|
544 |
activeHelpKey: changeToSqueakLook |
|
545 |
translateLabel: true |
|
546 |
tabable: true |
|
547 |
model: changeToSqueakLook |
|
548 |
) |
|
549 |
(ActionButtonSpec |
|
550 |
label: 'V''Age Look' |
|
551 |
name: 'Button7' |
|
552 |
layout: (LayoutFrame 470 0.0 67 0 620 0 89 0) |
|
553 |
activeHelpKey: changeToVisualAgeLook |
|
554 |
translateLabel: true |
|
555 |
tabable: true |
|
556 |
model: changeToVisualAgeLook |
|
557 |
) |
|
558 |
(ActionButtonSpec |
|
559 |
label: 'ST/X Look (Xft)' |
|
560 |
name: 'Button10' |
|
561 |
layout: (LayoutFrame 148 0.0 99 0 298 0 121 0) |
|
562 |
activeHelpKey: changeToSTXLookXft |
|
563 |
translateLabel: true |
|
564 |
tabable: true |
|
565 |
model: changeToSTXLookXft |
|
566 |
enableChannel: hasXftFonts |
|
567 |
) |
|
568 |
) |
|
569 |
||
570 |
) |
|
571 |
extent: (Point 635 124) |
|
572 |
) |
|
573 |
) |
|
574 |
||
575 |
) |
|
576 |
) |
|
577 |
) |
|
578 |
||
579 |
) |
|
580 |
) |
|
581 |
! ! |
|
582 |
||
583 |
!FontSettingsApplication methodsFor:'accessing'! |
|
584 |
||
585 |
encodingMatch:aEncodingMatch |
|
586 |
||
587 |
aEncodingMatch notNil ifTrue:[ |
|
588 |
filter := [:f | f encoding notNil |
|
589 |
and:[aEncodingMatch match:f encoding]]. |
|
590 |
]. |
|
591 |
! ! |
|
592 |
||
593 |
!FontSettingsApplication methodsFor:'actions'! |
|
594 |
||
595 |
basicReadFontSettings |
|
596 |
"/ View readStyleSheetAndUpdateAllStyleCaches. |
|
597 |
self allOfThem value:SimpleView defaultFont. |
|
598 |
self otherDef value:SimpleView defaultFont. |
|
599 |
self labelDef value:Label defaultFont. |
|
600 |
self buttonDef value:Button defaultFont. |
|
601 |
self listDef value:SelectionInListView defaultFont. |
|
602 |
self menuDef value:MenuView defaultFont. |
|
603 |
self textDef value:TextView defaultFont. |
|
604 |
self inputFieldDef value:EditField defaultFont. |
|
605 |
||
606 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
607 |
"Created: / 06-02-2012 / 12:22:39 / cg" |
|
608 |
! |
|
609 |
||
610 |
basicReadSettings |
|
611 |
self basicReadFontSettings. |
|
612 |
||
613 |
self readAspects: #(linuxFontWorkaround) from: currentUserPrefs |
|
614 |
||
615 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
616 |
"Modified: / 06-02-2012 / 12:22:51 / cg" |
|
617 |
! |
|
618 |
||
619 |
basicSaveSettings |
|
620 |
|fn| |
|
621 |
||
622 |
fn := self otherDef value. |
|
623 |
SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
624 |
||
625 |
fn := self labelDef value. |
|
626 |
Label defaultFont:fn. |
|
627 |
CheckBox defaultFont:fn. |
|
628 |
||
629 |
fn := self buttonDef value. |
|
630 |
Button defaultFont:fn. |
|
631 |
Toggle defaultFont:fn. |
|
632 |
||
633 |
fn := self textDef value. |
|
634 |
TextView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
635 |
||
636 |
fn := self inputFieldDef value. |
|
637 |
EditField withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
638 |
||
639 |
fn := self listDef value. |
|
640 |
SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
641 |
||
642 |
fn := self menuDef value. |
|
643 |
ListView defaultFont:fn. |
|
644 |
MenuView defaultFont:fn. |
|
645 |
MenuPanel defaultFont:fn. |
|
646 |
NoteBookView defaultFont:fn. |
|
647 |
PullDownMenu defaultFont:fn. |
|
648 |
||
649 |
self writeAspects: #(linuxFontWorkaround) to: currentUserPrefs |
|
650 |
||
651 |
"Modified: / 10-10-2011 / 12:15:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
652 |
! |
|
653 |
||
654 |
changeAllFont |
|
655 |
|f| |
|
656 |
||
657 |
self withWaitCursorDo:[ |
|
658 |
f := FontPanel |
|
659 |
fontFromUserInitial:(self allOfThem value) |
|
660 |
title:(resources string:'Font for %1' with:'All') |
|
661 |
filter:filter. |
|
662 |
]. |
|
663 |
f notNil ifTrue:[ |
|
664 |
"/ self allOfThem value:(f onDevice:allLabel device). |
|
665 |
self otherDef value:(f onDevice:otherLabel device). |
|
666 |
self labelDef value:(f onDevice:labelLabel device). |
|
667 |
self buttonDef value:(f onDevice:buttonsLabel device). |
|
668 |
self listDef value:(f onDevice:listsLabel device). |
|
669 |
self menuDef value:(f onDevice:menuLabel device). |
|
670 |
self textDef value:(f onDevice:textLabel device). |
|
671 |
self inputFieldDef value:(f onDevice:inputFieldLabel device). |
|
672 |
] |
|
673 |
! |
|
674 |
||
675 |
changeButtonsFont |
|
676 |
self changeFontFor:self buttonDef labelTitle:'Buttons'. |
|
677 |
"/ |
|
678 |
"/ |f| |
|
679 |
"/ |
|
680 |
"/ f := FontPanel |
|
681 |
"/ fontFromUserInitial:(self buttonDef value) |
|
682 |
"/ title:(resources string:'Font for %1' with:'All') |
|
683 |
"/ filter:filter. |
|
684 |
"/ f notNil ifTrue:[ |
|
685 |
"/ self buttonDef value:(f onDevice:buttonsLabel device). |
|
686 |
"/ ] |
|
687 |
! |
|
688 |
||
689 |
changeFontFor:aHolder labelTitle:labelTitle |
|
690 |
|f | |
|
691 |
||
692 |
self withWaitCursorDo:[ |
|
693 |
f := FontPanel |
|
694 |
fontFromUserInitial:(aHolder value) |
|
695 |
title:(resources string:'Font for %1' with:labelTitle) |
|
696 |
filter:filter. |
|
697 |
]. |
|
698 |
f notNil ifTrue:[ |
|
699 |
aHolder value:(f onDevice:self graphicsDevice). |
|
700 |
]. |
|
701 |
! |
|
702 |
||
703 |
changeInputFieldFont |
|
704 |
self changeFontFor:self inputFieldDef labelTitle:'Input Fields'. |
|
705 |
"/ |f| |
|
706 |
"/ |
|
707 |
"/ f := FontPanel |
|
708 |
"/ fontFromUserInitial:(self inputFieldDef value) |
|
709 |
"/ title:(resources string:'Font for %1' with:'Input Fields') |
|
710 |
"/ filter:filter. |
|
711 |
"/ f notNil ifTrue:[ |
|
712 |
"/ self inputFieldDef value:(f onDevice:inputFieldLabel device). |
|
713 |
"/ ] |
|
714 |
! |
|
715 |
||
716 |
changeLabelsFont |
|
717 |
self changeFontFor:self labelDef labelTitle:'Labels'. |
|
718 |
"/ |f | |
|
719 |
"/ |
|
720 |
"/ f := FontPanel |
|
721 |
"/ fontFromUserInitial:(self labelDef value) |
|
722 |
"/ title:(resources string:'Font for %1' with:'Labels') |
|
723 |
"/ filter:filter. |
|
724 |
"/ f notNil ifTrue:[ |
|
725 |
"/ self labelDef value:(f onDevice:labelLabel device). |
|
726 |
"/ ]. |
|
727 |
! |
|
728 |
||
729 |
changeListsFont |
|
730 |
self changeFontFor:self listDef labelTitle:'Lists'. |
|
731 |
"/ |f| |
|
732 |
"/ |
|
733 |
"/ f := FontPanel |
|
734 |
"/ fontFromUserInitial:(self listDef value) |
|
735 |
"/ title:(resources string:'Font for %1' with:'Lists') |
|
736 |
"/ filter:filter. |
|
737 |
"/ f notNil ifTrue:[ |
|
738 |
"/ self listDef value:(f onDevice:listsLabel device). |
|
739 |
"/ ] |
|
740 |
! |
|
741 |
||
742 |
changeMenusFont |
|
743 |
self changeFontFor:self menuDef labelTitle:'Menus'. |
|
744 |
"/ |f| |
|
745 |
"/ |
|
746 |
"/ f := FontPanel |
|
747 |
"/ fontFromUserInitial:(self menuDef value) |
|
748 |
"/ title:(resources string:'Font for %1' with:'Menus') |
|
749 |
"/ filter:filter. |
|
750 |
"/ f notNil ifTrue:[ |
|
751 |
"/ self menuDef value:(f onDevice:menuLabel device). |
|
752 |
"/ ] |
|
753 |
! |
|
754 |
||
755 |
changeOtherFont |
|
756 |
self changeFontFor:self otherDef labelTitle:'All Others'. |
|
757 |
"/ |f| |
|
758 |
"/ |
|
759 |
"/ f := FontPanel |
|
760 |
"/ fontFromUserInitial:(self otherDef value) |
|
761 |
"/ title:(resources string:'Font for %1' with:'All Others') |
|
762 |
"/ filter:filter. |
|
763 |
"/ f notNil ifTrue:[ |
|
764 |
"/ self otherDef value:(f onDevice:otherLabel device). |
|
765 |
"/ ] |
|
766 |
! |
|
767 |
||
768 |
changeTextFont |
|
769 |
self changeFontFor:self textDef labelTitle:'Edited Text'. |
|
770 |
"/ |f| |
|
771 |
"/ |
|
772 |
"/ f := FontPanel |
|
773 |
"/ fontFromUserInitial:(self textDef value) |
|
774 |
"/ title:(resources string:'Font for %1' with:'Edited Text') |
|
775 |
"/ filter:filter. |
|
776 |
"/ f notNil ifTrue:[ |
|
777 |
"/ self textDef value:(f onDevice:textLabel device). |
|
778 |
"/ ] |
|
779 |
! ! |
|
780 |
||
781 |
!FontSettingsApplication methodsFor:'actions-common looks'! |
|
782 |
||
783 |
changeToBigFonts |
|
784 |
|fixFont variableFont| |
|
785 |
||
786 |
"/ fixFont := (Font family:'courier cew' face:'bold' style:'roman' size:14). |
|
787 |
"/ variableFont := (Font family:'arial' face:'bold' style:'roman' size:14). |
|
788 |
fixFont := (TextView defaultFont asSize:14) asFace:'bold'. |
|
789 |
variableFont := (Label defaultFont asSize:14) asFace:'bold'. |
|
790 |
self changeToFix:fixFont variable:variableFont. |
|
791 |
||
792 |
"Created: / 06-02-2012 / 12:12:55 / cg" |
|
793 |
! |
|
794 |
||
795 |
changeToDefault |
|
796 |
"/View readStyleSheetAndUpdateAllStyleCaches. |
|
797 |
View updateAllStyleCaches. |
|
798 |
self basicReadFontSettings. |
|
799 |
||
800 |
"Created: / 06-02-2012 / 12:06:00 / cg" |
|
801 |
! |
|
802 |
||
803 |
changeToFix:fixFont variable:variableFont |
|
804 |
self textDef value:fixFont. |
|
805 |
self inputFieldDef value:fixFont. |
|
806 |
||
807 |
self menuDef value:variableFont. |
|
808 |
self listDef value:variableFont. |
|
809 |
self labelDef value:variableFont. |
|
810 |
self buttonDef value:variableFont. |
|
811 |
self otherDef value:variableFont. |
|
812 |
||
813 |
self allOfThem value:variableFont. |
|
814 |
||
815 |
"Created: / 06-02-2012 / 12:18:34 / cg" |
|
816 |
! |
|
817 |
||
818 |
changeToHighContrast |
|
819 |
|fixFont variableFont| |
|
820 |
||
821 |
"/ fixFont := (Font family:'courier New' face:'bold' style:'roman' size:12). |
|
822 |
"/ variableFont := (Font family:'arial' face:'bold' style:'roman' size:12). |
|
823 |
fixFont := (TextView defaultFont asSize:12) asFace:'bold'. |
|
824 |
variableFont := (Label defaultFont asSize:12) asFace:'bold'. |
|
825 |
self changeToFix:fixFont variable:variableFont. |
|
826 |
||
827 |
"Created: / 06-02-2012 / 12:12:47 / cg" |
|
828 |
! |
|
829 |
||
830 |
changeToHugeFonts |
|
831 |
|fixFont variableFont| |
|
832 |
||
833 |
"/ fixFont := (Font family:'courier New' face:'bold' style:'roman' size:16). |
|
834 |
"/ variableFont := (Font family:'arial' face:'bold' style:'roman' size:16). |
|
835 |
fixFont := (TextView defaultFont asSize:18) asFace:'bold'. |
|
836 |
variableFont := (Label defaultFont asSize:18) asFace:'bold'. |
|
837 |
self changeToFix:fixFont variable:variableFont. |
|
838 |
||
839 |
"Created: / 17-03-2012 / 09:06:18 / cg" |
|
840 |
! |
|
841 |
||
842 |
changeToSTXLook |
|
843 |
|fixFont variableFont| |
|
844 |
||
845 |
fixFont := (Font family:'courier new' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
846 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
847 |
self changeToFix:fixFont variable:variableFont. |
|
848 |
||
849 |
"Created: / 17-03-2012 / 11:23:16 / cg" |
|
850 |
! |
|
851 |
||
852 |
changeToSTXLookXft |
|
853 |
|fixFont variableFont| |
|
854 |
||
855 |
XftFontDescription isNil ifTrue:[ |
|
856 |
self changeToSTXLook. |
|
857 |
^ self. |
|
858 |
]. |
|
859 |
||
860 |
fixFont := (XftFontDescription family:'Courier 10 Pitch' face:'regular' style:'roman' size:(TextView defaultFont size)). |
|
861 |
variableFont := (XftFontDescription family:'Arial' face:'regular' style:'roman' size:(Button defaultFont size)). |
|
862 |
self changeToFix:fixFont variable:variableFont. |
|
863 |
! |
|
864 |
||
865 |
changeToSqueakLook |
|
866 |
|variableFont| |
|
867 |
||
868 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
869 |
self changeToFix:variableFont variable:variableFont. |
|
870 |
||
871 |
"Created: / 17-03-2012 / 11:22:59 / cg" |
|
872 |
! |
|
873 |
||
874 |
changeToVisualAgeLook |
|
875 |
|variableFont variableBoldFont| |
|
876 |
||
877 |
variableBoldFont := (Font family:'arial' face:'bold' style:'roman' size:(TextView defaultFont size)). |
|
878 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
879 |
self changeToFix:variableBoldFont variable:variableBoldFont. |
|
880 |
||
881 |
self menuDef value:variableFont. |
|
882 |
||
883 |
"Created: / 17-03-2012 / 11:22:18 / cg" |
|
884 |
! ! |
|
885 |
||
886 |
!FontSettingsApplication methodsFor:'aspects'! |
|
887 |
||
888 |
allFontLabelHolder |
|
889 |
||
890 |
allFontLabelHolder isNil ifTrue:[ |
|
891 |
allFontLabelHolder := '' asValue. |
|
892 |
]. |
|
893 |
^ allFontLabelHolder. |
|
894 |
! |
|
895 |
||
896 |
allOfThem |
|
897 |
"return/create the 'allOfThem' value holder (automatically generated)" |
|
898 |
||
899 |
allOfThem isNil ifTrue:[ |
|
900 |
allOfThem := ValueHolder new. |
|
901 |
allOfThem addDependent:self. |
|
902 |
]. |
|
903 |
^ allOfThem |
|
904 |
! |
|
905 |
||
906 |
buttonDef |
|
907 |
"return/create the 'buttonDef' value holder (automatically generated)" |
|
908 |
||
909 |
buttonDef isNil ifTrue:[ |
|
910 |
buttonDef := ValueHolder new. |
|
911 |
buttonDef addDependent:self. |
|
912 |
]. |
|
913 |
^ buttonDef |
|
914 |
! |
|
915 |
||
916 |
buttonsFontLabelHolder |
|
917 |
||
918 |
buttonsFontLabelHolder isNil ifTrue:[ |
|
919 |
buttonsFontLabelHolder := '' asValue. |
|
920 |
]. |
|
921 |
^ buttonsFontLabelHolder. |
|
922 |
! |
|
923 |
||
924 |
infoText |
|
925 |
^ (self resources |
|
926 |
string:'FONT_SETTINGS_INFO' |
|
927 |
default:'Please notice that any changes usually only affect new windows. |
|
928 |
Existing windows usually remember their initial font as created. |
|
929 |
If required, reopen some of the views, including the Launcher itself. |
|
930 |
||
931 |
Also notice: |
|
932 |
unless you save your new settings, |
|
933 |
only the current session is affected by changes here.') withCRs |
|
934 |
||
935 |
"Created: / 17-08-2010 / 10:52:00 / cg" |
|
936 |
! |
|
937 |
||
938 |
inputFieldDef |
|
939 |
inputFieldDef isNil ifTrue:[ |
|
940 |
inputFieldDef := ValueHolder new. |
|
941 |
inputFieldDef addDependent:self. |
|
942 |
]. |
|
943 |
^ inputFieldDef |
|
944 |
! |
|
945 |
||
946 |
inputFieldFontLabelHolder |
|
947 |
||
948 |
inputFieldFontLabelHolder isNil ifTrue:[ |
|
949 |
inputFieldFontLabelHolder := '' asValue. |
|
950 |
]. |
|
951 |
^ inputFieldFontLabelHolder. |
|
952 |
! |
|
953 |
||
954 |
labelDef |
|
955 |
"return/create the 'labelDef' value holder (automatically generated)" |
|
956 |
||
957 |
labelDef isNil ifTrue:[ |
|
958 |
labelDef := ValueHolder new. |
|
959 |
labelDef addDependent:self. |
|
960 |
]. |
|
961 |
^ labelDef |
|
962 |
! |
|
963 |
||
964 |
labelsFontLabelHolder |
|
965 |
||
966 |
labelsFontLabelHolder isNil ifTrue:[ |
|
967 |
labelsFontLabelHolder := '' asValue. |
|
968 |
]. |
|
969 |
^ labelsFontLabelHolder. |
|
970 |
! |
|
971 |
||
972 |
linuxFontWorkaround |
|
973 |
||
974 |
linuxFontWorkaround isNil ifTrue:[ |
|
975 |
linuxFontWorkaround := false asValue. |
|
976 |
linuxFontWorkaround onChangeSend:#updateModifiedChannel to:self |
|
977 |
||
978 |
]. |
|
979 |
^ linuxFontWorkaround. |
|
980 |
||
981 |
"Created: / 10-10-2011 / 12:14:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
982 |
! |
|
983 |
||
984 |
linuxFontWorkaroundVisible |
|
985 |
||
986 |
^OperatingSystem getOSType == #linux |
|
987 |
||
988 |
"Created: / 10-10-2011 / 12:57:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
989 |
! |
|
990 |
||
991 |
listDef |
|
992 |
"return/create the 'listDef' value holder (automatically generated)" |
|
993 |
||
994 |
listDef isNil ifTrue:[ |
|
995 |
listDef := ValueHolder new. |
|
996 |
listDef addDependent:self. |
|
997 |
]. |
|
998 |
^ listDef |
|
999 |
! |
|
1000 |
||
1001 |
listsFontLabelHolder |
|
1002 |
||
1003 |
listsFontLabelHolder isNil ifTrue:[ |
|
1004 |
listsFontLabelHolder := '' asValue. |
|
1005 |
]. |
|
1006 |
^ listsFontLabelHolder. |
|
1007 |
! |
|
1008 |
||
1009 |
menuDef |
|
1010 |
"return/create the 'menuDef' value holder (automatically generated)" |
|
1011 |
||
1012 |
menuDef isNil ifTrue:[ |
|
1013 |
menuDef := ValueHolder new. |
|
1014 |
menuDef addDependent:self. |
|
1015 |
]. |
|
1016 |
^ menuDef |
|
1017 |
! |
|
1018 |
||
1019 |
menusFontLabelHolder |
|
1020 |
||
1021 |
menusFontLabelHolder isNil ifTrue:[ |
|
1022 |
menusFontLabelHolder := '' asValue. |
|
1023 |
]. |
|
1024 |
^ menusFontLabelHolder. |
|
1025 |
! |
|
1026 |
||
1027 |
otherDef |
|
1028 |
otherDef isNil ifTrue:[ |
|
1029 |
otherDef := ValueHolder new. |
|
1030 |
otherDef addDependent:self. |
|
1031 |
]. |
|
1032 |
^ otherDef |
|
1033 |
! |
|
1034 |
||
1035 |
otherFontLabelHolder |
|
1036 |
||
1037 |
otherFontLabelHolder isNil ifTrue:[ |
|
1038 |
otherFontLabelHolder := '' asValue. |
|
1039 |
]. |
|
1040 |
^ otherFontLabelHolder. |
|
1041 |
! |
|
1042 |
||
1043 |
textDef |
|
1044 |
"return/create the 'textDef' value holder (automatically generated)" |
|
1045 |
||
1046 |
textDef isNil ifTrue:[ |
|
1047 |
textDef := ValueHolder new. |
|
1048 |
textDef addDependent:self. |
|
1049 |
]. |
|
1050 |
^ textDef |
|
1051 |
! |
|
1052 |
||
1053 |
textFontLabelHolder |
|
1054 |
||
1055 |
textFontLabelHolder isNil ifTrue:[ |
|
1056 |
textFontLabelHolder := '' asValue. |
|
1057 |
]. |
|
1058 |
^ textFontLabelHolder. |
|
1059 |
! ! |
|
1060 |
||
1061 |
!FontSettingsApplication methodsFor:'change & update'! |
|
1062 |
||
1063 |
update:something with:aParameter from:changedObject |
|
1064 |
|whichLabel whichFontLabelHolder| |
|
1065 |
||
1066 |
builder notNil ifTrue:[ |
|
1067 |
changedObject == self allOfThem ifTrue:[ |
|
1068 |
whichLabel := allLabel. |
|
1069 |
whichFontLabelHolder := self allFontLabelHolder. |
|
1070 |
]. |
|
1071 |
changedObject == self otherDef ifTrue:[ |
|
1072 |
whichLabel := otherLabel. |
|
1073 |
whichFontLabelHolder := self otherFontLabelHolder. |
|
1074 |
]. |
|
1075 |
changedObject == self labelDef ifTrue:[ |
|
1076 |
whichLabel := labelLabel. |
|
1077 |
whichFontLabelHolder := self labelsFontLabelHolder. |
|
1078 |
]. |
|
1079 |
changedObject == self buttonDef ifTrue:[ |
|
1080 |
whichLabel := buttonsLabel. |
|
1081 |
whichFontLabelHolder := self buttonsFontLabelHolder. |
|
1082 |
]. |
|
1083 |
changedObject == self listDef ifTrue:[ |
|
1084 |
whichLabel := listsLabel. |
|
1085 |
whichFontLabelHolder := self listsFontLabelHolder. |
|
1086 |
]. |
|
1087 |
changedObject == self menuDef ifTrue:[ |
|
1088 |
whichLabel := menuLabel. |
|
1089 |
whichFontLabelHolder := self menusFontLabelHolder. |
|
1090 |
]. |
|
1091 |
changedObject == self textDef ifTrue:[ |
|
1092 |
whichLabel := textLabel. |
|
1093 |
whichFontLabelHolder := self textFontLabelHolder. |
|
1094 |
]. |
|
1095 |
changedObject == self inputFieldDef ifTrue:[ |
|
1096 |
whichLabel := inputFieldLabel. |
|
1097 |
whichFontLabelHolder := self inputFieldFontLabelHolder. |
|
1098 |
]. |
|
1099 |
whichLabel notNil ifTrue:[ |
|
1100 |
self updateFontOfLabel:whichLabel andFontNameHolder:whichFontLabelHolder from:changedObject. |
|
1101 |
^ self. |
|
1102 |
] |
|
1103 |
]. |
|
1104 |
super update:something with:aParameter from:changedObject |
|
1105 |
! |
|
1106 |
||
1107 |
updateAllFontLabels |
|
1108 |
self update:#value with:nil from:self allOfThem. |
|
1109 |
self update:#value with:nil from:self otherDef. |
|
1110 |
self update:#value with:nil from:self labelDef. |
|
1111 |
self update:#value with:nil from:self buttonDef. |
|
1112 |
self update:#value with:nil from:self listDef. |
|
1113 |
self update:#value with:nil from:self menuDef. |
|
1114 |
self update:#value with:nil from:self textDef. |
|
1115 |
self update:#value with:nil from:self inputFieldDef. |
|
1116 |
! |
|
1117 |
||
1118 |
updateFontOfLabel:labelWidget andFontNameHolder:fontNameHolder from:changedObject |
|
1119 |
|f label| |
|
1120 |
||
1121 |
f := changedObject value. |
|
1122 |
labelWidget font:f. |
|
1123 |
label := f isNil ifTrue:[ |
|
1124 |
'' |
|
1125 |
] ifFalse:[ |
|
1126 |
f userFriendlyName |
|
1127 |
]. |
|
1128 |
fontNameHolder value:label. |
|
1129 |
self updateModifiedChannel |
|
1130 |
! ! |
|
1131 |
||
1132 |
!FontSettingsApplication methodsFor:'help'! |
|
1133 |
||
1134 |
helpFilename |
|
1135 |
^ 'Launcher/fontSettings.html' |
|
1136 |
! ! |
|
1137 |
||
1138 |
!FontSettingsApplication methodsFor:'initialization & release'! |
|
1139 |
||
1140 |
postBuildAllFontLabel:aWidget |
|
1141 |
||
1142 |
allLabel := aWidget. |
|
1143 |
! |
|
1144 |
||
1145 |
postBuildButtonsFontLabel:aWidget |
|
1146 |
||
1147 |
buttonsLabel := aWidget. |
|
1148 |
! |
|
1149 |
||
1150 |
postBuildInputFieldFontLabel:aWidget |
|
1151 |
||
1152 |
inputFieldLabel := aWidget. |
|
1153 |
! |
|
1154 |
||
1155 |
postBuildLabelsFontLabel:aWidget |
|
1156 |
||
1157 |
labelLabel := aWidget. |
|
1158 |
! |
|
1159 |
||
1160 |
postBuildListsFontLabel:aWidget |
|
1161 |
||
1162 |
listsLabel := aWidget. |
|
1163 |
! |
|
1164 |
||
1165 |
postBuildMenuesFontLabel:aWidget |
|
1166 |
||
1167 |
menuLabel := aWidget. |
|
1168 |
! |
|
1169 |
||
1170 |
postBuildOtherFontLabel:aWidget |
|
1171 |
||
1172 |
otherLabel := aWidget. |
|
1173 |
! |
|
1174 |
||
1175 |
postBuildTextFontLabel:aWidget |
|
1176 |
||
1177 |
textLabel := aWidget. |
|
1178 |
! |
|
1179 |
||
1180 |
postBuildWith:aBuilder |
|
1181 |
"/ self readSettings. |
|
1182 |
self updateAllFontLabels. |
|
1183 |
super postBuildWith:aBuilder |
|
1184 |
! ! |
|
1185 |
||
1186 |
!FontSettingsApplication methodsFor:'queries'! |
|
1187 |
||
1188 |
hasUnsavedChanges |
|
1189 |
self otherDef value ~= View defaultFont ifTrue:[^ true]. |
|
1190 |
self labelDef value ~= Label defaultFont ifTrue:[^ true]. |
|
1191 |
self buttonDef value ~= Button defaultFont ifTrue:[^ true]. |
|
1192 |
self listDef value ~= SelectionInListView defaultFont ifTrue:[^ true]. |
|
1193 |
self menuDef value ~= MenuView defaultFont ifTrue:[^ true]. |
|
1194 |
self textDef value ~= TextView defaultFont ifTrue:[^ true]. |
|
1195 |
self inputFieldDef value ~= EditField defaultFont ifTrue:[^ true]. |
|
1196 |
||
1197 |
(self hasChangedAspectIn: #(linuxFontWorkaround) asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
|
1198 |
||
1199 |
^ false |
|
1200 |
||
1201 |
"Modified: / 10-10-2011 / 12:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1202 |
! |
|
1203 |
||
1204 |
hasXftFonts |
|
1205 |
^ (Display platformName = 'X11') and:[ XftFontDescription notNil ] |
|
1206 |
! ! |
|
1207 |
||
1208 |
!FontSettingsApplication class methodsFor:'documentation'! |
|
1209 |
||
1210 |
version |
|
14213
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
1211 |
^ '$Header: /cvs/stx/stx/libtool/Tools__FontSettingsApplication.st,v 1.2 2014-04-13 17:27:27 cg Exp $' |
14205 | 1212 |
! |
1213 |
||
1214 |
version_CVS |
|
14213
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
1215 |
^ '$Header: /cvs/stx/stx/libtool/Tools__FontSettingsApplication.st,v 1.2 2014-04-13 17:27:27 cg Exp $' |
14205 | 1216 |
! ! |
1217 |