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>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.ts3client.ui;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import com.formdev.flatlaf.util.ScaledEmptyBorder;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import java.awt.BorderLayout;
|
||||
@@ -14,7 +15,7 @@ final class StatusBar extends JPanel {
|
||||
StatusBar() {
|
||||
super(new BorderLayout());
|
||||
setBackground(Theme.statusBg());
|
||||
setBorder(BorderFactory.createEmptyBorder(3, 8, 3, 8));
|
||||
setBorder(new ScaledEmptyBorder(3, 8, 3, 8));
|
||||
statusLabel.setFont(Theme.uiFont());
|
||||
codecLabel.setFont(Theme.uiFont());
|
||||
codecLabel.setForeground(Theme.chatSystem());
|
||||
|
||||
Reference in New Issue
Block a user