Files
ts3java/ts3-client/swing/src/main/java/com/ts3client/ui/StatusBar.java
ericek111 9d996f48a2 Scale the interface fractionally on Linux
Java2D on X11 (and so under XWayland) truncates its scale to a whole
number, drawing 150 % at 100 %. On Linux, pin Java2D to 1 and hand the
full factor to FlatLaf, taken from XSETTINGS Xft/DPI, KWin's Xwayland
scale or GDK_SCALE, or chosen in Options → Design.

The client's own sizes now go through UIScale: borders, gaps, dialog and
row sizes, icons (rendered at the scaled size, so they stay crisp),
custom-painted components and font sizes in the HTML views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 22:33:27 +00:00

38 lines
1.0 KiB
Java

package com.ts3client.ui;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/** The strip at the bottom of the window: connection status on the left, codec info on the right. */
final class StatusBar extends JPanel {
private final JLabel statusLabel = new JLabel("Not connected");
private final JLabel codecLabel = new JLabel();
StatusBar() {
super(new BorderLayout());
setBackground(Theme.statusBg());
setBorder(new ScaledEmptyBorder(3, 8, 3, 8));
statusLabel.setFont(Theme.uiFont());
codecLabel.setFont(Theme.uiFont());
codecLabel.setForeground(Theme.chatSystem());
add(statusLabel, BorderLayout.WEST);
add(codecLabel, BorderLayout.EAST);
}
void setStatus(String text) {
statusLabel.setText(text);
}
void setCodec(String text) {
codecLabel.setText(text);
}
String codecText() {
return codecLabel.getText();
}
}