Skip to content

Commit 6bc9e49

Browse files
committed
Fix login dialog padding
1 parent 9b959be commit 6bc9e49

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tmc-plugin/src/fi/helsinki/cs/tmc/ui/LoginDialog.form

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Property name="resizable" type="boolean" value="false"/>
1313
</Properties>
1414
<SyntheticProperties>
15-
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,-8,0,0,1,-108"/>
15+
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,5,0,0,1,-104"/>
1616
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
1717
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
1818
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
@@ -70,7 +70,7 @@
7070
</Group>
7171
</Group>
7272
</Group>
73-
<EmptySpace min="-2" pref="57" max="-2" attributes="0"/>
73+
<EmptySpace max="32767" attributes="0"/>
7474
</Group>
7575
</Group>
7676
</DimensionLayout>
@@ -111,6 +111,7 @@
111111
<Component id="loginButton" min="-2" max="-2" attributes="0"/>
112112
<Component id="cancelButton" min="-2" max="-2" attributes="0"/>
113113
</Group>
114+
<EmptySpace max="32767" attributes="0"/>
114115
</Group>
115116
</Group>
116117
</DimensionLayout>

tmc-plugin/src/fi/helsinki/cs/tmc/ui/LoginDialog.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class LoginDialog extends javax.swing.JDialog {
2020
public static void display(LoginListener onOk, final Runnable onClosed) {
2121
LoginDialog dialog = new LoginDialog(onOk);
2222
dialog.setLocationRelativeTo(null);
23+
dialog.pack();
2324
dialog.setVisible(true);
2425
dialog.addWindowListener(new WindowAdapter() {
2526
@Override
@@ -183,7 +184,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
183184
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
184185
.addComponent(passwordField, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE)
185186
.addComponent(usernameField))))
186-
.addGap(57, 57, 57))
187+
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
187188
);
188189
layout.setVerticalGroup(
189190
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -213,10 +214,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
213214
.addGap(18, 18, 18)
214215
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
215216
.addComponent(loginButton)
216-
.addComponent(cancelButton)))
217+
.addComponent(cancelButton))
218+
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
217219
);
218220

219-
setSize(new java.awt.Dimension(404, 248));
221+
setSize(new java.awt.Dimension(408, 261));
220222
setLocationRelativeTo(null);
221223
}// </editor-fold>//GEN-END:initComponents
222224

0 commit comments

Comments
 (0)