update the Mode selector on theme update

This commit is contained in:
Ben Fry
2022-01-13 09:44:34 -05:00
parent a4cc3b3cfc
commit c86ccdf01b
3 changed files with 12 additions and 16 deletions
+6 -14
View File
@@ -58,6 +58,8 @@ abstract public class EditorToolbar extends JPanel implements KeyListener {
protected EditorButton rolloverButton;
protected JLabel rolloverLabel;
protected ModeSelector modeSelector;
protected Box box;
protected Image gradient;
@@ -84,26 +86,14 @@ abstract public class EditorToolbar extends JPanel implements KeyListener {
for (EditorButton button : buttons) {
box.add(button);
box.add(Box.createHorizontalStrut(GAP));
// registerButton(button);
}
// // remove the last gap
// box.remove(box.getComponentCount() - 1);
// box.add(Box.createHorizontalStrut(LABEL_GAP));
box.add(rolloverLabel);
// currentButton = runButton;
// runButton.setRolloverLabel(label);
// stopButton.setRolloverLabel(label);
box.add(Box.createHorizontalGlue());
addModeButtons(box, rolloverLabel);
// Component items = createModeButtons();
// if (items != null) {
// box.add(items);
// }
ModeSelector ms = new ModeSelector(editor);
box.add(ms);
box.add(modeSelector = new ModeSelector(editor));
box.add(Box.createHorizontalStrut(Editor.RIGHT_GUTTER));
setLayout(new BorderLayout());
@@ -124,6 +114,8 @@ abstract public class EditorToolbar extends JPanel implements KeyListener {
((EditorButton) c).updateTheme();
}
}
modeSelector.updateTheme();
repaint();
}
@@ -53,7 +53,6 @@ public class ModeSelector extends JPanel {
int[] triangleX = new int[3];
int[] triangleY = new int[] { ARROW_TOP, ARROW_TOP, ARROW_BOTTOM };
// Image background;
Color backgroundColor;
Color outlineColor;
+6 -1
View File
@@ -50,7 +50,12 @@ X generate footer icons
X incorporate icon auto-generate into PDE
X autogenerate on theme update
X generate footer icons
_ debug theme update
_ finish debugging theme update
X update gutter colors on theme update
X update the mode selector colors
_ make sure repaint is happening
_ try removing background color from console text
_ line numbers extending into the horizontal scroll bar
_ white corner on the scroll bar
_ single line at top of editor (editor bg color?)
_ put themes in folders by name