From a4a8b394109c76897c0778c3cbe98deafd453086 Mon Sep 17 00:00:00 2001 From: ericek111 Date: Thu, 20 Aug 2026 06:58:08 +0000 Subject: [PATCH] Paint the Away button as flat as its neighbours Inside its panel it was drawn as a filled button, which read as half-active. Co-Authored-By: Claude Opus 5 --- .../src/main/java/com/ts3client/ui/DropDownToggleButton.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ts3-client/swing/src/main/java/com/ts3client/ui/DropDownToggleButton.java b/ts3-client/swing/src/main/java/com/ts3client/ui/DropDownToggleButton.java index b9b3174..1bb7227 100644 --- a/ts3-client/swing/src/main/java/com/ts3client/ui/DropDownToggleButton.java +++ b/ts3-client/swing/src/main/java/com/ts3client/ui/DropDownToggleButton.java @@ -32,6 +32,11 @@ public final class DropDownToggleButton extends JPanel { public DropDownToggleButton(Icon icon, String tooltip, Supplier menu) { super(new BorderLayout()); setOpaque(false); + // Sitting inside this panel, the halves are not toolbar children any more, so the + // look and feel would paint them as filled buttons; ask for the flat toolbar look + // the plain toggles next to us get. + button.putClientProperty("JButton.buttonType", "toolBarButton"); + arrow.putClientProperty("JButton.buttonType", "toolBarButton"); button.setIcon(icon); button.setToolTipText(tooltip);