Files
ts3j/ts3-client/swing/src/main/java/com/ts3client/ui/StatusBar.java
ericek111 cf5ba94092 Add Master Volume slider, status bar toggle, and toolbar customization menu
The toolbar now has a right-click menu to hide/show the status bar and
a short Master Volume slider (drag or scroll) that multiplies both
voice and notification volume via new Settings.effectiveOutputVolume()/
effectiveSoundVolume() helpers.

Also splits MainFrame's toolbar, menu bar and status bar construction
into their own MainToolbar/MainMenuBar/StatusBar classes, each talking
back to MainFrame only through a Listener interface.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 13:37:36 +00:00

37 lines
1022 B
Java

package com.ts3client.ui;
import javax.swing.BorderFactory;
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.STATUS_BG);
setBorder(BorderFactory.createEmptyBorder(3, 8, 3, 8));
statusLabel.setFont(Theme.UI_FONT);
codecLabel.setFont(Theme.UI_FONT);
codecLabel.setForeground(Theme.CHAT_SYSTEM);
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();
}
}