Skip to content

Commit

Permalink
Adjustments in GUI for cross-platform usability
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Sep 23, 2015
1 parent d664634 commit 26d11c2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
28 changes: 14 additions & 14 deletions src/main/java/io/github/bonigarcia/dualsub/gui/DualSub.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
*/
package io.github.bonigarcia.dualsub.gui;

import io.github.bonigarcia.dualsub.srt.SrtUtils;
import io.github.bonigarcia.dualsub.util.Charset;
import io.github.bonigarcia.dualsub.util.Font;
import io.github.bonigarcia.dualsub.util.I18N;
import io.github.bonigarcia.dualsub.util.Random;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
Expand Down Expand Up @@ -65,6 +59,12 @@

import com.jgoodies.plaf.plastic.Plastic3DLookAndFeel;

import io.github.bonigarcia.dualsub.srt.SrtUtils;
import io.github.bonigarcia.dualsub.util.Charset;
import io.github.bonigarcia.dualsub.util.Font;
import io.github.bonigarcia.dualsub.util.I18N;
import io.github.bonigarcia.dualsub.util.Random;

/**
* DualSub.
*
Expand Down Expand Up @@ -184,6 +184,14 @@ private void initialize() {
// Alert initialization
Alert.setFrame(frame);

// Progress bar
progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
progressBar.setBounds(308, 110, 95, 15);
progressBar.setBackground(background);
progressBar.setVisible(false);
frame.getContentPane().add(progressBar);

// Left subtitles
JScrollPane leftSubtitlesScroll = new JScrollPane();
leftSubtitlesScroll.setBounds(46, 37, 260, 121);
Expand Down Expand Up @@ -238,14 +246,6 @@ public void keyPressed(KeyEvent key) {
}
rightSubtitlesScroll.setViewportView(rightSubtitles);

// Progress bar
progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
progressBar.setBounds(308, 110, 94, 15);
progressBar.setBackground(background);
progressBar.setVisible(false);
frame.getContentPane().add(progressBar);

// Output folder
JButton outputFolderButton = new JButton(
I18N.getHtmlText("Window.outputFolderButton.text"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private void initialize() {
this.add(charsetLabel);

charsetComboBox = new JComboBox<CharsetItem>();
charsetComboBox.setBounds(80, 15, 220, 20);
charsetComboBox.setBounds(68, 15, 234, 20);
charsetComboBox.setCursor(parent.getCursor());
this.add(charsetComboBox);

Expand Down Expand Up @@ -139,7 +139,7 @@ private void initialize() {
parent.getProperties().getProperty("horizontal")));
rdbtnVertical = new JRadioButton(
I18N.getHtmlText("PanelOutput.layout.vertical"));
rdbtnVertical.setBounds(75, 35, 70, 23);
rdbtnVertical.setBounds(75, 35, 75, 23);
rdbtnVertical.setCursor(parent.getCursor());
rdbtnVertical.setBackground(parent.getBackground());
rdbtnVertical.setSelected(!savedHorizontal);
Expand All @@ -154,7 +154,7 @@ public void actionPerformed(ActionEvent arg0) {

rdbtnHorizontal = new JRadioButton(
I18N.getHtmlText("PanelOutput.layout.horizontal"));
rdbtnHorizontal.setBounds(150, 35, 70, 23);
rdbtnHorizontal.setBounds(150, 35, 100, 23);
rdbtnHorizontal.setCursor(parent.getCursor());
rdbtnHorizontal.setBackground(parent.getBackground());
rdbtnHorizontal.setSelected(savedHorizontal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected void initComponents() {
JButton lblContent02 = new UrlButton(I18N.getHtmlText(
"WhatsNewDialog.text.03", Html.LINK), surveyUrl,
parent.getCursor(), parent.getBackground(), new Rectangle(
marginLeft + 120, 95, 200, 15));
marginLeft + 110, 95, 250, 15));
panel.add(lblContent02);

JLabel lblContent03 = new JLabel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected void initComponents() {
JButton lblContent03 = new UrlButton(I18N.getHtmlText(
"WhatsNewDialog.text.03", Html.LINK), surveyUrl,
parent.getCursor(), parent.getBackground(), new Rectangle(
marginLeft + 180, 444, 200, 15));
marginLeft + 170, 444, 250, 15));
panel.add(lblContent03);

JLabel lblContent04 = new JLabel(
Expand Down

0 comments on commit 26d11c2

Please sign in to comment.