author | Merge Script |
Fri, 06 May 2016 06:55:08 +0200 | |
branch | jv |
changeset 16459 | 85d703589d34 |
parent 16321 | e6a4ab0da993 |
child 16570 | dc5e958a20dc |
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
258 |
activeHelpKey: changeCodeFont |
15887 | 259 |
translateLabel: true |
260 |
tabable: true |
|
261 |
model: changeTextFont |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
293 |
activeHelpKey: changeInputFieldFont |
15887 | 294 |
translateLabel: true |
295 |
tabable: true |
|
296 |
model: changeInputFieldFont |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
328 |
activeHelpKey: changeListFont |
15887 | 329 |
translateLabel: true |
330 |
tabable: true |
|
331 |
model: changeListsFont |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
363 |
activeHelpKey: changeMenuFont |
15887 | 364 |
translateLabel: true |
365 |
tabable: true |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
398 |
activeHelpKey: changeLabelFont |
15887 | 399 |
translateLabel: true |
400 |
tabable: true |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
433 |
activeHelpKey: changeButtonFont |
15887 | 434 |
translateLabel: true |
435 |
tabable: true |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
468 |
activeHelpKey: changeTooltipFont |
15887 | 469 |
translateLabel: true |
470 |
tabable: true |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
511 |
activeHelpKey: changeOtherFont |
14205 | 512 |
translateLabel: true |
513 |
labelChannel: otherFontLabelHolder |
|
514 |
adjust: left |
|
515 |
postBuildCallback: postBuildOtherFontLabel: |
|
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) |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
542 |
activeHelpKey: changeAllFont |
14205 | 543 |
translateLabel: true |
544 |
tabable: true |
|
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 |
|
15887 | 557 |
label: 'Only Use Xft Fonts (Unix Only)' |
558 |
name: 'CheckBox1' |
|
15932 | 559 |
activeHelpKey: useXftFontsOnly |
15887 | 560 |
visibilityChannel: useXftFontsOnlyVisible |
561 |
model: useXftFontsOnly |
|
562 |
translateLabel: true |
|
563 |
extent: (Point 637 30) |
|
564 |
) |
|
14205 | 565 |
(DividerSpec |
566 |
name: 'Separator12' |
|
567 |
visibilityChannel: linuxFontWorkaroundVisible |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
568 |
extent: (Point 637 3) |
14205 | 569 |
) |
570 |
(ViewSpec |
|
571 |
name: 'SpecialsBox' |
|
572 |
component: |
|
573 |
(SpecCollection |
|
574 |
collection: ( |
|
575 |
(ActionButtonSpec |
|
576 |
label: 'Default' |
|
577 |
name: 'Button2' |
|
15887 | 578 |
layout: (LayoutFrame 0 0.0 13 0 130 0 35 0) |
14205 | 579 |
activeHelpKey: resetToDefault |
580 |
translateLabel: true |
|
581 |
tabable: true |
|
582 |
model: changeToDefault |
|
583 |
) |
|
15932 | 584 |
(LabelSpec |
585 |
label: 'Font Size:' |
|
586 |
name: 'Label9' |
|
587 |
layout: (LayoutFrame 148 0.0 13 0 298 0 35 0) |
|
588 |
translateLabel: true |
|
589 |
adjust: left |
|
590 |
) |
|
591 |
(ComboListSpec |
|
592 |
name: 'ComboList1' |
|
593 |
layout: (LayoutFrame 256 0 13 0 0 1 35 0) |
|
594 |
model: fontSizeSelectionHolder |
|
595 |
comboList: fontSizeListLabels |
|
596 |
useIndex: true |
|
597 |
) |
|
14205 | 598 |
(ActionButtonSpec |
599 |
label: 'High Contrast' |
|
15932 | 600 |
name: 'Button13' |
601 |
layout: (LayoutFrame 256 0.0 77 0 386 0 99 0) |
|
14205 | 602 |
activeHelpKey: changeToHighContrast |
603 |
translateLabel: true |
|
604 |
tabable: true |
|
605 |
model: changeToHighContrast |
|
606 |
) |
|
15932 | 607 |
(LabelSpec |
608 |
label: 'Look:' |
|
609 |
name: 'Label10' |
|
15887 | 610 |
layout: (LayoutFrame 148 0.0 45 0 298 0 67 0) |
14205 | 611 |
translateLabel: true |
15932 | 612 |
adjust: left |
14205 | 613 |
) |
15932 | 614 |
(ComboListSpec |
615 |
name: 'ComboList2' |
|
616 |
layout: (LayoutFrame 256 0 45 0 0 1 67 0) |
|
617 |
model: lookSelectionHolder |
|
618 |
comboList: lookListLabels |
|
619 |
useIndex: true |
|
14205 | 620 |
) |
621 |
(ActionButtonSpec |
|
15932 | 622 |
label: 'Use Xft Fonts' |
14205 | 623 |
name: 'Button10' |
15932 | 624 |
layout: (LayoutFrame 0 0.0 77 0 130 0 99 0) |
14205 | 625 |
activeHelpKey: changeToSTXLookXft |
626 |
translateLabel: true |
|
627 |
tabable: true |
|
15932 | 628 |
model: changeToUseXft |
14205 | 629 |
enableChannel: hasXftFonts |
630 |
) |
|
15932 | 631 |
(ActionButtonSpec |
632 |
label: 'Normal Contrast' |
|
633 |
name: 'Button14' |
|
634 |
layout: (LayoutFrame 400 0.0 77 0 530 0 99 0) |
|
635 |
activeHelpKey: changeToNormalContrast |
|
636 |
translateLabel: true |
|
637 |
tabable: true |
|
638 |
model: changeToNormalContrast |
|
639 |
) |
|
14205 | 640 |
) |
641 |
||
642 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
643 |
extent: (Point 637 124) |
14205 | 644 |
) |
645 |
) |
|
646 |
||
647 |
) |
|
648 |
) |
|
649 |
) |
|
650 |
||
651 |
) |
|
652 |
) |
|
653 |
! ! |
|
654 |
||
655 |
!FontSettingsApplication methodsFor:'accessing'! |
|
656 |
||
657 |
encodingMatch:aEncodingMatch |
|
658 |
||
659 |
aEncodingMatch notNil ifTrue:[ |
|
660 |
filter := [:f | f encoding notNil |
|
661 |
and:[aEncodingMatch match:f encoding]]. |
|
662 |
]. |
|
663 |
! ! |
|
664 |
||
665 |
!FontSettingsApplication methodsFor:'actions'! |
|
666 |
||
667 |
basicReadFontSettings |
|
16320 | 668 |
|prefs readFont sz lookIdx idx defaultTextFont| |
15887 | 669 |
|
670 |
self useXftFontsOnly value:(UserPreferences current useXftFontsOnly). |
|
671 |
||
672 |
prefs := UserPreferences current fontPreferences. |
|
673 |
prefs isNil ifTrue:[ |
|
674 |
prefs := Dictionary new. |
|
675 |
]. |
|
676 |
||
677 |
readFont := |
|
678 |
[:key :default | |
|
679 |
|s fn| |
|
680 |
||
681 |
s := prefs at:key ifAbsent:nil. |
|
682 |
s notNil ifTrue:[ |
|
15892 | 683 |
fn := Object readFrom:s. |
15887 | 684 |
self useXftFontsOnly value ifTrue:[ |
685 |
fn := XftFontDescription for:fn |
|
686 |
]. |
|
687 |
]. |
|
688 |
fn isNil ifTrue:[ |
|
689 |
fn := default. |
|
690 |
]. |
|
691 |
fn |
|
692 |
]. |
|
693 |
||
15933 | 694 |
self allOfThem value:View defaultFont. |
695 |
self otherDef value:(readFont value:#Other value:View defaultFont). |
|
15887 | 696 |
self labelDef value:(readFont value:#Label value:Label defaultFont). |
697 |
self buttonDef value:(readFont value:#Button value:Button defaultFont). |
|
698 |
self listDef value:(readFont value:#List value:SelectionInListView defaultFont). |
|
699 |
self menuDef value:(readFont value:#Menu value:MenuView defaultFont). |
|
700 |
self textDef value:(readFont value:#Text value:TextView defaultFont). |
|
701 |
self inputFieldDef value:(readFont value:#InputField value:EditField defaultFont). |
|
702 |
self tooltipDef value:(readFont value:#Tooltip value:ActiveHelpView defaultFont). |
|
14205 | 703 |
|
15932 | 704 |
sz := TextView defaultFont size. |
705 |
idx := self fontSizeListValues indexOf:sz. |
|
706 |
idx ~~ 0 ifTrue:[ |
|
15933 | 707 |
self fontSizeSelectionHolder value:idx withoutNotifying:self. |
15932 | 708 |
]. |
709 |
||
710 |
lookIdx := nil. |
|
16320 | 711 |
defaultTextFont := TextView defaultFont. |
712 |
(defaultTextFont face = #bold) ifTrue:[ |
|
713 |
lookIdx := self lookListValues indexOf:#vage. |
|
15932 | 714 |
] ifFalse:[ |
16320 | 715 |
"XFT fonts always return false for #isFixedWidth" |
716 |
(defaultTextFont isXftFont or:[(defaultTextFont onDevice:self device) isFixedWidth]) ifTrue:[ |
|
717 |
lookIdx := self lookListValues indexOf:#stx. |
|
15932 | 718 |
] ifFalse:[ |
16320 | 719 |
lookIdx := self lookListValues indexOf:#squeak. |
15932 | 720 |
]. |
721 |
]. |
|
15933 | 722 |
self lookSelectionHolder value:lookIdx withoutNotifying:self |
15932 | 723 |
|
14205 | 724 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
725 |
"Created: / 06-02-2012 / 12:22:39 / cg" |
|
726 |
! |
|
727 |
||
728 |
basicReadSettings |
|
729 |
self basicReadFontSettings. |
|
730 |
||
731 |
"Modified: / 06-02-2012 / 12:22:51 / cg" |
|
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
732 |
"Modified: / 20-04-2016 / 20:16:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14205 | 733 |
! |
734 |
||
735 |
basicSaveSettings |
|
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
736 |
self writeAspects: #(useXftFontsOnly) to: currentUserPrefs. |
14205 | 737 |
|
15887 | 738 |
UserPreferences current fontPreferences: |
739 |
( |
|
740 |
Dictionary new |
|
741 |
at:#Other put:(self otherDef value storeString); |
|
742 |
at:#Label put:(self labelDef value storeString); |
|
743 |
at:#Button put:(self buttonDef value storeString); |
|
744 |
at:#Text put:(self textDef value storeString); |
|
745 |
at:#InputField put:(self inputFieldDef value storeString); |
|
746 |
at:#List put:(self listDef value storeString); |
|
747 |
at:#Tooltip put:(self tooltipDef value storeString); |
|
748 |
at:#Menu put:(self menuDef value storeString); |
|
749 |
yourself |
|
750 |
). |
|
751 |
||
752 |
"/ fn := self otherDef value. |
|
753 |
"/ SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
754 |
"/ |
|
755 |
"/ fn := self labelDef value. |
|
756 |
"/ Label defaultFont:fn. |
|
757 |
"/ CheckBox defaultFont:fn. |
|
758 |
"/ |
|
759 |
"/ fn := self buttonDef value. |
|
760 |
"/ Button defaultFont:fn. |
|
761 |
"/ Toggle defaultFont:fn. |
|
762 |
"/ |
|
763 |
"/ fn := self textDef value. |
|
764 |
"/ TextView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
765 |
"/ |
|
766 |
"/ fn := self inputFieldDef value. |
|
767 |
"/ EditField withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
768 |
"/ |
|
769 |
"/ fn := self listDef value. |
|
770 |
"/ SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
771 |
"/ |
|
772 |
"/ fn := self tooltipDef value. |
|
773 |
"/ ActiveHelpView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
774 |
"/ |
|
775 |
"/ fn := self menuDef value. |
|
776 |
"/ ListView defaultFont:fn. |
|
777 |
"/ MenuView defaultFont:fn. |
|
778 |
"/ MenuPanel defaultFont:fn. |
|
779 |
"/ NoteBookView defaultFont:fn. |
|
780 |
"/ PullDownMenu defaultFont:fn. |
|
14494
680379a3dbef
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14491
diff
changeset
|
781 |
|
680379a3dbef
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14491
diff
changeset
|
782 |
DebugView newDebugger. |
14205 | 783 |
|
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
784 |
"Modified: / 20-04-2016 / 20:16:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14205 | 785 |
! |
786 |
||
787 |
changeAllFont |
|
788 |
|f| |
|
789 |
||
790 |
self withWaitCursorDo:[ |
|
791 |
f := FontPanel |
|
792 |
fontFromUserInitial:(self allOfThem value) |
|
793 |
title:(resources string:'Font for %1' with:'All') |
|
794 |
filter:filter. |
|
795 |
]. |
|
796 |
f notNil ifTrue:[ |
|
797 |
"/ self allOfThem value:(f onDevice:allLabel device). |
|
798 |
self otherDef value:(f onDevice:otherLabel device). |
|
799 |
self labelDef value:(f onDevice:labelLabel device). |
|
800 |
self buttonDef value:(f onDevice:buttonsLabel device). |
|
801 |
self listDef value:(f onDevice:listsLabel device). |
|
802 |
self menuDef value:(f onDevice:menuLabel device). |
|
803 |
self textDef value:(f onDevice:textLabel device). |
|
804 |
self inputFieldDef value:(f onDevice:inputFieldLabel device). |
|
16080 | 805 |
self tooltipDef value:(f onDevice:tooltipLabel device). |
14205 | 806 |
] |
807 |
! |
|
808 |
||
809 |
changeButtonsFont |
|
810 |
self changeFontFor:self buttonDef labelTitle:'Buttons'. |
|
811 |
! |
|
812 |
||
813 |
changeFontFor:aHolder labelTitle:labelTitle |
|
814 |
|f | |
|
815 |
||
816 |
self withWaitCursorDo:[ |
|
817 |
f := FontPanel |
|
818 |
fontFromUserInitial:(aHolder value) |
|
819 |
title:(resources string:'Font for %1' with:labelTitle) |
|
820 |
filter:filter. |
|
821 |
]. |
|
822 |
f notNil ifTrue:[ |
|
823 |
aHolder value:(f onDevice:self graphicsDevice). |
|
824 |
]. |
|
825 |
! |
|
826 |
||
827 |
changeInputFieldFont |
|
828 |
self changeFontFor:self inputFieldDef labelTitle:'Input Fields'. |
|
829 |
! |
|
830 |
||
831 |
changeLabelsFont |
|
832 |
self changeFontFor:self labelDef labelTitle:'Labels'. |
|
833 |
! |
|
834 |
||
835 |
changeListsFont |
|
836 |
self changeFontFor:self listDef labelTitle:'Lists'. |
|
837 |
! |
|
838 |
||
839 |
changeMenusFont |
|
840 |
self changeFontFor:self menuDef labelTitle:'Menus'. |
|
841 |
! |
|
842 |
||
843 |
changeOtherFont |
|
844 |
self changeFontFor:self otherDef labelTitle:'All Others'. |
|
845 |
! |
|
846 |
||
847 |
changeTextFont |
|
848 |
self changeFontFor:self textDef labelTitle:'Edited Text'. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
849 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
850 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
851 |
changeTooltipFont |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
852 |
self changeFontFor:self tooltipDef labelTitle:'Tooltops'. |
15932 | 853 |
! |
854 |
||
855 |
fontSizeSelectionChanged |
|
856 |
|idx sz| |
|
857 |
||
858 |
idx := self fontSizeSelectionHolder value. |
|
859 |
sz := self fontSizeListValues at:idx ifAbsent:nil. |
|
860 |
sz notNil ifTrue:[ |
|
861 |
self changeToFontsWithSize:sz |
|
862 |
]. |
|
863 |
! |
|
864 |
||
865 |
lookSelectionChanged |
|
866 |
|idx look| |
|
867 |
||
868 |
idx := self lookSelectionHolder value. |
|
869 |
look := self lookListValues at:idx ifAbsent:nil. |
|
870 |
look notNil ifTrue:[ |
|
871 |
look == #stx ifTrue:[ |
|
872 |
self changeToSTXLook |
|
873 |
] ifFalse:[ |
|
874 |
look == #squeak ifTrue:[ |
|
875 |
self changeToSqueakLook |
|
876 |
] ifFalse:[ |
|
877 |
look == #vage ifTrue:[ |
|
878 |
self changeToVisualAgeLook |
|
879 |
] |
|
880 |
] |
|
881 |
]. |
|
882 |
]. |
|
14205 | 883 |
! ! |
884 |
||
885 |
!FontSettingsApplication methodsFor:'actions-common looks'! |
|
886 |
||
887 |
changeToBigFonts |
|
15932 | 888 |
self changeToFontsWithSize:16 |
14205 | 889 |
! |
890 |
||
891 |
changeToDefault |
|
892 |
"/View readStyleSheetAndUpdateAllStyleCaches. |
|
893 |
View updateAllStyleCaches. |
|
894 |
self basicReadFontSettings. |
|
895 |
||
896 |
"Created: / 06-02-2012 / 12:06:00 / cg" |
|
897 |
! |
|
898 |
||
899 |
changeToFix:fixFont variable:variableFont |
|
900 |
self textDef value:fixFont. |
|
901 |
self inputFieldDef value:fixFont. |
|
902 |
||
903 |
self menuDef value:variableFont. |
|
904 |
self listDef value:variableFont. |
|
905 |
self labelDef value:variableFont. |
|
906 |
self buttonDef value:variableFont. |
|
907 |
self otherDef value:variableFont. |
|
16080 | 908 |
self tooltipDef value:variableFont. |
14205 | 909 |
|
910 |
self allOfThem value:variableFont. |
|
911 |
||
912 |
"Created: / 06-02-2012 / 12:18:34 / cg" |
|
913 |
! |
|
914 |
||
15932 | 915 |
changeToFontsWithSize:points |
916 |
|f fixFont variableFont| |
|
917 |
||
918 |
f := TextView defaultFont. |
|
919 |
f := f asSize:points. |
|
920 |
TextView defaultFont:f. |
|
921 |
||
922 |
fixFont := (self textDef value "TextView defaultFont" asSize:points). |
|
923 |
variableFont := (self labelDef value "Label defaultFont" asSize:points). |
|
924 |
self changeToFix:fixFont variable:variableFont. |
|
925 |
! |
|
926 |
||
14205 | 927 |
changeToHighContrast |
928 |
|fixFont variableFont| |
|
929 |
||
15932 | 930 |
fixFont := (self textDef value "TextView defaultFont") asFace:'bold'. |
931 |
variableFont := (self labelDef value "Label defaultFont") asFace:'bold'. |
|
14205 | 932 |
self changeToFix:fixFont variable:variableFont. |
933 |
||
934 |
"Created: / 06-02-2012 / 12:12:47 / cg" |
|
935 |
! |
|
936 |
||
937 |
changeToHugeFonts |
|
15932 | 938 |
self changeToFontsWithSize:18 |
939 |
! |
|
940 |
||
941 |
changeToNormalContrast |
|
14205 | 942 |
|fixFont variableFont| |
943 |
||
15932 | 944 |
fixFont := (self textDef value "TextView defaultFont") asFace:'medium'. |
945 |
variableFont := (self labelDef value "Label defaultFont") asFace:'medium'. |
|
14205 | 946 |
self changeToFix:fixFont variable:variableFont. |
947 |
||
15932 | 948 |
"Created: / 06-02-2012 / 12:12:47 / cg" |
14205 | 949 |
! |
950 |
||
951 |
changeToSTXLook |
|
15932 | 952 |
self changeToSTXLookWithSize:(TextView defaultFont size) |
953 |
! |
|
954 |
||
955 |
changeToSTXLookSmall |
|
956 |
|f| |
|
957 |
||
958 |
f := TextView defaultFont. |
|
959 |
f := f asSize:10. |
|
960 |
TextView defaultFont:f. |
|
961 |
||
962 |
self changeToSTXLook. |
|
963 |
! |
|
964 |
||
965 |
changeToSTXLookSmallXft |
|
966 |
|f| |
|
967 |
||
968 |
f := TextView defaultFont. |
|
969 |
f := f asSize:10. |
|
970 |
TextView defaultFont:f. |
|
971 |
||
972 |
self changeToSTXLookXft |
|
973 |
! |
|
974 |
||
975 |
changeToSTXLookWithSize:points |
|
14205 | 976 |
|fixFont variableFont| |
977 |
||
15932 | 978 |
fixFont := (Font family:'courier new' face:'medium' style:'roman' size:points). |
979 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:points). |
|
14205 | 980 |
self changeToFix:fixFont variable:variableFont. |
981 |
||
982 |
"Created: / 17-03-2012 / 11:23:16 / cg" |
|
983 |
! |
|
984 |
||
985 |
changeToSTXLookXft |
|
986 |
|fixFont variableFont| |
|
987 |
||
16094 | 988 |
self hasXftFonts ifFalse:[ |
14205 | 989 |
self changeToSTXLook. |
990 |
^ self. |
|
991 |
]. |
|
992 |
||
16094 | 993 |
fixFont := XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size). |
994 |
variableFont := XftFontDescription family:'Arial' face:'regular' style:'roman' size:(TextView defaultFont size). |
|
14205 | 995 |
self changeToFix:fixFont variable:variableFont. |
996 |
! |
|
997 |
||
15932 | 998 |
changeToSmallFonts |
999 |
self changeToFontsWithSize:10 |
|
1000 |
! |
|
1001 |
||
14205 | 1002 |
changeToSqueakLook |
1003 |
|variableFont| |
|
1004 |
||
1005 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
1006 |
self changeToFix:variableFont variable:variableFont. |
|
1007 |
||
1008 |
"Created: / 17-03-2012 / 11:22:59 / cg" |
|
1009 |
! |
|
1010 |
||
15932 | 1011 |
changeToUseXft |
1012 |
||
1013 |
|fixFont variableFont| |
|
1014 |
||
16094 | 1015 |
self hasXftFonts ifFalse:[ |
15932 | 1016 |
^ self. |
1017 |
]. |
|
1018 |
||
1019 |
TextView defaultFont:(XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size)). |
|
1020 |
Label defaultFont:(XftFontDescription family:'Arial' face:'regular' style:'roman' size:(Label defaultFont size)). |
|
1021 |
||
16094 | 1022 |
fixFont := XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size). |
1023 |
variableFont := XftFontDescription family:'Arial' face:'regular' style:'roman' size:(TextView defaultFont size). |
|
15932 | 1024 |
self changeToFix:fixFont variable:variableFont. |
1025 |
! |
|
1026 |
||
14205 | 1027 |
changeToVisualAgeLook |
1028 |
|variableFont variableBoldFont| |
|
1029 |
||
1030 |
variableBoldFont := (Font family:'arial' face:'bold' style:'roman' size:(TextView defaultFont size)). |
|
1031 |
variableFont := (Font family:'arial' face:'medium' style:'roman' size:(TextView defaultFont size)). |
|
1032 |
self changeToFix:variableBoldFont variable:variableBoldFont. |
|
1033 |
||
1034 |
self menuDef value:variableFont. |
|
1035 |
||
1036 |
"Created: / 17-03-2012 / 11:22:18 / cg" |
|
1037 |
! ! |
|
1038 |
||
1039 |
!FontSettingsApplication methodsFor:'aspects'! |
|
1040 |
||
1041 |
allFontLabelHolder |
|
1042 |
||
1043 |
allFontLabelHolder isNil ifTrue:[ |
|
1044 |
allFontLabelHolder := '' asValue. |
|
1045 |
]. |
|
1046 |
^ allFontLabelHolder. |
|
1047 |
! |
|
1048 |
||
1049 |
allOfThem |
|
1050 |
"return/create the 'allOfThem' value holder (automatically generated)" |
|
1051 |
||
1052 |
allOfThem isNil ifTrue:[ |
|
1053 |
allOfThem := ValueHolder new. |
|
1054 |
allOfThem addDependent:self. |
|
1055 |
]. |
|
1056 |
^ allOfThem |
|
1057 |
! |
|
1058 |
||
1059 |
buttonDef |
|
1060 |
"return/create the 'buttonDef' value holder (automatically generated)" |
|
1061 |
||
1062 |
buttonDef isNil ifTrue:[ |
|
1063 |
buttonDef := ValueHolder new. |
|
1064 |
buttonDef addDependent:self. |
|
1065 |
]. |
|
1066 |
^ buttonDef |
|
1067 |
! |
|
1068 |
||
1069 |
buttonsFontLabelHolder |
|
1070 |
||
1071 |
buttonsFontLabelHolder isNil ifTrue:[ |
|
1072 |
buttonsFontLabelHolder := '' asValue. |
|
1073 |
]. |
|
1074 |
^ buttonsFontLabelHolder. |
|
1075 |
! |
|
1076 |
||
15932 | 1077 |
fontSizeLabelsAndValues |
1078 |
^ #( |
|
1079 |
('Default (12)' 12) |
|
1080 |
(nil nil) |
|
1081 |
('Tiny (8)' 8) |
|
1082 |
('Small (10)' 10) |
|
1083 |
('Big (16)' 16) |
|
1084 |
('Huge (18)' 18) |
|
1085 |
('<keep as is>' nil) |
|
1086 |
) |
|
1087 |
! |
|
1088 |
||
1089 |
fontSizeListLabels |
|
1090 |
^ self fontSizeLabelsAndValues collect:[:each | each first]. |
|
1091 |
! |
|
1092 |
||
1093 |
fontSizeListValues |
|
1094 |
^ self fontSizeLabelsAndValues collect:[:each | each second]. |
|
1095 |
! |
|
1096 |
||
1097 |
fontSizeSelectionHolder |
|
1098 |
fontSizeSelectionHolder isNil ifTrue:[ |
|
1099 |
fontSizeSelectionHolder := nil asValue. |
|
1100 |
fontSizeSelectionHolder onChangeSend:#fontSizeSelectionChanged to:self. |
|
1101 |
]. |
|
1102 |
^ fontSizeSelectionHolder |
|
1103 |
! |
|
1104 |
||
14205 | 1105 |
infoText |
1106 |
^ (self resources |
|
1107 |
string:'FONT_SETTINGS_INFO' |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1108 |
default:'Please notice that changes only affect new windows. |
14205 | 1109 |
Existing windows usually remember their initial font as created. |
1110 |
If required, reopen some of the views, including the Launcher itself. |
|
1111 |
||
1112 |
Also notice: |
|
1113 |
unless you save your new settings, |
|
1114 |
only the current session is affected by changes here.') withCRs |
|
1115 |
||
1116 |
"Created: / 17-08-2010 / 10:52:00 / cg" |
|
1117 |
! |
|
1118 |
||
1119 |
inputFieldDef |
|
1120 |
inputFieldDef isNil ifTrue:[ |
|
1121 |
inputFieldDef := ValueHolder new. |
|
1122 |
inputFieldDef addDependent:self. |
|
1123 |
]. |
|
1124 |
^ inputFieldDef |
|
1125 |
! |
|
1126 |
||
1127 |
inputFieldFontLabelHolder |
|
1128 |
||
1129 |
inputFieldFontLabelHolder isNil ifTrue:[ |
|
1130 |
inputFieldFontLabelHolder := '' asValue. |
|
1131 |
]. |
|
1132 |
^ inputFieldFontLabelHolder. |
|
1133 |
! |
|
1134 |
||
1135 |
labelDef |
|
1136 |
"return/create the 'labelDef' value holder (automatically generated)" |
|
1137 |
||
1138 |
labelDef isNil ifTrue:[ |
|
1139 |
labelDef := ValueHolder new. |
|
1140 |
labelDef addDependent:self. |
|
1141 |
]. |
|
1142 |
^ labelDef |
|
1143 |
! |
|
1144 |
||
1145 |
labelsFontLabelHolder |
|
1146 |
labelsFontLabelHolder isNil ifTrue:[ |
|
1147 |
labelsFontLabelHolder := '' asValue. |
|
1148 |
]. |
|
1149 |
^ labelsFontLabelHolder. |
|
1150 |
! |
|
1151 |
||
1152 |
listDef |
|
1153 |
"return/create the 'listDef' value holder (automatically generated)" |
|
1154 |
||
1155 |
listDef isNil ifTrue:[ |
|
1156 |
listDef := ValueHolder new. |
|
1157 |
listDef addDependent:self. |
|
1158 |
]. |
|
1159 |
^ listDef |
|
1160 |
! |
|
1161 |
||
1162 |
listsFontLabelHolder |
|
1163 |
||
1164 |
listsFontLabelHolder isNil ifTrue:[ |
|
1165 |
listsFontLabelHolder := '' asValue. |
|
1166 |
]. |
|
1167 |
^ listsFontLabelHolder. |
|
1168 |
! |
|
1169 |
||
15932 | 1170 |
lookLabelsAndValues |
1171 |
^ #( |
|
1172 |
('ST/X Look (monospace font for code)' #stx) |
|
1173 |
('Squeak Look (variable font for code)' #squeak) |
|
1174 |
('V''Age Look (variable bold font for code)' #vage) |
|
1175 |
('<keep as is>' nil) |
|
1176 |
) |
|
1177 |
! |
|
1178 |
||
1179 |
lookListLabels |
|
1180 |
^ self lookLabelsAndValues collect:[:each | each first]. |
|
1181 |
! |
|
1182 |
||
1183 |
lookListValues |
|
1184 |
^ self lookLabelsAndValues collect:[:each | each second]. |
|
1185 |
! |
|
1186 |
||
1187 |
lookSelectionHolder |
|
1188 |
lookSelectionHolder isNil ifTrue:[ |
|
1189 |
lookSelectionHolder := nil asValue. |
|
1190 |
lookSelectionHolder onChangeSend:#lookSelectionChanged to:self. |
|
1191 |
]. |
|
1192 |
^ lookSelectionHolder |
|
1193 |
! |
|
1194 |
||
14205 | 1195 |
menuDef |
1196 |
"return/create the 'menuDef' value holder (automatically generated)" |
|
1197 |
||
1198 |
menuDef isNil ifTrue:[ |
|
1199 |
menuDef := ValueHolder new. |
|
1200 |
menuDef addDependent:self. |
|
1201 |
]. |
|
1202 |
^ menuDef |
|
1203 |
! |
|
1204 |
||
1205 |
menusFontLabelHolder |
|
1206 |
||
1207 |
menusFontLabelHolder isNil ifTrue:[ |
|
1208 |
menusFontLabelHolder := '' asValue. |
|
1209 |
]. |
|
1210 |
^ menusFontLabelHolder. |
|
1211 |
! |
|
1212 |
||
1213 |
otherDef |
|
1214 |
otherDef isNil ifTrue:[ |
|
1215 |
otherDef := ValueHolder new. |
|
1216 |
otherDef addDependent:self. |
|
1217 |
]. |
|
1218 |
^ otherDef |
|
1219 |
! |
|
1220 |
||
1221 |
otherFontLabelHolder |
|
1222 |
||
1223 |
otherFontLabelHolder isNil ifTrue:[ |
|
1224 |
otherFontLabelHolder := '' asValue. |
|
1225 |
]. |
|
1226 |
^ otherFontLabelHolder. |
|
1227 |
! |
|
1228 |
||
1229 |
textDef |
|
1230 |
"return/create the 'textDef' value holder (automatically generated)" |
|
1231 |
||
1232 |
textDef isNil ifTrue:[ |
|
1233 |
textDef := ValueHolder new. |
|
1234 |
textDef addDependent:self. |
|
1235 |
]. |
|
1236 |
^ textDef |
|
1237 |
! |
|
1238 |
||
1239 |
textFontLabelHolder |
|
1240 |
||
1241 |
textFontLabelHolder isNil ifTrue:[ |
|
1242 |
textFontLabelHolder := '' asValue. |
|
1243 |
]. |
|
1244 |
^ textFontLabelHolder. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1245 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1246 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1247 |
tooltipDef |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1248 |
tooltipDef isNil ifTrue:[ |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1249 |
tooltipDef := ValueHolder new. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1250 |
tooltipDef addDependent:self. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1251 |
]. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1252 |
^ tooltipDef |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1253 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1254 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1255 |
tooltipFontLabelHolder |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1256 |
tooltipFontLabelHolder isNil ifTrue:[ |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1257 |
tooltipFontLabelHolder := '' asValue. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1258 |
]. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1259 |
^ tooltipFontLabelHolder. |
15887 | 1260 |
! |
1261 |
||
1262 |
useXftFontsOnly |
|
1263 |
useXftFontsOnly isNil ifTrue:[ |
|
1264 |
useXftFontsOnly := false asValue. |
|
1265 |
useXftFontsOnly onChangeSend:#updateModifiedChannel to:self |
|
1266 |
]. |
|
1267 |
^ useXftFontsOnly. |
|
1268 |
! |
|
1269 |
||
1270 |
useXftFontsOnlyVisible |
|
1271 |
||
16289 | 1272 |
^ Screen platformName == #X11 |
14205 | 1273 |
! ! |
1274 |
||
1275 |
!FontSettingsApplication methodsFor:'change & update'! |
|
1276 |
||
1277 |
update:something with:aParameter from:changedObject |
|
1278 |
|whichLabel whichFontLabelHolder| |
|
1279 |
||
1280 |
builder notNil ifTrue:[ |
|
1281 |
changedObject == self allOfThem ifTrue:[ |
|
1282 |
whichLabel := allLabel. |
|
1283 |
whichFontLabelHolder := self allFontLabelHolder. |
|
1284 |
]. |
|
1285 |
changedObject == self otherDef ifTrue:[ |
|
1286 |
whichLabel := otherLabel. |
|
1287 |
whichFontLabelHolder := self otherFontLabelHolder. |
|
1288 |
]. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1289 |
changedObject == self tooltipDef ifTrue:[ |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1290 |
whichLabel := tooltipLabel. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1291 |
whichFontLabelHolder := self tooltipFontLabelHolder. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1292 |
]. |
14205 | 1293 |
changedObject == self labelDef ifTrue:[ |
1294 |
whichLabel := labelLabel. |
|
1295 |
whichFontLabelHolder := self labelsFontLabelHolder. |
|
1296 |
]. |
|
1297 |
changedObject == self buttonDef ifTrue:[ |
|
1298 |
whichLabel := buttonsLabel. |
|
1299 |
whichFontLabelHolder := self buttonsFontLabelHolder. |
|
1300 |
]. |
|
1301 |
changedObject == self listDef ifTrue:[ |
|
1302 |
whichLabel := listsLabel. |
|
1303 |
whichFontLabelHolder := self listsFontLabelHolder. |
|
1304 |
]. |
|
1305 |
changedObject == self menuDef ifTrue:[ |
|
1306 |
whichLabel := menuLabel. |
|
1307 |
whichFontLabelHolder := self menusFontLabelHolder. |
|
1308 |
]. |
|
1309 |
changedObject == self textDef ifTrue:[ |
|
1310 |
whichLabel := textLabel. |
|
1311 |
whichFontLabelHolder := self textFontLabelHolder. |
|
1312 |
]. |
|
1313 |
changedObject == self inputFieldDef ifTrue:[ |
|
1314 |
whichLabel := inputFieldLabel. |
|
1315 |
whichFontLabelHolder := self inputFieldFontLabelHolder. |
|
1316 |
]. |
|
1317 |
whichLabel notNil ifTrue:[ |
|
1318 |
self updateFontOfLabel:whichLabel andFontNameHolder:whichFontLabelHolder from:changedObject. |
|
1319 |
^ self. |
|
1320 |
] |
|
1321 |
]. |
|
1322 |
super update:something with:aParameter from:changedObject |
|
1323 |
! |
|
1324 |
||
1325 |
updateAllFontLabels |
|
1326 |
self update:#value with:nil from:self allOfThem. |
|
1327 |
self update:#value with:nil from:self otherDef. |
|
1328 |
self update:#value with:nil from:self labelDef. |
|
1329 |
self update:#value with:nil from:self buttonDef. |
|
1330 |
self update:#value with:nil from:self listDef. |
|
1331 |
self update:#value with:nil from:self menuDef. |
|
1332 |
self update:#value with:nil from:self textDef. |
|
1333 |
self update:#value with:nil from:self inputFieldDef. |
|
16080 | 1334 |
self update:#value with:nil from:self tooltipDef. |
14205 | 1335 |
! |
1336 |
||
1337 |
updateFontOfLabel:labelWidget andFontNameHolder:fontNameHolder from:changedObject |
|
1338 |
|f label| |
|
1339 |
||
1340 |
f := changedObject value. |
|
1341 |
labelWidget font:f. |
|
1342 |
label := f isNil ifTrue:[ |
|
1343 |
'' |
|
1344 |
] ifFalse:[ |
|
1345 |
f userFriendlyName |
|
1346 |
]. |
|
1347 |
fontNameHolder value:label. |
|
1348 |
self updateModifiedChannel |
|
1349 |
! ! |
|
1350 |
||
1351 |
!FontSettingsApplication methodsFor:'help'! |
|
1352 |
||
1353 |
helpFilename |
|
1354 |
^ 'Launcher/fontSettings.html' |
|
1355 |
! ! |
|
1356 |
||
1357 |
!FontSettingsApplication methodsFor:'initialization & release'! |
|
1358 |
||
1359 |
postBuildAllFontLabel:aWidget |
|
1360 |
||
1361 |
allLabel := aWidget. |
|
1362 |
! |
|
1363 |
||
1364 |
postBuildButtonsFontLabel:aWidget |
|
1365 |
||
1366 |
buttonsLabel := aWidget. |
|
1367 |
! |
|
1368 |
||
14569
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1369 |
postBuildHelpLabel:aWidget |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1370 |
aWidget level:0. |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1371 |
aWidget scrolledView backgroundColor:self window viewBackground. |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1372 |
aWidget font:(Label defaultFont). |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1373 |
! |
9de61339e34d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14494
diff
changeset
|
1374 |
|
14205 | 1375 |
postBuildInputFieldFontLabel:aWidget |
1376 |
||
1377 |
inputFieldLabel := aWidget. |
|
1378 |
! |
|
1379 |
||
1380 |
postBuildLabelsFontLabel:aWidget |
|
1381 |
||
1382 |
labelLabel := aWidget. |
|
1383 |
! |
|
1384 |
||
1385 |
postBuildListsFontLabel:aWidget |
|
1386 |
||
1387 |
listsLabel := aWidget. |
|
1388 |
! |
|
1389 |
||
1390 |
postBuildMenuesFontLabel:aWidget |
|
1391 |
||
1392 |
menuLabel := aWidget. |
|
1393 |
! |
|
1394 |
||
1395 |
postBuildOtherFontLabel:aWidget |
|
1396 |
||
1397 |
otherLabel := aWidget. |
|
1398 |
! |
|
1399 |
||
1400 |
postBuildTextFontLabel:aWidget |
|
1401 |
||
1402 |
textLabel := aWidget. |
|
1403 |
! |
|
1404 |
||
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1405 |
postBuildTooltipFontLabel:aWidget |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1406 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1407 |
tooltipLabel := aWidget. |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1408 |
! |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1409 |
|
14205 | 1410 |
postBuildWith:aBuilder |
1411 |
"/ self readSettings. |
|
1412 |
self updateAllFontLabels. |
|
1413 |
super postBuildWith:aBuilder |
|
1414 |
! ! |
|
1415 |
||
1416 |
!FontSettingsApplication methodsFor:'queries'! |
|
1417 |
||
1418 |
hasUnsavedChanges |
|
1419 |
self otherDef value ~= View defaultFont ifTrue:[^ true]. |
|
1420 |
self labelDef value ~= Label defaultFont ifTrue:[^ true]. |
|
1421 |
self buttonDef value ~= Button defaultFont ifTrue:[^ true]. |
|
1422 |
self listDef value ~= SelectionInListView defaultFont ifTrue:[^ true]. |
|
1423 |
self menuDef value ~= MenuView defaultFont ifTrue:[^ true]. |
|
1424 |
self textDef value ~= TextView defaultFont ifTrue:[^ true]. |
|
1425 |
self inputFieldDef value ~= EditField defaultFont ifTrue:[^ true]. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
1426 |
self tooltipDef value ~= ActiveHelpView defaultFont ifTrue:[^ true]. |
14205 | 1427 |
|
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1428 |
(self hasChangedAspectIn: #(useXftFontsOnly) asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
14205 | 1429 |
|
1430 |
^ false |
|
1431 |
||
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1432 |
"Modified: / 20-04-2016 / 20:14:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14205 | 1433 |
! |
1434 |
||
1435 |
hasXftFonts |
|
16094 | 1436 |
^ self graphicsDevice supportsXftFonts |
14205 | 1437 |
! ! |
1438 |
||
1439 |
!FontSettingsApplication class methodsFor:'documentation'! |
|
1440 |
||
1441 |
version |
|
15887 | 1442 |
^ '$Header$' |
14205 | 1443 |
! |
1444 |
||
1445 |
version_CVS |
|
15887 | 1446 |
^ '$Header$' |
16301
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1447 |
! |
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1448 |
|
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1449 |
version_HG |
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1450 |
|
5b709afd8d92
Remove obsolete setting for #linuxFontWorkaround.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16293
diff
changeset
|
1451 |
^ '$Changeset: <not expanded> $' |
14205 | 1452 |
! ! |
1453 |