Files
ts3j/ts3-client/swing/src/main/java/com/ts3client/Main.java
ericek111 35f10ed14c Paint the client with FlatLaf, in a light and a dark theme
The look-and-feel is FlatLaf now, chosen light or dark on the new Design
tab and remembered in the settings. Theme keeps only the colours TeamSpeak
gives meaning to (talking, away, muted, channel and server names) and takes
its surfaces and fonts from the look-and-feel, so a switch recolours the
whole window, chat logs included: the HTML panes share one themed stylesheet
and re-parse their content when the theme changes.

Also fixes the channel tree not scrolling: the tree listened for the mouse
wheel to re-check its hover row, and AWT only forwards a wheel event to the
enclosing scroll pane when the component under the pointer has no wheel
listener of its own. The hover row now follows the viewport instead, which
also covers scrollbar drags and keyboard scrolling.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 21:06:55 +00:00

32 lines
924 B
Java

package com.ts3client;
import com.ts3client.config.Settings;
import com.ts3client.ui.IconTheme;
import com.ts3client.ui.LookAndFeelManager;
import com.ts3client.ui.MainFrame;
import javax.swing.SwingUtilities;
/**
* Application entry point. Loads settings, installs the look-and-feel and shows the
* main window on the Swing event dispatch thread.
*/
public final class Main {
public static void main(String[] args) {
// ts3j is verbose by default; keep the console quiet unless debugging.
try {
com.github.manevolent.ts3j.util.Ts3Debugging.setEnabled(false);
} catch (Throwable ignored) {
}
final Settings settings = Settings.load();
SwingUtilities.invokeLater(() -> {
LookAndFeelManager.install(settings.appearance);
IconTheme.get().reload(settings);
new MainFrame(settings).setVisible(true);
});
}
}