Colour client rows in the channel tree: for everyone, while talking, while muted or away
Design settings on desktop and Android offer a few see-through presets that suit light and dark themes alike, or a custom colour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Options page for how the client looks: the light or dark look-and-feel, the interface
|
||||
* scale, and the icon pack the user interface is drawn with — where to look for more of
|
||||
* scale, the channel tree's flags and row colours, and the icon pack the user interface is drawn with — where to look for more of
|
||||
* them, and a viewer showing everything the active pack contains.
|
||||
*
|
||||
* <p>Theme and pack apply right away so the change can be seen in the window behind the
|
||||
@@ -61,6 +61,9 @@ final class DesignPanel extends JPanel {
|
||||
private final JLabel packInfo = new JLabel();
|
||||
private final JTextField packDirField;
|
||||
private final JCheckBox countryFlags = new JCheckBox("Show country flags in the channel tree");
|
||||
private final RowColorCombo anyColor;
|
||||
private final RowColorCombo talkingColor;
|
||||
private final RowColorCombo mutedAwayColor;
|
||||
private final DefaultListModel<String> previewModel = new DefaultListModel<>();
|
||||
private final JList<String> preview = new JList<>(previewModel);
|
||||
|
||||
@@ -71,6 +74,9 @@ final class DesignPanel extends JPanel {
|
||||
this.originalPackDir = settings.iconPackDir;
|
||||
this.originalAppearance = settings.appearance;
|
||||
this.packDirField = new JTextField(settings.iconPackDir, 18);
|
||||
this.anyColor = new RowColorCombo(settings.clientRowColors.any);
|
||||
this.talkingColor = new RowColorCombo(settings.clientRowColors.talking);
|
||||
this.mutedAwayColor = new RowColorCombo(settings.clientRowColors.mutedAway);
|
||||
|
||||
setBorder(new ScaledEmptyBorder(12, 12, 12, 12));
|
||||
add(buildHeader(), BorderLayout.NORTH);
|
||||
@@ -87,6 +93,9 @@ final class DesignPanel extends JPanel {
|
||||
Object selected = packCombo.getSelectedItem();
|
||||
settings.iconPack = selected instanceof IconPack pack ? pack.id() : "";
|
||||
settings.countryFlags = countryFlags.isSelected();
|
||||
settings.clientRowColors.any = anyColor.value();
|
||||
settings.clientRowColors.talking = talkingColor.value();
|
||||
settings.clientRowColors.mutedAway = mutedAwayColor.value();
|
||||
originalPackId = settings.iconPack;
|
||||
originalPackDir = settings.iconPackDir;
|
||||
originalAppearance = settings.appearance;
|
||||
@@ -155,6 +164,9 @@ final class DesignPanel extends JPanel {
|
||||
}
|
||||
FormPanel.addSection(p, c, row++, "Channel Tree");
|
||||
FormPanel.addWide(p, c, row++, countryFlags);
|
||||
FormPanel.addRow(p, c, row++, new JLabel("Client background:"), anyColor);
|
||||
FormPanel.addRow(p, c, row++, new JLabel("While talking:"), talkingColor);
|
||||
FormPanel.addRow(p, c, row++, new JLabel("Muted / away:"), mutedAwayColor);
|
||||
FormPanel.addSection(p, c, row++, "Icon Pack");
|
||||
FormPanel.addRow(p, c, row++, new JLabel("Icon pack:"), packCombo);
|
||||
c.gridx = 1;
|
||||
|
||||
Reference in New Issue
Block a user