Skip to content

Commit 409f316

Browse files
committed
Added GUI scaling in preference panel.
1 parent 08ad600 commit 409f316

File tree

5 files changed

+392
-247
lines changed

5 files changed

+392
-247
lines changed

app/src/cc/arduino/view/preferences/Preferences.form

+71-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22

3-
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
3+
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
44
<NonVisualComponents>
55
<Component class="javax.swing.ButtonGroup" name="proxyTypeButtonGroup">
66
</Component>
@@ -42,7 +42,7 @@
4242
</DimensionLayout>
4343
<DimensionLayout dim="1">
4444
<Group type="103" groupAlignment="0" attributes="0">
45-
<EmptySpace min="0" pref="610" max="32767" attributes="0"/>
45+
<EmptySpace min="0" pref="637" max="32767" attributes="0"/>
4646
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
4747
<Component id="jPanel2" alignment="0" max="32767" attributes="0"/>
4848
</Group>
@@ -94,29 +94,43 @@
9494
<EmptySpace max="-2" attributes="0"/>
9595
<Group type="103" groupAlignment="0" attributes="0">
9696
<Group type="102" attributes="0">
97-
<Component id="sketchbookLocationField" max="32767" attributes="0"/>
97+
<Component id="sketchbookLocationField" pref="553" max="32767" attributes="0"/>
9898
<EmptySpace max="-2" attributes="0"/>
9999
<Component id="browseButton" min="-2" max="-2" attributes="0"/>
100100
</Group>
101101
<Component id="checkboxesContainer" max="32767" attributes="0"/>
102102
<Group type="102" attributes="0">
103103
<Group type="103" groupAlignment="0" attributes="0">
104104
<Group type="102" alignment="0" attributes="0">
105-
<Component id="comboWarningsLabel" min="-2" max="-2" attributes="0"/>
105+
<Group type="103" groupAlignment="0" attributes="0">
106+
<Component id="jLabel1" linkSize="1" min="-2" max="-2" attributes="0"/>
107+
<Component id="comboWarningsLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
108+
</Group>
106109
<EmptySpace max="-2" attributes="0"/>
107-
<Component id="comboWarnings" min="-2" max="-2" attributes="0"/>
110+
<Group type="103" groupAlignment="0" attributes="0">
111+
<Component id="comboWarnings" min="-2" max="-2" attributes="0"/>
112+
<Group type="102" alignment="0" attributes="0">
113+
<Component id="autoScaleCheckBox" min="-2" max="-2" attributes="0"/>
114+
<EmptySpace max="-2" attributes="0"/>
115+
<Component id="scaleSpinner" min="-2" max="-2" attributes="0"/>
116+
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
117+
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
118+
<EmptySpace max="-2" attributes="0"/>
119+
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
120+
</Group>
121+
</Group>
108122
</Group>
109123
<Group type="102" alignment="0" attributes="0">
110-
<Component id="showVerboseLabel" min="-2" max="-2" attributes="0"/>
124+
<Component id="showVerboseLabel" linkSize="1" min="-2" max="-2" attributes="0"/>
111125
<EmptySpace max="-2" attributes="0"/>
112126
<Component id="verboseCompilationBox" min="-2" max="-2" attributes="0"/>
113127
<EmptySpace max="-2" attributes="0"/>
114128
<Component id="verboseUploadBox" min="-2" max="-2" attributes="0"/>
115129
</Group>
116130
<Group type="102" alignment="0" attributes="0">
117131
<Group type="103" groupAlignment="0" attributes="0">
118-
<Component id="comboLanguageLabel" alignment="0" min="-2" max="-2" attributes="0"/>
119-
<Component id="fontSizeLabel" alignment="0" min="-2" max="-2" attributes="0"/>
132+
<Component id="comboLanguageLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
133+
<Component id="fontSizeLabel" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
120134
</Group>
121135
<EmptySpace max="-2" attributes="0"/>
122136
<Group type="103" groupAlignment="0" attributes="0">
@@ -169,12 +183,20 @@
169183
<Component id="fontSizeField" alignment="3" min="-2" max="-2" attributes="0"/>
170184
</Group>
171185
<EmptySpace max="-2" attributes="0"/>
186+
<Group type="103" groupAlignment="3" attributes="0">
187+
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
188+
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
189+
<Component id="scaleSpinner" alignment="3" min="-2" max="-2" attributes="0"/>
190+
<Component id="autoScaleCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
191+
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
192+
</Group>
193+
<EmptySpace max="-2" attributes="0"/>
172194
<Group type="103" groupAlignment="3" attributes="0">
173195
<Component id="showVerboseLabel" alignment="3" min="-2" max="-2" attributes="0"/>
174196
<Component id="verboseCompilationBox" alignment="3" min="-2" max="-2" attributes="0"/>
175197
<Component id="verboseUploadBox" alignment="3" min="-2" max="-2" attributes="0"/>
176198
</Group>
177-
<EmptySpace max="-2" attributes="0"/>
199+
<EmptySpace min="-2" max="-2" attributes="0"/>
178200
<Group type="103" groupAlignment="3" attributes="0">
179201
<Component id="comboWarningsLabel" alignment="3" min="-2" max="-2" attributes="0"/>
180202
<Component id="comboWarnings" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -342,7 +364,7 @@
342364
<Component class="javax.swing.JButton" name="extendedAdditionalUrlFieldWindow">
343365
<Properties>
344366
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
345-
<Connection code="new ImageIcon(Base.getThemeImage(&quot;newwindow.gif&quot;, this))" type="code"/>
367+
<Connection code="new ImageIcon(Theme.getThemeImage(&quot;newwindow&quot;, this, Theme.scale(16), Theme.scale(14)))" type="code"/>
346368
</Property>
347369
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
348370
<Insets value="[1, 1, 1, 1]"/>
@@ -460,6 +482,44 @@
460482
</Component>
461483
</SubComponents>
462484
</Container>
485+
<Component class="javax.swing.JLabel" name="jLabel1">
486+
<Properties>
487+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
488+
<Connection code="tr(&quot;Interface scale:&quot;)" type="code"/>
489+
</Property>
490+
</Properties>
491+
</Component>
492+
<Component class="javax.swing.JLabel" name="jLabel2">
493+
<Properties>
494+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
495+
<Connection code="tr(&quot; (requires restart of Arduino)&quot;)" type="code"/>
496+
</Property>
497+
</Properties>
498+
</Component>
499+
<Component class="javax.swing.JSpinner" name="scaleSpinner">
500+
<Properties>
501+
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
502+
<SpinnerModel initial="100" maximum="200" minimum="100" numberType="java.lang.Integer" stepSize="5" type="number"/>
503+
</Property>
504+
<Property name="enabled" type="boolean" value="false"/>
505+
</Properties>
506+
</Component>
507+
<Component class="javax.swing.JCheckBox" name="autoScaleCheckBox">
508+
<Properties>
509+
<Property name="selected" type="boolean" value="true"/>
510+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
511+
<Connection code="tr(&quot;Automatic&quot;)" type="code"/>
512+
</Property>
513+
</Properties>
514+
<Events>
515+
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="autoScaleCheckBoxItemStateChanged"/>
516+
</Events>
517+
</Component>
518+
<Component class="javax.swing.JLabel" name="jLabel3">
519+
<Properties>
520+
<Property name="text" type="java.lang.String" value="%"/>
521+
</Properties>
522+
</Component>
463523
</SubComponents>
464524
</Container>
465525
<Container class="javax.swing.JPanel" name="jPanel4">
@@ -596,7 +656,7 @@
596656
<Component id="manualProxyPassword" alignment="3" min="-2" max="-2" attributes="0"/>
597657
<Component id="manualProxyPasswordLabel" alignment="3" min="-2" max="-2" attributes="0"/>
598658
</Group>
599-
<EmptySpace pref="163" max="32767" attributes="0"/>
659+
<EmptySpace pref="190" max="32767" attributes="0"/>
600660
</Group>
601661
</Group>
602662
</DimensionLayout>

0 commit comments

Comments
 (0)