52
52
53
53
import cc .arduino .plugins .wifi101 .flashers .Flasher ;
54
54
import processing .app .Base ;
55
+ import processing .app .Theme ;
55
56
56
57
@ SuppressWarnings ("serial" )
57
58
public class UpdaterJFrame extends JFrame {
@@ -89,10 +90,12 @@ public void run() {
89
90
}
90
91
91
92
public UpdaterJFrame () {
93
+
94
+ int scale = Theme .getScale ();
92
95
setTitle ("WiFi101 / WiFiNINA Firmware/Certificates Updater" );
93
96
setResizable (false );
94
97
setDefaultCloseOperation (JFrame .DISPOSE_ON_CLOSE );
95
- setBounds (100 , 100 , 500 , 520 );
98
+ setBounds (100 * scale / 100 , 100 * scale / 100 , 500 * scale / 100 , 520 * scale / 100 );
96
99
contentPane = new JPanel ();
97
100
contentPane .setBorder (new EmptyBorder (5 , 5 , 5 , 5 ));
98
101
setContentPane (contentPane );
@@ -105,8 +108,8 @@ public UpdaterJFrame() {
105
108
106
109
panel_1 = new JPanel ();
107
110
panel_1 .setBorder (new TitledBorder (null , "1. Select port of the WiFi module" , TitledBorder .LEADING , TitledBorder .TOP , null , null ));
108
- panel_1 .setMinimumSize (new Dimension (500 , 150 ));
109
- panel_1 .setPreferredSize (new Dimension (500 , 150 ));
111
+ panel_1 .setMinimumSize (new Dimension (500 * scale / 100 , 150 * scale / 100 ));
112
+ panel_1 .setPreferredSize (new Dimension (500 * scale / 100 , 150 * scale / 100 ));
110
113
GridBagConstraints gbc_panel_1 = new GridBagConstraints ();
111
114
gbc_panel_1 .insets = new Insets (5 , 5 , 0 , 5 );
112
115
gbc_panel_1 .fill = GridBagConstraints .BOTH ;
@@ -132,7 +135,7 @@ public UpdaterJFrame() {
132
135
133
136
serialPortList = new JList <String >();
134
137
JScrollPane sp = new JScrollPane (serialPortList );
135
- serialPortList .setMaximumSize (new Dimension (300 , 100 ));
138
+ serialPortList .setMaximumSize (new Dimension (300 * scale / 100 , 100 * scale / 100 ));
136
139
GridBagConstraints gbc_serialPortList = new GridBagConstraints ();
137
140
gbc_serialPortList .insets = new Insets (5 , 5 , 5 , 5 );
138
141
gbc_serialPortList .fill = GridBagConstraints .BOTH ;
@@ -188,7 +191,7 @@ public void actionPerformed(ActionEvent e) {
188
191
189
192
panel = new JPanel ();
190
193
panel .setBorder (new TitledBorder (new LineBorder (new Color (184 , 207 , 229 )), "2. Update firmware" , TitledBorder .LEADING , TitledBorder .TOP , null , new Color (51 , 51 , 51 )));
191
- panel .setMinimumSize (new Dimension (500 , 150 ));
194
+ panel .setMinimumSize (new Dimension (500 * scale / 100 , 150 * scale / 100 ));
192
195
GridBagConstraints gbc_panel = new GridBagConstraints ();
193
196
gbc_panel .insets = new Insets (5 , 5 , 0 , 5 );
194
197
gbc_panel .fill = GridBagConstraints .BOTH ;
@@ -240,7 +243,7 @@ public void actionPerformed(ActionEvent e) {
240
243
241
244
panel_2 = new JPanel ();
242
245
panel_2 .setBorder (new TitledBorder (null , "3. Update SSL root certificates" , TitledBorder .LEFT , TitledBorder .TOP , null , null ));
243
- panel_2 .setMinimumSize (new Dimension (500 , 200 ));
246
+ panel_2 .setMinimumSize (new Dimension (500 * scale / 100 , 200 * scale / 100 ));
244
247
GridBagConstraints gbc_panel_2 = new GridBagConstraints ();
245
248
gbc_panel_2 .insets = new Insets (5 , 5 , 0 , 5 );
246
249
gbc_panel_2 .fill = GridBagConstraints .BOTH ;
@@ -268,7 +271,7 @@ public void actionPerformed(ActionEvent e) {
268
271
textFwNot = new JLabel ();
269
272
textFwNot .setText ("No certificates available" );
270
273
textFwNot .setOpaque (false );
271
- textFwNot .setMinimumSize (new Dimension (500 , 500 ));
274
+ textFwNot .setMinimumSize (new Dimension (500 * scale / 100 , 500 * scale / 100 ));
272
275
GridBagConstraints gbc_textFwNot = new GridBagConstraints ();
273
276
gbc_textFwNot .gridwidth = 2 ;
274
277
gbc_textFwNot .insets = new Insets (5 , 5 , 5 , 0 );
0 commit comments