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