author | Stefan Vogel <sv@exept.de> |
Tue, 02 Feb 2016 18:48:02 +0100 | |
changeset 16094 | ea79b6e5a7fc |
parent 16080 | 91f72a42634b |
child 16097 | daad0a09e036 |
child 16289 | abe58442da28 |
permissions | -rw-r--r-- |
14205 | 1 |
"{ Package: 'stx:libtool' }" |
2 |
||
14213
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
3 |
"{ NameSpace: Tools }" |
ebed72d87fe8
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14205
diff
changeset
|
4 |
|
14205 | 5 |
AbstractSettingsApplication subclass:#FontSettingsApplication |
6 |
instanceVariableNames:'filter allOfThem labelDef buttonDef listDef menuDef textDef |
|
7 |
othersDef allFontLabelHolder buttonsFontLabelHolder |
|
8 |
textFontLabelHolder labelsFontLabelHolder listsFontLabelHolder |
|
9 |
menusFontLabelHolder otherFontLabelHolder allLabel buttonsLabel |
|
10 |
textLabel labelLabel listsLabel menuLabel inputFieldLabel |
|
11 |
inputFieldDef inputFieldFontLabelHolder otherLabel |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
12 |
linuxFontWorkaround otherDef tooltipDef tooltipFontLabelHolder |
15932 | 13 |
tooltipLabel useXftFontsOnly fontSizeSelectionHolder |
14 |
lookSelectionHolder' |
|
14205 | 15 |
classVariableNames:'' |
16 |
poolDictionaries:'' |
|
17 |
category:'Interface-Smalltalk' |
|
18 |
! |
|
19 |
||
20 |
||
21 |
!FontSettingsApplication class methodsFor:'instance creation'! |
|
22 |
||
23 |
fontForEncoding:encodingMatch |
|
24 |
||
25 |
| inst | |
|
26 |
||
27 |
inst := self new. |
|
28 |
inst encodingMatch:encodingMatch. |
|
29 |
self initialize. |
|
30 |
self open. |
|
31 |
! ! |
|
32 |
||
33 |
!FontSettingsApplication class methodsFor:'help specs'! |
|
34 |
||
35 |
flyByHelpSpec |
|
36 |
"This resource specification was automatically generated |
|
37 |
by the UIHelpTool of ST/X." |
|
38 |
||
39 |
"Do not manually edit this!! If it is corrupted, |
|
40 |
the UIHelpTool may not be able to read the specification." |
|
41 |
||
42 |
" |
|
43 |
UIHelpTool openOnClass:FontSettingsAppl |
|
44 |
" |
|
45 |
||
46 |
<resource: #help> |
|
47 |
||
48 |
^ super flyByHelpSpec addPairsFrom:#( |
|
49 |
||
15933 | 50 |
changeCodeFont |
51 |
'Open a font dialog to change the font used in code views only' |
|
52 |
||
53 |
changeInputFieldFont |
|
54 |
'Open a font dialog to change the font used in input fields only' |
|
55 |
||
56 |
changeLabelFont |
|
57 |
'Open a font dialog to change the font used in labels only' |
|
58 |
||
59 |
changeListFont |
|
60 |
'Open a font dialog to change the font used in lists only' |
|
61 |
||
62 |
changeMenuFont |
|
63 |
'Open a font dialog to change the font used in menus only' |
|
64 |
||
65 |
changeButtonFont |
|
66 |
'Open a font dialog to change the font used in buttons only' |
|
67 |
||
68 |
changeTooltipFont |
|
69 |
'Open a font dialog to change the font used in tooltips only' |
|
70 |
||
71 |
changeAllFont |
|
72 |
'Open a font dialog to change the font used in all views' |
|
73 |
||
14205 | 74 |
#resetToDefault |
75 |
'Reset fonts back to original default values (as specified in the window style-file and OS settings)' |
|
76 |
||
77 |
#changeToHighContrast |
|
15932 | 78 |
'Change settings for higher contrast.\Useful for presentations and outdor operation (bright sunlight)' |
79 |
||
80 |
#changeToNormalContrast |
|
81 |
'Change settings for normal contrast.' |
|
14205 | 82 |
|
83 |
#changeToBigFonts |
|
84 |
'Change settings for bigger fonts.\Useful for presentations' |
|
85 |
||
86 |
#changeToHugeFonts |
|
87 |
'Change settings for huge fonts.\Useful for presentations' |
|
88 |
||
15932 | 89 |
#changeToSmallFonts |
90 |
'Change settings for small fonts.\Useful on smaller screens (13 or 15 inch)' |
|
91 |
||
92 |
#changeToNormalFonts |
|
93 |
'Change settings for default font sizes.' |
|
94 |
||
14205 | 95 |
#changeToSTXLook |
96 |
'Change settings for an ST/X-like look with fixed-width code fonts' |
|
97 |
||
98 |
#changeToSTXLookXft |
|
99 |
'Change settings for an ST/X-like look with fixed-width code fonts).\Uses better looking Xft fonts if avaiable (XWindow only)' |
|
100 |
||
101 |
#changeToSqueakLook |
|
102 |
'Change settings for a Squeak-like look with variable code fonts' |
|
103 |
||
104 |
#changeToVisualAgeLook |
|
105 |
'Change settings for a VisualAge-like look with bold variable code fonts' |
|
15933 | 106 |
|
107 |
#useXftFontsOnly |
|
108 |
'Don''t try to use and don''t offer non-Xft fonts in font selection dialogs (XWindow only)' |
|
14205 | 109 |
) |
110 |
||
111 |
"Created: / 17-03-2012 / 11:37:51 / cg" |
|
112 |
! ! |
|
113 |
||
114 |
!FontSettingsApplication class methodsFor:'image specs'! |
|
115 |
||
116 |
defaultIcon |
|
117 |
<resource: #programImage> |
|
118 |
||
119 |
^ ToolbarIconLibrary fontIcon |
|
120 |
! |
|
121 |
||
122 |
defaultIcon2 |
|
14417
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
123 |
<resource: #image> |
14205 | 124 |
"This resource specification was automatically generated |
125 |
by the ImageEditor of ST/X." |
|
126 |
"Do not manually edit this!! If it is corrupted, |
|
127 |
the ImageEditor may not be able to read the specification." |
|
128 |
" |
|
129 |
self defaultIcon2 inspect |
|
130 |
ImageEditor openOnClass:self andSelector:#defaultIcon2 |
|
14417
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
131 |
Icon flushCachedIcons" |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
132 |
|
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
133 |
^ Icon constantNamed:#'FontSettingsAppl class defaultIcon2' |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
134 |
ifAbsentPut:[ |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
135 |
(Depth4Image new) |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
136 |
width:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
137 |
height:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
138 |
photometric:(#palette); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
139 |
bitsPerSample:(#( 4 )); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
140 |
samplesPerPixel:(1); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
141 |
bits:(ByteArray |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
142 |
fromPackedString:' |
14205 | 143 |
@@@@@@@@@@@@@@@@@@@@@!!X @@@@@@@!!X @@@6H@@@@@@DP6H@@@Y!!H@@@@@QDY"@@@BY"@@@@ADQBY"@@@FX @@@@@DQCX @@@6H@@@@@QEP6H@@@@ @@@@ |
144 |
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
|
145 |
P @@@@@@@@@@@DQ@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b'); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
146 |
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
|
147 |
mask:((ImageMask new) |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
148 |
width:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
149 |
height:22; |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
150 |
bits:(ByteArray |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
151 |
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
|
152 |
yourself); |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
153 |
yourself |
2e0d40de0740
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
14319
diff
changeset
|
154 |
] |
14205 | 155 |
! ! |
156 |
||
157 |
!FontSettingsApplication class methodsFor:'interface specs'! |
|
158 |
||
159 |
windowSpec |
|
160 |
"This resource specification was automatically generated |
|
161 |
by the UIPainter of ST/X." |
|
162 |
||
163 |
"Do not manually edit this!! If it is corrupted, |
|
164 |
the UIPainter may not be able to read the specification." |
|
165 |
||
166 |
" |
|
14319
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
167 |
UIPainter new openOnClass:Tools::FontSettingsApplication andSelector:#windowSpec |
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
168 |
Tools::FontSettingsApplication new openInterface:#windowSpec |
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
169 |
Tools::FontSettingsApplication open |
14205 | 170 |
" |
171 |
||
172 |
<resource: #canvas> |
|
173 |
||
174 |
^ |
|
175 |
#(FullSpec |
|
176 |
name: windowSpec |
|
177 |
window: |
|
178 |
(WindowSpec |
|
179 |
label: 'Font Settings' |
|
180 |
name: 'Font Settings' |
|
14319
a84b4a0c15ca
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14213
diff
changeset
|
181 |
flags: 1 |
14205 | 182 |
min: (Point 10 10) |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
183 |
bounds: (Rectangle 0 0 643 810) |
14205 | 184 |
) |
185 |
component: |
|
186 |
(SpecCollection |
|
187 |
collection: ( |
|
188 |
(VerticalPanelViewSpec |
|
189 |
name: 'VerticalPanel1' |
|
190 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
191 |
horizontalLayout: fitSpace |
|
192 |
verticalLayout: topSpace |
|
193 |
horizontalSpace: 3 |
|
194 |
verticalSpace: 3 |
|
195 |
component: |
|
196 |
(SpecCollection |
|
197 |
collection: ( |
|
198 |
(TextEditorSpec |
|
199 |
name: 'TextEditor1' |
|
200 |
style: labelFont |
|
201 |
model: infoText |
|
202 |
hasHorizontalScrollBar: true |
|
203 |
hasVerticalScrollBar: true |
|
204 |
miniScrollerHorizontal: true |
|
205 |
miniScrollerVertical: true |
|
206 |
isReadOnly: true |
|
207 |
hasKeyboardFocusInitially: false |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
208 |
extent: (Point 637 132) |
15887 | 209 |
postBuildCallback: postBuildHelpLabel: |
14205 | 210 |
viewClassName: 'ListView' |
15887 | 211 |
) |
212 |
(DividerSpec |
|
213 |
name: 'Separator14' |
|
214 |
extent: (Point 637 4) |
|
14205 | 215 |
) |
216 |
(ViewSpec |
|
217 |
name: 'CodeBox' |
|
218 |
component: |
|
219 |
(SpecCollection |
|
220 |
collection: ( |
|
221 |
(LabelSpec |
|
222 |
label: 'Code' |
|
223 |
name: 'Label1' |
|
224 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
225 |
translateLabel: true |
|
226 |
adjust: left |
|
227 |
) |
|
15887 | 228 |
(ActionButtonSpec |
229 |
label: 'Change...' |
|
230 |
name: 'Button1' |
|
15933 | 231 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 232 |
translateLabel: true |
233 |
tabable: true |
|
234 |
model: changeTextFont |
|
15933 | 235 |
activeHelpKey: changeCodeFont |
15887 | 236 |
) |
14205 | 237 |
(LabelSpec |
238 |
label: 'Text Font' |
|
239 |
name: 'Label2' |
|
15933 | 240 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 241 |
translateLabel: true |
242 |
labelChannel: textFontLabelHolder |
|
243 |
adjust: left |
|
244 |
postBuildCallback: postBuildTextFontLabel: |
|
245 |
) |
|
246 |
) |
|
247 |
||
248 |
) |
|
15887 | 249 |
extent: (Point 637 45) |
14205 | 250 |
) |
251 |
(ViewSpec |
|
252 |
name: 'InputFieldsBox' |
|
253 |
component: |
|
254 |
(SpecCollection |
|
255 |
collection: ( |
|
256 |
(LabelSpec |
|
257 |
label: 'Input Fields' |
|
258 |
name: 'Input Fields' |
|
259 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
260 |
translateLabel: true |
|
261 |
adjust: left |
|
262 |
) |
|
15887 | 263 |
(ActionButtonSpec |
264 |
label: 'Change...' |
|
265 |
name: 'ChangeText' |
|
15933 | 266 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 267 |
translateLabel: true |
268 |
tabable: true |
|
269 |
model: changeInputFieldFont |
|
15933 | 270 |
activeHelpKey: changeInputFieldFont |
15887 | 271 |
) |
14205 | 272 |
(LabelSpec |
273 |
label: 'InputFields Font' |
|
274 |
name: 'InputFieldsFont' |
|
15933 | 275 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 276 |
translateLabel: true |
277 |
labelChannel: inputFieldFontLabelHolder |
|
278 |
adjust: left |
|
279 |
postBuildCallback: postBuildInputFieldFontLabel: |
|
280 |
) |
|
281 |
) |
|
282 |
||
283 |
) |
|
15887 | 284 |
extent: (Point 637 45) |
14205 | 285 |
) |
286 |
(ViewSpec |
|
287 |
name: 'ListsBox' |
|
288 |
component: |
|
289 |
(SpecCollection |
|
290 |
collection: ( |
|
291 |
(LabelSpec |
|
292 |
label: 'Lists' |
|
293 |
name: 'Lists' |
|
294 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
295 |
translateLabel: true |
|
296 |
adjust: left |
|
297 |
) |
|
15887 | 298 |
(ActionButtonSpec |
299 |
label: 'Change...' |
|
300 |
name: 'ChangeLists' |
|
15933 | 301 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 302 |
translateLabel: true |
303 |
tabable: true |
|
304 |
model: changeListsFont |
|
15933 | 305 |
activeHelpKey: changeListFont |
15887 | 306 |
) |
14205 | 307 |
(LabelSpec |
308 |
label: 'Lists Font' |
|
309 |
name: 'ListsFont' |
|
15933 | 310 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 311 |
translateLabel: true |
312 |
labelChannel: listsFontLabelHolder |
|
313 |
adjust: left |
|
314 |
postBuildCallback: postBuildListsFontLabel: |
|
315 |
) |
|
316 |
) |
|
317 |
||
318 |
) |
|
15887 | 319 |
extent: (Point 637 45) |
14205 | 320 |
) |
321 |
(ViewSpec |
|
322 |
name: 'MenusBox' |
|
323 |
component: |
|
324 |
(SpecCollection |
|
325 |
collection: ( |
|
326 |
(LabelSpec |
|
327 |
label: 'Menus' |
|
328 |
name: 'Menus' |
|
329 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
330 |
translateLabel: true |
|
331 |
adjust: left |
|
332 |
) |
|
15887 | 333 |
(ActionButtonSpec |
334 |
label: 'Change...' |
|
335 |
name: 'ChangeMenus' |
|
15933 | 336 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 337 |
translateLabel: true |
338 |
tabable: true |
|
15933 | 339 |
activeHelpKey: changeMenuFont |
15887 | 340 |
model: changeMenusFont |
341 |
) |
|
14205 | 342 |
(LabelSpec |
343 |
label: 'Menus Font' |
|
344 |
name: 'MenusFont' |
|
15933 | 345 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 346 |
translateLabel: true |
347 |
labelChannel: menusFontLabelHolder |
|
348 |
adjust: left |
|
349 |
postBuildCallback: postBuildMenuesFontLabel: |
|
350 |
) |
|
351 |
) |
|
352 |
||
353 |
) |
|
15887 | 354 |
extent: (Point 637 45) |
14205 | 355 |
) |
356 |
(ViewSpec |
|
357 |
name: 'LabelsBox' |
|
358 |
component: |
|
359 |
(SpecCollection |
|
360 |
collection: ( |
|
361 |
(LabelSpec |
|
362 |
label: 'Labels' |
|
363 |
name: 'Labels' |
|
364 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
365 |
translateLabel: true |
|
366 |
adjust: left |
|
367 |
) |
|
15887 | 368 |
(ActionButtonSpec |
369 |
label: 'Change...' |
|
370 |
name: 'ChangeLabels' |
|
15933 | 371 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 372 |
translateLabel: true |
373 |
tabable: true |
|
15933 | 374 |
activeHelpKey: changeLabelFont |
15887 | 375 |
model: changeLabelsFont |
376 |
) |
|
14205 | 377 |
(LabelSpec |
378 |
label: 'Labels' |
|
379 |
name: 'LabelsFont' |
|
15933 | 380 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 381 |
translateLabel: true |
382 |
labelChannel: labelsFontLabelHolder |
|
383 |
adjust: left |
|
384 |
postBuildCallback: postBuildLabelsFontLabel: |
|
385 |
) |
|
386 |
) |
|
387 |
||
388 |
) |
|
15887 | 389 |
extent: (Point 637 45) |
14205 | 390 |
) |
391 |
(ViewSpec |
|
392 |
name: 'ButtonsBox' |
|
393 |
component: |
|
394 |
(SpecCollection |
|
395 |
collection: ( |
|
396 |
(LabelSpec |
|
397 |
label: 'Buttons' |
|
398 |
name: 'Buttons' |
|
399 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
400 |
translateLabel: true |
|
401 |
adjust: left |
|
402 |
) |
|
15887 | 403 |
(ActionButtonSpec |
404 |
label: 'Change...' |
|
405 |
name: 'Change Buttons' |
|
15933 | 406 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 407 |
translateLabel: true |
408 |
tabable: true |
|
15933 | 409 |
activeHelpKey: changeButtonFont |
15887 | 410 |
model: changeButtonsFont |
411 |
) |
|
14205 | 412 |
(LabelSpec |
413 |
label: 'Buttons Font' |
|
414 |
name: 'ButtonsFont' |
|
15933 | 415 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 416 |
translateLabel: true |
417 |
labelChannel: buttonsFontLabelHolder |
|
418 |
adjust: left |
|
419 |
postBuildCallback: postBuildButtonsFontLabel: |
|
420 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
421 |
) |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
422 |
|
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
423 |
) |
15887 | 424 |
extent: (Point 637 45) |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
425 |
) |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
426 |
(ViewSpec |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
427 |
name: 'ToolTipsBox' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
428 |
component: |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
429 |
(SpecCollection |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
430 |
collection: ( |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
431 |
(LabelSpec |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
432 |
label: 'Tooltips' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
433 |
name: 'Label7' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
434 |
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
|
435 |
translateLabel: true |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
436 |
adjust: left |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
437 |
) |
15887 | 438 |
(ActionButtonSpec |
439 |
label: 'Change...' |
|
440 |
name: 'Button11' |
|
15933 | 441 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 442 |
translateLabel: true |
443 |
tabable: true |
|
15933 | 444 |
activeHelpKey: changeTooltipFont |
15887 | 445 |
model: changeTooltipFont |
446 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
447 |
(LabelSpec |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
448 |
label: 'Label' |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
449 |
name: 'Label8' |
15933 | 450 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
451 |
translateLabel: true |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
452 |
labelChannel: tooltipFontLabelHolder |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
453 |
adjust: left |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
454 |
postBuildCallback: postBuildTooltipFontLabel: |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
455 |
) |
14205 | 456 |
) |
457 |
||
458 |
) |
|
15887 | 459 |
extent: (Point 637 45) |
14205 | 460 |
) |
461 |
(ViewSpec |
|
462 |
name: 'OtherBox' |
|
463 |
component: |
|
464 |
(SpecCollection |
|
465 |
collection: ( |
|
466 |
(LabelSpec |
|
467 |
label: 'All Others' |
|
468 |
name: 'Label5' |
|
469 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 20 0) |
|
470 |
translateLabel: true |
|
471 |
adjust: left |
|
472 |
) |
|
15887 | 473 |
(ActionButtonSpec |
474 |
label: 'Change...' |
|
475 |
name: 'Button9' |
|
15933 | 476 |
layout: (LayoutFrame 100 0.0 15 0 205 0 37 0) |
15887 | 477 |
translateLabel: true |
478 |
tabable: true |
|
479 |
model: changeOtherFont |
|
480 |
) |
|
14205 | 481 |
(LabelSpec |
482 |
label: 'Label' |
|
483 |
name: 'Label6' |
|
15933 | 484 |
layout: (LayoutFrame 210 0 15 0 -2 1 37 0) |
14205 | 485 |
translateLabel: true |
486 |
labelChannel: otherFontLabelHolder |
|
487 |
adjust: left |
|
488 |
postBuildCallback: postBuildOtherFontLabel: |
|
15933 | 489 |
activeHelpKey: changeOtherFont |
14205 | 490 |
) |
491 |
(DividerSpec |
|
492 |
name: 'Separator13' |
|
493 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
494 |
) |
|
495 |
) |
|
496 |
||
497 |
) |
|
15887 | 498 |
extent: (Point 637 45) |
14205 | 499 |
) |
500 |
(ViewSpec |
|
501 |
name: 'AllBox' |
|
502 |
component: |
|
503 |
(SpecCollection |
|
504 |
collection: ( |
|
505 |
(LabelSpec |
|
506 |
label: 'All' |
|
507 |
name: 'All' |
|
15887 | 508 |
layout: (LayoutFrame 0 0.0 4 0 0 1.0 24 0) |
14205 | 509 |
translateLabel: true |
510 |
adjust: left |
|
511 |
) |
|
512 |
(ActionButtonSpec |
|
513 |
label: 'Change...' |
|
514 |
name: 'ChangeAll' |
|
15887 | 515 |
layout: (LayoutFrame 100 0.0 11 0 205 0 33 0) |
14205 | 516 |
translateLabel: true |
517 |
tabable: true |
|
15933 | 518 |
activeHelpKey: changeAllFont |
14205 | 519 |
model: changeAllFont |
520 |
) |
|
521 |
(DividerSpec |
|
522 |
name: 'Separator1' |
|
523 |
layout: (LayoutFrame 0 0.0 -3 1 0 1.0 0 1) |
|
524 |
) |
|
525 |
) |
|
526 |
||
527 |
) |
|
15887 | 528 |
extent: (Point 637 45) |
14205 | 529 |
) |
530 |
(CheckBoxSpec |
|
531 |
label: 'Linux font workaround: do not reset fonts on snapshot restart' |
|
532 |
name: 'LinuxFontWorkaroundBox' |
|
533 |
visibilityChannel: linuxFontWorkaroundVisible |
|
534 |
model: linuxFontWorkaround |
|
535 |
translateLabel: true |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
536 |
extent: (Point 637 30) |
14205 | 537 |
) |
15887 | 538 |
(CheckBoxSpec |
539 |
label: 'Only Use Xft Fonts (Unix Only)' |
|
540 |
name: 'CheckBox1' |
|
15932 | 541 |
activeHelpKey: useXftFontsOnly |
15887 | 542 |
visibilityChannel: useXftFontsOnlyVisible |
543 |
model: useXftFontsOnly |
|
544 |
translateLabel: true |
|
545 |
extent: (Point 637 30) |
|
546 |
) |
|
14205 | 547 |
(DividerSpec |
548 |
name: 'Separator12' |
|
549 |
visibilityChannel: linuxFontWorkaroundVisible |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
550 |
extent: (Point 637 3) |
14205 | 551 |
) |
552 |
(ViewSpec |
|
553 |
name: 'SpecialsBox' |
|
554 |
component: |
|
555 |
(SpecCollection |
|
556 |
collection: ( |
|
557 |
(ActionButtonSpec |
|
558 |
label: 'Default' |
|
559 |
name: 'Button2' |
|
15887 | 560 |
layout: (LayoutFrame 0 0.0 13 0 130 0 35 0) |
14205 | 561 |
activeHelpKey: resetToDefault |
562 |
translateLabel: true |
|
563 |
tabable: true |
|
564 |
model: changeToDefault |
|
565 |
) |
|
15932 | 566 |
(LabelSpec |
567 |
label: 'Font Size:' |
|
568 |
name: 'Label9' |
|
569 |
layout: (LayoutFrame 148 0.0 13 0 298 0 35 0) |
|
570 |
translateLabel: true |
|
571 |
adjust: left |
|
572 |
) |
|
573 |
(ComboListSpec |
|
574 |
name: 'ComboList1' |
|
575 |
layout: (LayoutFrame 256 0 13 0 0 1 35 0) |
|
576 |
model: fontSizeSelectionHolder |
|
577 |
comboList: fontSizeListLabels |
|
578 |
useIndex: true |
|
579 |
) |
|
14205 | 580 |
(ActionButtonSpec |
581 |
label: 'High Contrast' |
|
15932 | 582 |
name: 'Button13' |
583 |
layout: (LayoutFrame 256 0.0 77 0 386 0 99 0) |
|
14205 | 584 |
activeHelpKey: changeToHighContrast |
585 |
translateLabel: true |
|
586 |
tabable: true |
|
587 |
model: changeToHighContrast |
|
588 |
) |
|
15932 | 589 |
(LabelSpec |
590 |
label: 'Look:' |
|
591 |
name: 'Label10' |
|
15887 | 592 |
layout: (LayoutFrame 148 0.0 45 0 298 0 67 0) |
14205 | 593 |
translateLabel: true |
15932 | 594 |
adjust: left |
14205 | 595 |
) |
15932 | 596 |
(ComboListSpec |
597 |
name: 'ComboList2' |
|
598 |
layout: (LayoutFrame 256 0 45 0 0 1 67 0) |
|
599 |
model: lookSelectionHolder |
|
600 |
comboList: lookListLabels |
|
601 |
useIndex: true |
|
14205 | 602 |
) |
603 |
(ActionButtonSpec |
|
15932 | 604 |
label: 'Use Xft Fonts' |
14205 | 605 |
name: 'Button10' |
15932 | 606 |
layout: (LayoutFrame 0 0.0 77 0 130 0 99 0) |
14205 | 607 |
activeHelpKey: changeToSTXLookXft |
608 |
translateLabel: true |
|
609 |
tabable: true |
|
15932 | 610 |
model: changeToUseXft |
14205 | 611 |
enableChannel: hasXftFonts |
612 |
) |
|
15932 | 613 |
(ActionButtonSpec |
614 |
label: 'Normal Contrast' |
|
615 |
name: 'Button14' |
|
616 |
layout: (LayoutFrame 400 0.0 77 0 530 0 99 0) |
|
617 |
activeHelpKey: changeToNormalContrast |
|
618 |
translateLabel: true |
|
619 |
tabable: true |
|
620 |
model: changeToNormalContrast |
|
621 |
) |
|
14205 | 622 |
) |
623 |
||
624 |
) |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
625 |
extent: (Point 637 124) |
14205 | 626 |
) |
627 |
) |
|
628 |
||
629 |
) |
|
630 |
) |
|
631 |
) |
|
632 |
||
633 |
) |
|
634 |
) |
|
635 |
! ! |
|
636 |
||
637 |
!FontSettingsApplication methodsFor:'accessing'! |
|
638 |
||
639 |
encodingMatch:aEncodingMatch |
|
640 |
||
641 |
aEncodingMatch notNil ifTrue:[ |
|
642 |
filter := [:f | f encoding notNil |
|
643 |
and:[aEncodingMatch match:f encoding]]. |
|
644 |
]. |
|
645 |
! ! |
|
646 |
||
647 |
!FontSettingsApplication methodsFor:'actions'! |
|
648 |
||
649 |
basicReadFontSettings |
|
15932 | 650 |
|prefs readFont sz lookIdx idx| |
15887 | 651 |
|
652 |
self useXftFontsOnly value:(UserPreferences current useXftFontsOnly). |
|
653 |
||
654 |
prefs := UserPreferences current fontPreferences. |
|
655 |
prefs isNil ifTrue:[ |
|
656 |
prefs := Dictionary new. |
|
657 |
]. |
|
658 |
||
659 |
readFont := |
|
660 |
[:key :default | |
|
661 |
|s fn| |
|
662 |
||
663 |
s := prefs at:key ifAbsent:nil. |
|
664 |
s notNil ifTrue:[ |
|
15892 | 665 |
fn := Object readFrom:s. |
15887 | 666 |
self useXftFontsOnly value ifTrue:[ |
667 |
fn := XftFontDescription for:fn |
|
668 |
]. |
|
669 |
]. |
|
670 |
fn isNil ifTrue:[ |
|
671 |
fn := default. |
|
672 |
]. |
|
673 |
fn |
|
674 |
]. |
|
675 |
||
15933 | 676 |
self allOfThem value:View defaultFont. |
677 |
self otherDef value:(readFont value:#Other value:View defaultFont). |
|
15887 | 678 |
self labelDef value:(readFont value:#Label value:Label defaultFont). |
679 |
self buttonDef value:(readFont value:#Button value:Button defaultFont). |
|
680 |
self listDef value:(readFont value:#List value:SelectionInListView defaultFont). |
|
681 |
self menuDef value:(readFont value:#Menu value:MenuView defaultFont). |
|
682 |
self textDef value:(readFont value:#Text value:TextView defaultFont). |
|
683 |
self inputFieldDef value:(readFont value:#InputField value:EditField defaultFont). |
|
684 |
self tooltipDef value:(readFont value:#Tooltip value:ActiveHelpView defaultFont). |
|
14205 | 685 |
|
15932 | 686 |
sz := TextView defaultFont size. |
687 |
idx := self fontSizeListValues indexOf:sz. |
|
688 |
idx ~~ 0 ifTrue:[ |
|
15933 | 689 |
self fontSizeSelectionHolder value:idx withoutNotifying:self. |
15932 | 690 |
]. |
691 |
||
692 |
lookIdx := nil. |
|
693 |
(TextView defaultFont face = 'bold') ifTrue:[ |
|
694 |
lookIdx := (self lookListValues indexOf:#vage). |
|
695 |
] ifFalse:[ |
|
696 |
(TextView defaultFont isFixedWidth) ifTrue:[ |
|
697 |
lookIdx := (self lookListValues indexOf:#stx). |
|
698 |
] ifFalse:[ |
|
699 |
lookIdx := (self lookListValues indexOf:#squeak). |
|
700 |
]. |
|
701 |
]. |
|
15933 | 702 |
self lookSelectionHolder value:lookIdx withoutNotifying:self |
15932 | 703 |
|
14205 | 704 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
705 |
"Created: / 06-02-2012 / 12:22:39 / cg" |
|
706 |
! |
|
707 |
||
708 |
basicReadSettings |
|
709 |
self basicReadFontSettings. |
|
710 |
||
711 |
self readAspects: #(linuxFontWorkaround) from: currentUserPrefs |
|
712 |
||
713 |
"Modified: / 10-10-2011 / 12:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
714 |
"Modified: / 06-02-2012 / 12:22:51 / cg" |
|
715 |
! |
|
716 |
||
717 |
basicSaveSettings |
|
718 |
|fn| |
|
719 |
||
15887 | 720 |
self writeAspects: #(linuxFontWorkaround useXftFontsOnly) to: currentUserPrefs. |
14205 | 721 |
|
15887 | 722 |
UserPreferences current fontPreferences: |
723 |
( |
|
724 |
Dictionary new |
|
725 |
at:#Other put:(self otherDef value storeString); |
|
726 |
at:#Label put:(self labelDef value storeString); |
|
727 |
at:#Button put:(self buttonDef value storeString); |
|
728 |
at:#Text put:(self textDef value storeString); |
|
729 |
at:#InputField put:(self inputFieldDef value storeString); |
|
730 |
at:#List put:(self listDef value storeString); |
|
731 |
at:#Tooltip put:(self tooltipDef value storeString); |
|
732 |
at:#Menu put:(self menuDef value storeString); |
|
733 |
yourself |
|
734 |
). |
|
735 |
||
736 |
"/ fn := self otherDef value. |
|
737 |
"/ SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
738 |
"/ |
|
739 |
"/ fn := self labelDef value. |
|
740 |
"/ Label defaultFont:fn. |
|
741 |
"/ CheckBox defaultFont:fn. |
|
742 |
"/ |
|
743 |
"/ fn := self buttonDef value. |
|
744 |
"/ Button defaultFont:fn. |
|
745 |
"/ Toggle defaultFont:fn. |
|
746 |
"/ |
|
747 |
"/ fn := self textDef value. |
|
748 |
"/ TextView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
749 |
"/ |
|
750 |
"/ fn := self inputFieldDef value. |
|
751 |
"/ EditField withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
752 |
"/ |
|
753 |
"/ fn := self listDef value. |
|
754 |
"/ SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
755 |
"/ |
|
756 |
"/ fn := self tooltipDef value. |
|
757 |
"/ ActiveHelpView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
|
758 |
"/ |
|
759 |
"/ fn := self menuDef value. |
|
760 |
"/ ListView defaultFont:fn. |
|
761 |
"/ MenuView defaultFont:fn. |
|
762 |
"/ MenuPanel defaultFont:fn. |
|
763 |
"/ NoteBookView defaultFont:fn. |
|
764 |
"/ PullDownMenu defaultFont:fn. |
|
14494
680379a3dbef
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14491
diff
changeset
|
765 |
|
680379a3dbef
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14491
diff
changeset
|
766 |
DebugView newDebugger. |
14205 | 767 |
|
768 |
"Modified: / 10-10-2011 / 12:15:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
769 |
! |
|
770 |
||
771 |
changeAllFont |
|
772 |
|f| |
|
773 |
||
774 |
self withWaitCursorDo:[ |
|
775 |
f := FontPanel |
|
776 |
fontFromUserInitial:(self allOfThem value) |
|
777 |
title:(resources string:'Font for %1' with:'All') |
|
778 |
filter:filter. |
|
779 |
]. |
|
780 |
f notNil ifTrue:[ |
|
781 |
"/ self allOfThem value:(f onDevice:allLabel device). |
|
782 |
self otherDef value:(f onDevice:otherLabel device). |
|
783 |
self labelDef value:(f onDevice:labelLabel device). |
|
784 |
self buttonDef value:(f onDevice:buttonsLabel device). |
|
785 |
self listDef value:(f onDevice:listsLabel device). |
|
786 |
self menuDef value:(f onDevice:menuLabel device). |
|
787 |
self textDef value:(f onDevice:textLabel device). |
|
788 |
self inputFieldDef value:(f onDevice:inputFieldLabel device). |
|
16080 | 789 |
self tooltipDef value:(f onDevice:tooltipLabel device). |
14205 | 790 |
] |
791 |
! |
|
792 |
||
793 |
changeButtonsFont |
|
794 |
self changeFontFor:self buttonDef labelTitle:'Buttons'. |
|
795 |
! |
|
796 |
||
797 |
changeFontFor:aHolder labelTitle:labelTitle |
|
798 |
|f | |
|
799 |
||
800 |
self withWaitCursorDo:[ |
|
801 |
f := FontPanel |
|
802 |
fontFromUserInitial:(aHolder value) |
|
803 |
title:(resources string:'Font for %1' with:labelTitle) |
|
804 |
filter:filter. |
|
805 |
]. |
|
806 |
f notNil ifTrue:[ |
|
807 |
aHolder value:(f onDevice:self graphicsDevice). |
|
808 |
]. |
|
809 |
! |
|
810 |
||
811 |
changeInputFieldFont |
|
812 |
self changeFontFor:self inputFieldDef labelTitle:'Input Fields'. |
|
813 |
! |
|
814 |
||
815 |
changeLabelsFont |
|
816 |
self changeFontFor:self labelDef labelTitle:'Labels'. |
|
817 |
! |
|
818 |
||
819 |
changeListsFont |
|
820 |
self changeFontFor:self listDef labelTitle:'Lists'. |
|
821 |
! |
|
822 |
||
823 |
changeMenusFont |
|
824 |
self changeFontFor:self menuDef labelTitle:'Menus'. |
|
825 |
! |
|
826 |
||
827 |
changeOtherFont |
|
828 |
self changeFontFor:self otherDef labelTitle:'All Others'. |
|
829 |
! |
|
830 |
||
831 |
changeTextFont |
|
832 |
self changeFontFor:self textDef labelTitle:'Edited Text'. |
|
14658
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
833 |
! |
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 |
changeTooltipFont |
755e0402b60d
class: Tools::FontSettingsApplication
Claus Gittinger <cg@exept.de>
parents:
14618
diff
changeset
|
836 |
self changeFontFor:self tooltipDef labelTitle:'Tooltops'. |
15932 | 837 |
! |
838 |
||
839 |
fontSizeSelectionChanged |
|
840 |
|idx sz| |
|
841 |
||
842 |
idx := self fontSizeSelectionHolder value. |
|
843 |
sz := self fontSizeListValues at:idx ifAbsent:nil. |
|
844 |
sz notNil ifTrue:[ |
|
845 |
self changeToFontsWithSize:sz |
|
846 |
]. |
|
847 |
! |
|
848 |
||
849 |
lookSelectionChanged |
|
850 |
|idx look| |
|
851 |
||
852 |
idx := self lookSelectionHolder value. |
|
853 |
look := self lookListValues at:idx ifAbsent:nil. |
|
854 |
look notNil ifTrue:[ |
|
855 |
look == #stx ifTrue:[ |
|
856 |
self changeToSTXLook |
|
857 |
] ifFalse:[ |
|
858 |
look == #squeak ifTrue:[ |
|
859 |
self changeToSqueakLook |
|
860 |
] ifFalse:[ |
|
861 |
look == #vage ifTrue:[ |
|
862 |
self changeToVisualAgeLook |
|
863 |
] |
|
864 |
] |
|
865 |
]. |
|
866 |
]. |
|
14205 | 867 |
! ! |
868 |
||
869 |
!FontSettingsApplication methodsFor:'actions-common looks'! |
|
870 |
||
871 |
changeToBigFonts |
|
15932 | 872 |
self changeToFontsWithSize:16 |
14205 | 873 |
! |
874 |
||
875 |
changeToDefault |
|
876 |
"/View readStyleSheetAndUpdateAllStyleCaches. |
|
877 |
View updateAllStyleCaches. |
|
878 |
self basicReadFontSettings. |
|
879 |
||
880 |
"Created: / 06-02-2012 / 12:06:00 / cg" |
|
881 |
! |
|
882 |
||
883 |
changeToFix:fixFont variable:variableFont |
|
884 |
self textDef value:fixFont. |
|
885 |
self inputFieldDef value:fixFont. |
|
886 |
||
887 |
self menuDef value:variableFont. |
|
888 |
self listDef value:variableFont. |
|
889 |
self labelDef value:variableFont. |
|
890 |
self buttonDef value:variableFont. |
|
891 |
self otherDef value:variableFont. |
|
16080 | 892 |
self tooltipDef value:variableFont. |
14205 | 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 |
||
16094 | 972 |
self hasXftFonts ifFalse:[ |
14205 | 973 |
self changeToSTXLook. |
974 |
^ self. |
|
975 |
]. |
|
976 |
||
16094 | 977 |
fixFont := XftFontDescription family:'Courier' face:'regular' style:'roman' size:(TextView defaultFont size). |
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 |
||
16094 | 999 |
self hasXftFonts ifFalse:[ |
15932 | 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 |
||
16094 | 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). |
|
15932 | 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. |
|
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 |
|
15887 | 1428 |
(self hasChangedAspectIn: #(linuxFontWorkaround useXftFontsOnly) asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
14205 | 1429 |
|
1430 |
^ false |
|
1431 |
||
1432 |
"Modified: / 10-10-2011 / 12:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
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$' |
14205 | 1447 |
! ! |
1448 |