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