Updated screenshot

This commit is contained in:
Robert Vokac 2024-05-21 18:00:11 +02:00
parent 764e54eb0a
commit 3df9bfe973
No known key found for this signature in database
GPG Key ID: C459E1E4B4A986BB
6 changed files with 14 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -16,6 +16,7 @@ public class SwingUtils {
public static final Font MEDIUM_MONOSPACE_FONT
= new Font(Font.MONOSPACED, Font.PLAIN, 12);
public static final Insets INSETS = new Insets(4,4,4,4);
public static final Font LINUX_FONT = new Font("sansserif", Font.PLAIN, 10);
private SwingUtils() {
//Not meant to be instantiated.
}

View File

@ -10,6 +10,7 @@ import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.Timer;
import java.awt.Color;
import org.nanoboot.utils.timecalc.app.TimeCalcApp;
import org.nanoboot.utils.timecalc.swing.windows.MainWindow;
import org.nanoboot.utils.timecalc.swing.common.SwingUtils;
@ -39,6 +40,9 @@ public class TLabel extends JLabel implements GetProperty {
public TLabel(String text, int customWidth) {
super(text);
this.customWidth = customWidth;
if(TimeCalcApp.IS_RUNNING_ON_LINUX) {
setFont(SwingUtils.LINUX_FONT);
}
new Timer(100, e -> {
if (!MainWindow.hideShowFormsCheckBox.isSelected()) {
setVisible(false);

View File

@ -19,7 +19,8 @@ import javax.swing.Timer;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.Color;
import java.awt.Insets;
import java.awt.Font;
import org.nanoboot.utils.timecalc.app.TimeCalcApp;
import static org.nanoboot.utils.timecalc.swing.common.SwingUtils.INSETS;
@ -31,7 +32,7 @@ public class TTextField extends JTextField implements GetProperty {
private static final int WIDTH = 50;
private static final int HEIGHT = 30;
private int customWidth = 0;
private Color originalBackground;
private Color originalForeground;
@ -73,6 +74,9 @@ public class TTextField extends JTextField implements GetProperty {
setVetoableChangeListener(vetoableChangeListener);
this.customWidth = customWidth;
valueProperty.setValue(s);
if(TimeCalcApp.IS_RUNNING_ON_LINUX) {
setFont(SwingUtils.LINUX_FONT);
}
new Timer(100, e -> {
if (editingOnlyInDialog) {
setEditable(false);

View File

@ -505,7 +505,7 @@ public class ConfigWindow extends TWindow {
fuelVisibleProperty.setSelected(enable);
fuelIconVisibleProperty.setSelected(enable);
rotationVisibleProperty.setSelected(enable);
typeVisibleProperty.setSelected(enable);
typeVisibleProperty.setSelected(false);
// clockHiddenProperty.setSelected(!enable);
// batteryMinuteHiddenProperty.setSelected(!enable);
// batteryHourHiddenProperty.setSelected(!enable);

View File

@ -634,7 +634,7 @@ public class MainWindow extends TWindow {
pauseDecreaseButton.setBounds(pauseTimeTextField.getX() + pauseTimeTextField.getWidth(), pauseTimeTextField.getY() + 15, 15, 15);
//
TLabel pauseStartTimeLabel = new TLabel("Pause start:", 60);
TLabel pauseStartTimeLabel = new TLabel("Pause start:", 70);
pauseStartTimeLabel.setBoundsFromLeft(pauseIncreaseButton, 15);
pauseStartTextField.setBoundsFromLeft(pauseStartTimeLabel);
@ -718,7 +718,7 @@ public class MainWindow extends TWindow {
if(!allowOnlyBasicFeaturesProperty.getValue()) add(departureTextFieldLabel);
add(departureTextField);
TLabel endPauseTextFieldLabel = new TLabel("Pause end:", 60);
TLabel endPauseTextFieldLabel = new TLabel("Pause end:", 70);
endPauseTextFieldLabel.setBounds(pauseStartTimeLabel.getX(), departureTextFieldLabel.getY());
endPauseTextField.setBoundsFromLeft(endPauseTextFieldLabel);