Skip to content

Commit 26d11c2

Browse files
committed
Adjustments in GUI for cross-platform usability
1 parent d664634 commit 26d11c2

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

src/main/java/io/github/bonigarcia/dualsub/gui/DualSub.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
*/
1717
package io.github.bonigarcia.dualsub.gui;
1818

19-
import io.github.bonigarcia.dualsub.srt.SrtUtils;
20-
import io.github.bonigarcia.dualsub.util.Charset;
21-
import io.github.bonigarcia.dualsub.util.Font;
22-
import io.github.bonigarcia.dualsub.util.I18N;
23-
import io.github.bonigarcia.dualsub.util.Random;
24-
2519
import java.awt.Color;
2620
import java.awt.Cursor;
2721
import java.awt.Dimension;
@@ -65,6 +59,12 @@
6559

6660
import com.jgoodies.plaf.plastic.Plastic3DLookAndFeel;
6761

62+
import io.github.bonigarcia.dualsub.srt.SrtUtils;
63+
import io.github.bonigarcia.dualsub.util.Charset;
64+
import io.github.bonigarcia.dualsub.util.Font;
65+
import io.github.bonigarcia.dualsub.util.I18N;
66+
import io.github.bonigarcia.dualsub.util.Random;
67+
6868
/**
6969
* DualSub.
7070
*
@@ -184,6 +184,14 @@ private void initialize() {
184184
// Alert initialization
185185
Alert.setFrame(frame);
186186

187+
// Progress bar
188+
progressBar = new JProgressBar();
189+
progressBar.setIndeterminate(true);
190+
progressBar.setBounds(308, 110, 95, 15);
191+
progressBar.setBackground(background);
192+
progressBar.setVisible(false);
193+
frame.getContentPane().add(progressBar);
194+
187195
// Left subtitles
188196
JScrollPane leftSubtitlesScroll = new JScrollPane();
189197
leftSubtitlesScroll.setBounds(46, 37, 260, 121);
@@ -238,14 +246,6 @@ public void keyPressed(KeyEvent key) {
238246
}
239247
rightSubtitlesScroll.setViewportView(rightSubtitles);
240248

241-
// Progress bar
242-
progressBar = new JProgressBar();
243-
progressBar.setIndeterminate(true);
244-
progressBar.setBounds(308, 110, 94, 15);
245-
progressBar.setBackground(background);
246-
progressBar.setVisible(false);
247-
frame.getContentPane().add(progressBar);
248-
249249
// Output folder
250250
JButton outputFolderButton = new JButton(
251251
I18N.getHtmlText("Window.outputFolderButton.text"));

src/main/java/io/github/bonigarcia/dualsub/gui/PanelOutput.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private void initialize() {
9393
this.add(charsetLabel);
9494

9595
charsetComboBox = new JComboBox<CharsetItem>();
96-
charsetComboBox.setBounds(80, 15, 220, 20);
96+
charsetComboBox.setBounds(68, 15, 234, 20);
9797
charsetComboBox.setCursor(parent.getCursor());
9898
this.add(charsetComboBox);
9999

@@ -139,7 +139,7 @@ private void initialize() {
139139
parent.getProperties().getProperty("horizontal")));
140140
rdbtnVertical = new JRadioButton(
141141
I18N.getHtmlText("PanelOutput.layout.vertical"));
142-
rdbtnVertical.setBounds(75, 35, 70, 23);
142+
rdbtnVertical.setBounds(75, 35, 75, 23);
143143
rdbtnVertical.setCursor(parent.getCursor());
144144
rdbtnVertical.setBackground(parent.getBackground());
145145
rdbtnVertical.setSelected(!savedHorizontal);
@@ -154,7 +154,7 @@ public void actionPerformed(ActionEvent arg0) {
154154

155155
rdbtnHorizontal = new JRadioButton(
156156
I18N.getHtmlText("PanelOutput.layout.horizontal"));
157-
rdbtnHorizontal.setBounds(150, 35, 70, 23);
157+
rdbtnHorizontal.setBounds(150, 35, 100, 23);
158158
rdbtnHorizontal.setCursor(parent.getCursor());
159159
rdbtnHorizontal.setBackground(parent.getBackground());
160160
rdbtnHorizontal.setSelected(savedHorizontal);

src/main/java/io/github/bonigarcia/dualsub/gui/ReminderSurveyDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected void initComponents() {
108108
JButton lblContent02 = new UrlButton(I18N.getHtmlText(
109109
"WhatsNewDialog.text.03", Html.LINK), surveyUrl,
110110
parent.getCursor(), parent.getBackground(), new Rectangle(
111-
marginLeft + 120, 95, 200, 15));
111+
marginLeft + 110, 95, 250, 15));
112112
panel.add(lblContent02);
113113

114114
JLabel lblContent03 = new JLabel(

src/main/java/io/github/bonigarcia/dualsub/gui/WhatsNewDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected void initComponents() {
112112
JButton lblContent03 = new UrlButton(I18N.getHtmlText(
113113
"WhatsNewDialog.text.03", Html.LINK), surveyUrl,
114114
parent.getCursor(), parent.getBackground(), new Rectangle(
115-
marginLeft + 180, 444, 200, 15));
115+
marginLeft + 170, 444, 250, 15));
116116
panel.add(lblContent03);
117117

118118
JLabel lblContent04 = new JLabel(

0 commit comments

Comments
 (0)