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