From c7e9f46b39c9cff329969b256987e9cb095fa1ee Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 01:31:02 +0200 Subject: [PATCH 01/28] Reformat --- .../dialogs/preset/ComponentPresetTable.java | 113 ++++++++++-------- 1 file changed, 61 insertions(+), 52 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java index 469466a31..bfba35d26 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java @@ -51,11 +51,12 @@ public class ComponentPresetTable extends JTable { this.presets = presets; this.presetType = presetType; this.favorites = Application.getPreferences().getComponentFavorites(presetType); - this.columns = new ComponentPresetTableColumn[ComponentPreset.ORDERED_KEY_LIST.size()+1]; + this.columns = new ComponentPresetTableColumn[ComponentPreset.ORDERED_KEY_LIST.size() + 1]; tableModel = new AbstractTableModel() { final ComponentPresetTableColumn[] myColumns = columns; + @Override public int getRowCount() { return ComponentPresetTable.this.presets.size(); @@ -68,7 +69,7 @@ public class ComponentPresetTable extends JTable { @Override public Object getValueAt(int rowIndex, int columnIndex) { - return myColumns[columnIndex].getValueFromPreset(favorites,ComponentPresetTable.this.presets.get(rowIndex)); + return myColumns[columnIndex].getValueFromPreset(favorites, ComponentPresetTable.this.presets.get(rowIndex)); } @Override @@ -109,25 +110,25 @@ public class ComponentPresetTable extends JTable { List hiddenColumns = new ArrayList(); { int index = 1; - for (final TypedKey key: ComponentPreset.ORDERED_KEY_LIST ) { - if ( key.getType() == Double.class && key.getUnitGroup() != null ) { - columns[index] = new ComponentPresetTableColumn.DoubleWithUnit((TypedKey)key,index); + for (final TypedKey key : ComponentPreset.ORDERED_KEY_LIST) { + if (key.getType() == Double.class && key.getUnitGroup() != null) { + columns[index] = new ComponentPresetTableColumn.DoubleWithUnit((TypedKey) key, index); } else { - columns[index] = new ComponentPresetTableColumn.Parameter(key,index); + columns[index] = new ComponentPresetTableColumn.Parameter(key, index); } tableColumnModel.addColumn(columns[index]); - if ( key == ComponentPreset.PARTNO ) { + if (key == ComponentPreset.PARTNO) { sorter.setComparator(index, new AlphanumComparator()); - } else if ( key.getType() == Double.class ) { - sorter.setComparator(index, new Comparator() { + } else if (key.getType() == Double.class) { + sorter.setComparator(index, new Comparator() { @Override public int compare(Value o1, Value o2) { return Double.compare(o1.getValue(), o2.getValue()); } - + }); - } else if ( key.getType() == Boolean.class ) { + } else if (key.getType() == Boolean.class) { sorter.setComparator(index, new Comparator() { @Override @@ -140,42 +141,43 @@ public class ComponentPresetTable extends JTable { return 0; } } - }); + }); } - - if ( visibleColumnKeys.indexOf(key) < 0 ) { + + if (visibleColumnKeys.indexOf(key) < 0) { hiddenColumns.add(columns[index]); } - index ++; - } + index++; + } } this.setAutoCreateColumnsFromModel(false); - this.setColumnModel( tableColumnModel ); + this.setColumnModel(tableColumnModel); this.setModel(tableModel); this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.setRowSorter(sorter); - sorter.toggleSortOrder(2); // Sort by the first column (manufacturer) by default + sorter.toggleSortOrder(2); // Sort by the first column (manufacturer) by default - for ( TableColumn hiddenColumn : hiddenColumns ) { + for (TableColumn hiddenColumn : hiddenColumns) { tableColumnModel.setColumnVisible(hiddenColumn, false); } JTableHeader header = this.getTableHeader(); - + header.setReorderingAllowed(true); - header.addMouseListener( new MouseAdapter() { + header.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { - if ( e.isPopupTrigger() ) { + if (e.isPopupTrigger()) { doPopup(e); } } + @Override public void mouseReleased(MouseEvent e) { - if ( e.isPopupTrigger() ) { + if (e.isPopupTrigger()) { doPopup(e); } } @@ -186,49 +188,49 @@ public class ComponentPresetTable extends JTable { return tableColumnModel; } - public void setRowFilter( RowFilter filter ) { - sorter.setRowFilter( filter ); + public void setRowFilter(RowFilter filter) { + sorter.setRowFilter(filter); } - public void updateData( List myPresets ) { + public void updateData(List myPresets) { this.presets = myPresets; this.favorites = Application.getPreferences().getComponentFavorites(presetType); this.tableModel.fireTableDataChanged(); } - + public void updateFavorites() { this.favorites = Application.getPreferences().getComponentFavorites(presetType); this.tableModel.fireTableDataChanged(); } - private void doPopup(MouseEvent evt ) { - + private void doPopup(MouseEvent evt) { + // Figure out what column header was clicked on. - int colIndex = tableColumnModel.getColumnIndexAtX( evt.getX() ); + int colIndex = tableColumnModel.getColumnIndexAtX(evt.getX()); ComponentPresetTableColumn colClicked = null; - if ( colIndex >=0 ) { + if (colIndex >= 0) { colClicked = (ComponentPresetTableColumn) tableColumnModel.getColumn(colIndex); } - + JPopupMenu columnMenu = new ColumnPopupMenu(colClicked, colIndex); - columnMenu.show(evt.getComponent(),evt.getX(),evt.getY()); + columnMenu.show(evt.getComponent(), evt.getX(), evt.getY()); } private class ColumnPopupMenu extends JPopupMenu { ColumnPopupMenu(ComponentPresetTableColumn colClicked, int colClickedIndex) { - if ( colClickedIndex >= 0 ) { + if (colClickedIndex >= 0) { JCheckBoxMenuItem item = new SortAscColumnMenuItem(colClickedIndex); this.add(item); item = new SortDescColumnMenuItem(colClickedIndex); this.add(item); this.addSeparator(); - if ( colClicked instanceof ComponentPresetTableColumn.DoubleWithUnit ) { - this.add( new UnitSelectorMenuItem( (ComponentPresetTableColumn.DoubleWithUnit) colClicked )); + if (colClicked instanceof ComponentPresetTableColumn.DoubleWithUnit) { + this.add(new UnitSelectorMenuItem((ComponentPresetTableColumn.DoubleWithUnit) colClicked)); this.addSeparator(); } } - for( TableColumn c: columns ) { + for (TableColumn c : columns) { JCheckBoxMenuItem item = new ToggleColumnMenuItem(c); this.add(item); } @@ -237,67 +239,74 @@ public class ComponentPresetTable extends JTable { private class SortAscColumnMenuItem extends JCheckBoxMenuItem implements ItemListener { private int columnClicked; + SortAscColumnMenuItem(int columnClicked) { - super( trans.get("ComponentPresetChooserDialog.menu.sortAsc") ); + super(trans.get("ComponentPresetChooserDialog.menu.sortAsc")); this.addItemListener(this); this.columnClicked = columnClicked; } + @Override public void itemStateChanged(ItemEvent e) { - sorter.setSortKeys( Collections.singletonList( new SortKey(columnClicked, SortOrder.ASCENDING))); + sorter.setSortKeys(Collections.singletonList(new SortKey(columnClicked, SortOrder.ASCENDING))); } } - + private class SortDescColumnMenuItem extends JCheckBoxMenuItem implements ItemListener { private int columnClicked; + SortDescColumnMenuItem(int columnClicked) { - super( trans.get("ComponentPresetChooserDialog.menu.sortDesc") ); + super(trans.get("ComponentPresetChooserDialog.menu.sortDesc")); this.addItemListener(this); this.columnClicked = columnClicked; } + @Override public void itemStateChanged(ItemEvent e) { - sorter.setSortKeys( Collections.singletonList( new SortKey(columnClicked, SortOrder.DESCENDING))); + sorter.setSortKeys(Collections.singletonList(new SortKey(columnClicked, SortOrder.DESCENDING))); } } - + private class ToggleColumnMenuItem extends JCheckBoxMenuItem implements ItemListener { TableColumn col; - ToggleColumnMenuItem( TableColumn col ) { - super( String.valueOf(col.getHeaderValue()), tableColumnModel.isColumnVisible(col)); + + ToggleColumnMenuItem(TableColumn col) { + super(String.valueOf(col.getHeaderValue()), tableColumnModel.isColumnVisible(col)); this.addItemListener(this); this.col = col; } + @Override public void itemStateChanged(ItemEvent e) { tableColumnModel.setColumnVisible(col, !tableColumnModel.isColumnVisible(col)); } } - + private class UnitSelectorMenuItem extends JMenu implements ItemListener { ComponentPresetTableColumn.DoubleWithUnit col; - UnitSelectorMenuItem( ComponentPresetTableColumn.DoubleWithUnit col ) { + + UnitSelectorMenuItem(ComponentPresetTableColumn.DoubleWithUnit col) { super(trans.get("ComponentPresetChooserDialog.menu.units")); this.col = col; UnitGroup group = col.unitGroup; Unit selectedUnit = col.selectedUnit; - for( Unit u : group.getUnits() ) { - JCheckBoxMenuItem item = new JCheckBoxMenuItem( u.toString() ); - if ( u == selectedUnit ) { + for (Unit u : group.getUnits()) { + JCheckBoxMenuItem item = new JCheckBoxMenuItem(u.toString()); + if (u == selectedUnit) { item.setSelected(true); } item.addItemListener(this); this.add(item); } - + } + @Override public void itemStateChanged(ItemEvent e) { JCheckBoxMenuItem item = (JCheckBoxMenuItem) e.getItem(); String val = item.getText(); col.selectedUnit = col.unitGroup.findApproximate(val); ComponentPresetTable.this.tableModel.fireTableDataChanged(); - return; } } From 26d399c5f12efbd89e5cf29a108479e6dcd296fa Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 18:30:04 +0200 Subject: [PATCH 02/28] Only show visible columns in popup menu --- .../dialogs/preset/ComponentPresetTable.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java index bfba35d26..1b50983e1 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java @@ -7,6 +7,7 @@ import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.Enumeration; import java.util.List; import java.util.Set; @@ -45,6 +46,7 @@ public class ComponentPresetTable extends JTable { private final AbstractTableModel tableModel; private final XTableColumnModel tableColumnModel; private final ComponentPresetTableColumn[] columns; + private final List hiddenColumns; public ComponentPresetTable(final ComponentPreset.Type presetType, List presets, List> visibleColumnKeys) { super(); @@ -54,7 +56,7 @@ public class ComponentPresetTable extends JTable { this.columns = new ComponentPresetTableColumn[ComponentPreset.ORDERED_KEY_LIST.size() + 1]; - tableModel = new AbstractTableModel() { + this.tableModel = new AbstractTableModel() { final ComponentPresetTableColumn[] myColumns = columns; @Override @@ -97,17 +99,16 @@ public class ComponentPresetTable extends JTable { }; - sorter = new TableRowSorter(tableModel); - - tableColumnModel = new XTableColumnModel(); + this.sorter = new TableRowSorter(tableModel); + this.tableColumnModel = new XTableColumnModel(); /* * Set up the Column Table model, and customize the sorting. */ - columns[0] = new ComponentPresetTableColumn.Favorite(0); - tableColumnModel.addColumn(columns[0]); + this.columns[0] = new ComponentPresetTableColumn.Favorite(0); + this.tableColumnModel.addColumn(columns[0]); - List hiddenColumns = new ArrayList(); + this.hiddenColumns = new ArrayList<>(); { int index = 1; for (final TypedKey key : ComponentPreset.ORDERED_KEY_LIST) { @@ -144,7 +145,7 @@ public class ComponentPresetTable extends JTable { }); } - if (visibleColumnKeys.indexOf(key) < 0) { + if (!visibleColumnKeys.contains(key)) { hiddenColumns.add(columns[index]); } index++; @@ -156,10 +157,10 @@ public class ComponentPresetTable extends JTable { this.setModel(tableModel); this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.setRowSorter(sorter); - sorter.toggleSortOrder(2); // Sort by the first column (manufacturer) by default + this.sorter.toggleSortOrder(2); // Sort by the first column (manufacturer) by default - for (TableColumn hiddenColumn : hiddenColumns) { - tableColumnModel.setColumnVisible(hiddenColumn, false); + for (TableColumn hiddenColumn : this.hiddenColumns) { + this.tableColumnModel.setColumnVisible(hiddenColumn, false); } JTableHeader header = this.getTableHeader(); @@ -185,7 +186,7 @@ public class ComponentPresetTable extends JTable { } public XTableColumnModel getXColumnModel() { - return tableColumnModel; + return this.tableColumnModel; } public void setRowFilter(RowFilter filter) { @@ -231,6 +232,9 @@ public class ComponentPresetTable extends JTable { } } for (TableColumn c : columns) { + if (hiddenColumns.contains(c)) { + continue; + } JCheckBoxMenuItem item = new ToggleColumnMenuItem(c); this.add(item); } From 4ab28ac27613c186a4eed8ead77ea03f83d8a61f Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 19:06:07 +0200 Subject: [PATCH 03/28] Update legacy checkbox when legacy column visibility changes --- .../preset/ComponentPresetChooserDialog.java | 43 ++++++++++++++++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java index bdc5230a1..2f8e8fcf3 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java @@ -22,8 +22,12 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.RowFilter; +import javax.swing.event.ChangeEvent; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.TableColumnModelEvent; +import javax.swing.event.TableColumnModelListener; import javax.swing.table.TableColumn; import javax.swing.table.TableModel; @@ -245,12 +249,41 @@ public class ComponentPresetChooserDialog extends JDialog { panel.add(showLegacyCheckBox, "wrap"); showLegacyCheckBox.addItemListener(new ItemListener() { - @Override - public void itemStateChanged(ItemEvent e) { - updateFilters(); - tm.setColumnVisible(legacyColumn, showLegacyCheckBox.isSelected()); + @Override + public void itemStateChanged(ItemEvent e) { + updateFilters(); + tm.setColumnVisible(legacyColumn, showLegacyCheckBox.isSelected()); + } + }); + + // When the legacy column changes visibility (by right-clicking on the column header and toggling the legacy header checkbox), + // update the main legacy checkbox + tm.addColumnModelListener(new TableColumnModelListener() { + @Override + public void columnAdded(TableColumnModelEvent e) { + TableColumn column = tm.getColumn(e.getToIndex()); + if (column == legacyColumn) { + showLegacyCheckBox.setSelected(true); } - }); + } + + @Override + public void columnRemoved(TableColumnModelEvent e) { + // Use 'getFromIndex' since the column has been removed + if (e.getFromIndex() == legacyColumnIndex) { + showLegacyCheckBox.setSelected(false); + } + } + + @Override + public void columnMoved(TableColumnModelEvent e) {} + + @Override + public void columnMarginChanged(ChangeEvent e) {} + + @Override + public void columnSelectionChanged(ListSelectionEvent e) {} + }); if(component instanceof SymmetricComponent) { final SymmetricComponent curSym = (SymmetricComponent) component; From d0f3f7b34572608c2a8ee4ed9daf4018d4a1e523 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 22:12:20 +0200 Subject: [PATCH 04/28] More robust column remembering --- .../src/net/sf/openrocket/gui/util/GUIUtil.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/util/GUIUtil.java b/swing/src/net/sf/openrocket/gui/util/GUIUtil.java index 687eedf53..70e5ae806 100644 --- a/swing/src/net/sf/openrocket/gui/util/GUIUtil.java +++ b/swing/src/net/sf/openrocket/gui/util/GUIUtil.java @@ -19,6 +19,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; +import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -56,6 +57,7 @@ import javax.swing.event.ChangeListener; import javax.swing.table.AbstractTableModel; import javax.swing.table.DefaultTableColumnModel; import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; import javax.swing.table.TableModel; import javax.swing.tree.DefaultMutableTreeNode; @@ -404,23 +406,24 @@ public class GUIUtil { public static void rememberTableColumnWidths(final JTable table, String keyName) { final String key = keyName == null ? table.getClass().getName() : keyName; - for (int i = 0; i < table.getColumnCount(); i++) { - final int column = i; - table.getColumnModel().getColumn(i).addPropertyChangeListener(new PropertyChangeListener() { + Enumeration columns = table.getColumnModel().getColumns(); + while (columns.hasMoreElements()) { + TableColumn column = columns.nextElement(); + column.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals("width")) { - log.debug("Storing width of " + table.getName() + "-" + table.getColumnName(column) + ": " + table.getColumnModel().getColumn(column).getWidth()); + log.debug("Storing width of " + table.getName() + "-" + column + ": " + column.getWidth()); ((SwingPreferences) Application.getPreferences()).setTableColumnWidth( - key, column, table.getColumnModel().getColumn(column).getWidth()); + key, column.getModelIndex(), column.getWidth()); } } }); final Integer width = ((SwingPreferences) Application.getPreferences()).getTableColumnWidth( - key, column); + key, column.getModelIndex()); if (width != null) { - table.getColumnModel().getColumn(column).setPreferredWidth(width); + column.setPreferredWidth(width); } } } From e342574ef32315e39a557cd3bd11f117e9baa433 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 22:14:54 +0200 Subject: [PATCH 05/28] Use optimal width if no width found --- .../net/sf/openrocket/gui/util/GUIUtil.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/swing/src/net/sf/openrocket/gui/util/GUIUtil.java b/swing/src/net/sf/openrocket/gui/util/GUIUtil.java index 70e5ae806..e11f5fe81 100644 --- a/swing/src/net/sf/openrocket/gui/util/GUIUtil.java +++ b/swing/src/net/sf/openrocket/gui/util/GUIUtil.java @@ -424,6 +424,8 @@ public class GUIUtil { key, column.getModelIndex()); if (width != null) { column.setPreferredWidth(width); + } else { + column.setPreferredWidth(getOptimalColumnWidth(table, column.getModelIndex())); } } } @@ -431,6 +433,24 @@ public class GUIUtil { public static void rememberTableColumnWidths(final JTable table) { rememberTableColumnWidths(table, null); } + + public static int getOptimalColumnWidth(JTable table, int columnIndex) { + TableColumn column = table.getColumnModel().getColumn(columnIndex); + Component headerRenderer = table.getTableHeader().getDefaultRenderer() + .getTableCellRendererComponent(table, column.getHeaderValue(), false, false, 0, columnIndex); + + int maxWidth = headerRenderer.getPreferredSize().width; + + for (int row = 0; row < table.getRowCount(); row++) { + Component renderer = table.getCellRenderer(row, columnIndex) + .getTableCellRendererComponent(table, table.getValueAt(row, columnIndex), false, false, row, columnIndex); + maxWidth = Math.max(maxWidth, renderer.getPreferredSize().width); + } + + // Optional: Add some padding + int padding = 5; // adjust this value as needed + return maxWidth + padding; + } /** From 9d6d8f25b7b1764a61d4f6fbfd4a15e2beaeb652 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 22:17:39 +0200 Subject: [PATCH 06/28] More reasonable legacy column default width --- .../gui/dialogs/preset/ComponentPresetChooserDialog.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java index 2f8e8fcf3..147af6f52 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java @@ -253,6 +253,12 @@ public class ComponentPresetChooserDialog extends JDialog { public void itemStateChanged(ItemEvent e) { updateFilters(); tm.setColumnVisible(legacyColumn, showLegacyCheckBox.isSelected()); + + if (showLegacyCheckBox.isSelected()) { + // Let's say the optimal width is 100 (you can adjust this as needed) + int optimalWidth = 50; + legacyColumn.setPreferredWidth(optimalWidth); + } } }); From d6b5034764e4e3b932d9b402c4f81549aa82d585 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 22:23:07 +0200 Subject: [PATCH 07/28] Don't do anything if legacy column already in right state --- .../preset/ComponentPresetChooserDialog.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java index 147af6f52..8a6203ca9 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java @@ -251,10 +251,17 @@ public class ComponentPresetChooserDialog extends JDialog { showLegacyCheckBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { - updateFilters(); - tm.setColumnVisible(legacyColumn, showLegacyCheckBox.isSelected()); + boolean selected = e != null && e.getStateChange() == ItemEvent.SELECTED; + if (tm.isColumnVisible(legacyColumn) == selected) { + // No change + return; + } - if (showLegacyCheckBox.isSelected()) { + updateFilters(); + + tm.setColumnVisible(legacyColumn, selected); + + if (selected) { // Let's say the optimal width is 100 (you can adjust this as needed) int optimalWidth = 50; legacyColumn.setPreferredWidth(optimalWidth); From a9c328d8b1fdf4b391d3ccdbdf58b9371f63cb61 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 19 Sep 2023 22:30:39 +0200 Subject: [PATCH 08/28] Use radio buttons for units buttons --- .../dialogs/preset/ComponentPresetTable.java | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java index 1b50983e1..6b32bd009 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetTable.java @@ -1,5 +1,7 @@ package net.sf.openrocket.gui.dialogs.preset; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.MouseAdapter; @@ -7,13 +9,14 @@ import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import java.util.Enumeration; import java.util.List; import java.util.Set; +import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; import javax.swing.JMenu; import javax.swing.JPopupMenu; +import javax.swing.JRadioButtonMenuItem; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.RowFilter; @@ -286,33 +289,38 @@ public class ComponentPresetTable extends JTable { } } - private class UnitSelectorMenuItem extends JMenu implements ItemListener { + private class UnitSelectorMenuItem extends JMenu { ComponentPresetTableColumn.DoubleWithUnit col; + ButtonGroup buttonGroup; // To group the radio buttons UnitSelectorMenuItem(ComponentPresetTableColumn.DoubleWithUnit col) { super(trans.get("ComponentPresetChooserDialog.menu.units")); this.col = col; + + buttonGroup = new ButtonGroup(); // Create a new ButtonGroup to hold the radio buttons + UnitGroup group = col.unitGroup; Unit selectedUnit = col.selectedUnit; + for (Unit u : group.getUnits()) { - JCheckBoxMenuItem item = new JCheckBoxMenuItem(u.toString()); + JRadioButtonMenuItem item = new JRadioButtonMenuItem(u.toString()); + if (u == selectedUnit) { item.setSelected(true); } - item.addItemListener(this); - this.add(item); + + item.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + col.selectedUnit = u; + ComponentPresetTable.this.tableModel.fireTableDataChanged(); + } + }); + + buttonGroup.add(item); // Add the radio button to the button group + this.add(item); // Add the radio button to the menu } - } - - @Override - public void itemStateChanged(ItemEvent e) { - JCheckBoxMenuItem item = (JCheckBoxMenuItem) e.getItem(); - String val = item.getText(); - col.selectedUnit = col.unitGroup.findApproximate(val); - ComponentPresetTable.this.tableModel.fireTableDataChanged(); - } - } } } From 248ca23a502074f6b57b43bd1ba4678ed3097970 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Fri, 22 Sep 2023 11:56:05 +0200 Subject: [PATCH 09/28] [#2344] Optimize UI color fetching --- .../gui/scalefigure/FinPointFigure.java | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java b/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java index cf5662574..a8688bec7 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.scalefigure; import java.awt.BasicStroke; +import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; @@ -56,6 +57,12 @@ public class FinPointFigure extends AbstractScaleFigure { private Rectangle2D.Double[] finPointHandles = null; private int selectedIndex = -1; + + private static Color finPointBodyLineColor; + private static Color finPointGridMajorLineColor; + private static Color finPointGridMinorLineColor; + private static Color finPointPointColor; + private static Color finPointSelectedPointColor; public FinPointFigure(FreeformFinSet finset) { this.finset = finset; @@ -63,9 +70,18 @@ public class FinPointFigure extends AbstractScaleFigure { setBackground(GUIUtil.getUITheme().getBackgroundColor()); setOpaque(true); + updateColors(); updateFigure(); } + private static void updateColors() { + finPointBodyLineColor = GUIUtil.getUITheme().getFinPointBodyLineColor(); + finPointGridMajorLineColor = GUIUtil.getUITheme().getFinPointGridMajorLineColor(); + finPointGridMinorLineColor = GUIUtil.getUITheme().getFinPointGridMinorLineColor(); + finPointPointColor = GUIUtil.getUITheme().getFinPointPointColor(); + finPointSelectedPointColor = GUIUtil.getUITheme().getFinPointSelectedPointColor(); + } + @Override public Point getAutoZoomPoint(){ return new Point( Math.max(0, (originLocation_px.x - borderThickness_px.width)), 0); @@ -122,11 +138,11 @@ public class FinPointFigure extends AbstractScaleFigure { Line2D.Double line = new Line2D.Double(); for (Tick t : verticalTicks) { if (t.major) { - g2.setColor(GUIUtil.getUITheme().getFinPointGridMajorLineColor()); + g2.setColor(finPointGridMajorLineColor); line.setLine( t.value, y0, t.value, y1); g2.draw(line); }else{ - g2.setColor(GUIUtil.getUITheme().getFinPointGridMinorLineColor()); + g2.setColor(finPointGridMinorLineColor); line.setLine( t.value, y0, t.value, y1); g2.draw(line); } @@ -136,11 +152,11 @@ public class FinPointFigure extends AbstractScaleFigure { Tick[] horizontalTicks = unit.getTicks(y0, y1, MINOR_TICKS / this.scale, MAJOR_TICKS / this.scale); for (Tick t : horizontalTicks) { if (t.major) { - g2.setColor(GUIUtil.getUITheme().getFinPointGridMajorLineColor()); + g2.setColor(finPointGridMajorLineColor); line.setLine( x0, t.value, x1, t.value); g2.draw(line); }else{ - g2.setColor(GUIUtil.getUITheme().getFinPointGridMinorLineColor()); + g2.setColor(finPointGridMinorLineColor); line.setLine( x0, t.value, x1, t.value); g2.draw(line); } @@ -163,7 +179,7 @@ public class FinPointFigure extends AbstractScaleFigure { // setup lines final float bodyLineWidth = (float) ( LINE_WIDTH_BODY_PIXELS / scale ); g2.setStroke(new BasicStroke( bodyLineWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); - g2.setColor(GUIUtil.getUITheme().getFinPointBodyLineColor()); + g2.setColor(finPointBodyLineColor); Transition body = (Transition) finset.getParent(); final float xResolution_m = 0.01f; // distance between draw points, in meters @@ -213,7 +229,7 @@ public class FinPointFigure extends AbstractScaleFigure { final float bodyLineWidth = (float) ( LINE_WIDTH_BODY_PIXELS / scale ); g2.setStroke(new BasicStroke( bodyLineWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); - g2.setColor(GUIUtil.getUITheme().getFinPointBodyLineColor()); + g2.setColor(finPointBodyLineColor); g2.draw(shape); } @@ -230,12 +246,12 @@ public class FinPointFigure extends AbstractScaleFigure { final float finEdgeWidth_m = (float) (LINE_WIDTH_FIN_PIXELS / scale ); g2.setStroke(new BasicStroke( finEdgeWidth_m, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); - g2.setColor(GUIUtil.getUITheme().getFinPointBodyLineColor()); + g2.setColor(finPointBodyLineColor); g2.draw(shape); } private void paintFinHandles(final Graphics2D g2) { - // excludes fin tab points + // Excludes fin tab points final Coordinate[] drawPoints = finset.getFinPoints(); // Fin point boxes @@ -244,7 +260,7 @@ public class FinPointFigure extends AbstractScaleFigure { final float boxEdgeWidth_m = (float) ( LINE_WIDTH_BOX_PIXELS / scale ); g2.setStroke(new BasicStroke( boxEdgeWidth_m, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); - g2.setColor(GUIUtil.getUITheme().getFinPointPointColor()); + g2.setColor(finPointPointColor); finPointHandles = new Rectangle2D.Double[ drawPoints.length]; for (int currentIndex = 0; currentIndex < drawPoints.length; currentIndex++) { @@ -256,15 +272,15 @@ public class FinPointFigure extends AbstractScaleFigure { final Rectangle2D.Double selectedPointHighlight = new Rectangle2D.Double(c.x - selBoxHalfWidth, c.y - selBoxHalfWidth, selBoxWidth, selBoxWidth); - // switch to the highlight color - g2.setColor(GUIUtil.getUITheme().getFinPointSelectedPointColor()); + // Switch to the highlight color + g2.setColor(finPointSelectedPointColor); g2.draw(selectedPointHighlight); - // reset to the normal color - g2.setColor(GUIUtil.getUITheme().getFinPointPointColor()); + // Reset to the normal color + g2.setColor(finPointPointColor); } - // normal boxes + // Normal boxes finPointHandles[currentIndex] = new Rectangle2D.Double(c.x - boxHalfWidth, c.y - boxHalfWidth, boxWidth, boxWidth); g2.draw(finPointHandles[currentIndex]); From ebb4186ccb0f5ad8de9f092cd6ee28d54daac0db Mon Sep 17 00:00:00 2001 From: SiboVG Date: Fri, 22 Sep 2023 18:21:49 +0200 Subject: [PATCH 10/28] Refactor UI theme elements to update from listener --- .../file/wavefrontobj/OBJOptionChooser.java | 19 +++++- .../openrocket/gui/components/BasicTree.java | 19 +++++- .../gui/components/DescriptionArea.java | 19 +++++- .../openrocket/gui/components/URLLabel.java | 19 +++++- .../gui/configdialog/InnerTubeConfig.java | 14 ++++- .../configdialog/RocketComponentConfig.java | 27 ++++++-- .../gui/configdialog/RocketConfig.java | 21 ++++++- .../CustomExpressionPanel.java | 42 +++++++++++-- .../gui/dialogs/BugReportDialog.java | 18 +++++- .../gui/dialogs/ComponentAnalysisDialog.java | 35 ++++++++++- .../gui/dialogs/DebugLogDialog.java | 21 ++++++- .../gui/dialogs/ErrorWarningDialog.java | 31 ++++++++-- .../gui/dialogs/UpdateInfoDialog.java | 19 +++++- .../openrocket/gui/dialogs/WarningDialog.java | 20 +++++- .../openrocket/gui/dialogs/WelcomeDialog.java | 20 +++++- .../RenameConfigDialog.java | 19 +++++- .../motor/thrustcurve/MotorFilterPanel.java | 23 +++++-- .../thrustcurve/MotorInformationPanel.java | 28 +++++++-- .../ThrustCurveMotorSelectionPanel.java | 17 +++++- .../optimization/SimulationModifierTree.java | 35 +++++++++-- .../preferences/LaunchPreferencesPanel.java | 18 +++++- .../SimulationPreferencesPanel.java | 19 +++++- .../gui/figure3d/RocketFigure3d.java | 21 ++++++- .../gui/figureelements/CGCaret.java | 18 +++++- .../gui/figureelements/CPCaret.java | 18 +++++- .../gui/figureelements/RocketInfo.java | 52 +++++++++++----- .../gui/help/tours/SlideSetManager.java | 18 +++++- .../gui/help/tours/SlideShowComponent.java | 21 ++++++- .../sf/openrocket/gui/main/DesignPanel.java | 19 +++++- .../componenttree/ComponentTreeRenderer.java | 61 +++++++++++++++---- .../FlightConfigurablePanel.java | 30 +++++++-- .../gui/plot/SimulationPlotDialog.java | 23 ++++++- .../gui/scalefigure/AbstractScaleFigure.java | 18 +++++- .../gui/scalefigure/FinPointFigure.java | 15 ++++- .../gui/scalefigure/RocketFigure.java | 22 ++++++- .../gui/scalefigure/ScaleScrollPane.java | 20 +++++- .../simulation/SimulationOptionsPanel.java | 25 +++++++- .../gui/simulation/SimulationPlotPanel.java | 29 +++++++-- .../gui/util/BetterListCellRenderer.java | 29 +++++++-- .../net/sf/openrocket/gui/util/UITheme.java | 29 +++++++++ .../extension/impl/JavaCodeConfigurator.java | 20 +++++- 41 files changed, 874 insertions(+), 117 deletions(-) diff --git a/swing/src/net/sf/openrocket/file/wavefrontobj/OBJOptionChooser.java b/swing/src/net/sf/openrocket/file/wavefrontobj/OBJOptionChooser.java index d23149313..ec42ad0a0 100644 --- a/swing/src/net/sf/openrocket/file/wavefrontobj/OBJOptionChooser.java +++ b/swing/src/net/sf/openrocket/file/wavefrontobj/OBJOptionChooser.java @@ -5,6 +5,7 @@ import net.sf.openrocket.file.wavefrontobj.export.OBJExportOptions; import net.sf.openrocket.gui.SpinnerEditor; import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.ComponentAssembly; import net.sf.openrocket.rocketcomponent.Rocket; @@ -27,6 +28,7 @@ import javax.swing.JToggleButton; import javax.swing.UIManager; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import java.awt.Color; import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -64,6 +66,12 @@ public class OBJOptionChooser extends JPanel { private int totallyNormalCounter = 0; + private static Color darkWarningColor; + + static { + initColors(); + } + public OBJOptionChooser(JComponent parent, OBJExportOptions opts, List selectedComponents, Rocket rocket) { super(new MigLayout("hidemode 3")); @@ -305,13 +313,22 @@ public class OBJOptionChooser extends JPanel { loadOptions(opts); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(OBJOptionChooser::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + } + /** * Highlight the given button and un-highlight the other button. * @param highlightButton The button to highlight * @param loserButton The button to un-highlight */ private void highlightButton(JButton highlightButton, JButton loserButton) { - highlightButton.setBorder(BorderFactory.createLineBorder(GUIUtil.getUITheme().getDarkWarningColor())); + highlightButton.setBorder(BorderFactory.createLineBorder(darkWarningColor)); loserButton.setBorder(UIManager.getBorder("Button.border")); } diff --git a/swing/src/net/sf/openrocket/gui/components/BasicTree.java b/swing/src/net/sf/openrocket/gui/components/BasicTree.java index c3d75231e..6da216522 100644 --- a/swing/src/net/sf/openrocket/gui/components/BasicTree.java +++ b/swing/src/net/sf/openrocket/gui/components/BasicTree.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.components; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import java.awt.BasicStroke; import java.awt.Color; @@ -16,6 +17,12 @@ import javax.swing.tree.TreePath; @SuppressWarnings("serial") public class BasicTree extends JTree { + private static Color backgroundColor; + + static { + initColors(); + } + public BasicTree() { super(); setDefaultOptions(); @@ -37,10 +44,18 @@ public class BasicTree extends JTree { plainUI.setLeftChildIndent(15); - this.setBackground(GUIUtil.getUITheme().getBackgroundColor()); + this.setBackground(backgroundColor); this.setShowsRootHandles(false); } - + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(BasicTree::updateColors); + } + + private static void updateColors() { + backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); + } /** * Expand the entire tree structure. All nodes will be visible after the call. diff --git a/swing/src/net/sf/openrocket/gui/components/DescriptionArea.java b/swing/src/net/sf/openrocket/gui/components/DescriptionArea.java index 947f70335..edc39f6f7 100644 --- a/swing/src/net/sf/openrocket/gui/components/DescriptionArea.java +++ b/swing/src/net/sf/openrocket/gui/components/DescriptionArea.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.components; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.util.URLUtil; import java.awt.Color; @@ -16,6 +17,7 @@ import java.io.File; import java.io.FileOutputStream; import javax.swing.JTextPane; +import javax.swing.border.Border; import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; import javax.swing.text.SimpleAttributeSet; @@ -33,6 +35,12 @@ public class DescriptionArea extends JScrollPane { private final JEditorPane editorPane; private final float size; + + private static Border border; + + static { + initColors(); + } /** @@ -177,11 +185,20 @@ public class DescriptionArea extends JScrollPane { dim.height = lineheight * rows + extraheight + 2; this.setPreferredSize(dim); - editorPane.setBorder(GUIUtil.getUITheme().getBorder()); + editorPane.setBorder(border); this.setViewportView(editorPane); this.setText(text); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(DescriptionArea::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } public void setText(String txt) { // Set the font size (we can't simply set the font to change the font size, because we're using text/html) diff --git a/swing/src/net/sf/openrocket/gui/components/URLLabel.java b/swing/src/net/sf/openrocket/gui/components/URLLabel.java index 3d9a45321..cc64b9b50 100644 --- a/swing/src/net/sf/openrocket/gui/components/URLLabel.java +++ b/swing/src/net/sf/openrocket/gui/components/URLLabel.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.components; +import java.awt.Color; import java.awt.Cursor; import java.awt.Desktop; import java.awt.event.MouseAdapter; @@ -9,6 +10,7 @@ import java.util.HashMap; import java.util.Map; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.util.URLUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -22,6 +24,12 @@ import org.slf4j.LoggerFactory; public class URLLabel extends SelectableLabel { private static final Logger log = LoggerFactory.getLogger(URLLabel.class); + private static Color URLColor; + + static { + initColors(); + } + /** * Create a label showing the url it will direct to. * @@ -48,7 +56,7 @@ public class URLLabel extends SelectableLabel { Map map = new HashMap(); map.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); this.setFont(this.getFont().deriveFont(map)); - this.setForeground(GUIUtil.getUITheme().getURLColor()); + this.setForeground(URLColor); this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -66,4 +74,13 @@ public class URLLabel extends SelectableLabel { } } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(URLLabel::updateColors); + } + + private static void updateColors() { + URLColor = GUIUtil.getUITheme().getURLColor(); + } } diff --git a/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java index 98709e734..d3c267ff1 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java @@ -41,6 +41,7 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.DescriptionArea; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.widgets.SelectColorButton; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; @@ -467,15 +468,15 @@ class ClusterSelectionPanel extends JPanel { private static final int MOTOR_DIAMETER = 10; private static final Color SELECTED_COLOR; - private static final Color UNSELECTED_COLOR; + private static Color UNSELECTED_COLOR; private static final Color MOTOR_FILL_COLOR; private static final Color MOTOR_BORDER_COLOR; static { SELECTED_COLOR = Color.RED; - UNSELECTED_COLOR = GUIUtil.getUITheme().getBackgroundColor(); MOTOR_FILL_COLOR = Color.GREEN; MOTOR_BORDER_COLOR = Color.BLACK; + initColors(); } public ClusterSelectionPanel(Clusterable component) { @@ -495,6 +496,15 @@ class ClusterSelectionPanel extends JPanel { } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ClusterSelectionPanel::updateColors); + } + + private static void updateColors() { + UNSELECTED_COLOR = GUIUtil.getUITheme().getBackgroundColor(); + } + private class ClusterButton extends JPanel implements StateChangeListener, MouseListener, Resettable { diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java index e5a985341..a62a0e969 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java @@ -30,6 +30,7 @@ import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.SwingUtilities; +import javax.swing.border.Border; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -49,6 +50,7 @@ import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.dialogs.preset.ComponentPresetChooserDialog; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.Icons; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.widgets.IconToggleButton; import net.sf.openrocket.gui.widgets.SelectColorButton; import net.sf.openrocket.l10n.Translator; @@ -97,6 +99,13 @@ public class RocketComponentConfig extends JPanel { private boolean allSameType; // Checks whether all listener components are of the same type as private boolean allMassive; // Checks whether all listener components, and this component, are massive + private static Color darkWarningColor; + private static Border border; + + static { + initColors(); + } + public RocketComponentConfig(OpenRocketDocument document, RocketComponent component, JDialog parent) { setLayout(new MigLayout("fill, gap 4!, ins panel, hidemode 3", "[]:5[]", "[growprio 5]5![fill, grow, growprio 500]5![growprio 5]")); @@ -187,6 +196,16 @@ public class RocketComponentConfig extends JPanel { updateFields(); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(RocketComponentConfig::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + border = GUIUtil.getUITheme().getBorder(); + } + /** * Add a section to the component configuration dialog that displays information about the component. */ @@ -506,7 +525,7 @@ public class RocketComponentConfig extends JPanel { StyledLabel labelMassOverriddenBy = new StyledLabel( String.format(trans.get("RocketCompCfg.lbl.MassOverriddenBy"), component.getMassOverriddenBy().getName()), 0, StyledLabel.Style.BOLD); - labelMassOverriddenBy.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + labelMassOverriddenBy.setFontColor(darkWarningColor); labelMassOverriddenBy.setToolTipText( String.format(trans.get("RocketCompCfg.lbl.MassOverriddenBy.ttip"), component.getMassOverriddenBy().getName())); checkboxes.add(labelMassOverriddenBy, "gapleft 25lp, wrap"); @@ -569,7 +588,7 @@ public class RocketComponentConfig extends JPanel { StyledLabel labelCGOverriddenBy = new StyledLabel( String.format(trans.get("RocketCompCfg.lbl.CGOverriddenBy"), component.getCGOverriddenBy().getName()), 0, StyledLabel.Style.BOLD); - labelCGOverriddenBy.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + labelCGOverriddenBy.setFontColor(darkWarningColor); labelCGOverriddenBy.setToolTipText( String.format(trans.get("RocketCompCfg.lbl.CGOverriddenBy.ttip"), component.getCGOverriddenBy().getName())); checkboxes.add(labelCGOverriddenBy, "gapleft 25lp, wrap"); @@ -663,7 +682,7 @@ public class RocketComponentConfig extends JPanel { StyledLabel labelCDOverriddenBy = new StyledLabel( String.format(trans.get("RocketCompCfg.lbl.CDOverriddenBy"), component.getCDOverriddenBy().getName()), 0, StyledLabel.Style.BOLD); - labelCDOverriddenBy.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + labelCDOverriddenBy.setFontColor(darkWarningColor); labelCDOverriddenBy.setToolTipText( String.format(trans.get("RocketCompCfg.lbl.CDOverriddenBy"), component.getCDOverriddenBy().getName())); checkboxes.add(labelCDOverriddenBy, "gapleft 25lp, wrap"); @@ -719,7 +738,7 @@ public class RocketComponentConfig extends JPanel { commentTextArea.setLineWrap(true); commentTextArea.setWrapStyleWord(true); commentTextArea.setEditable(true); - commentTextArea.setBorder(GUIUtil.getUITheme().getBorder()); + commentTextArea.setBorder(border); GUIUtil.setTabToFocusing(commentTextArea); commentTextArea.addFocusListener(textFieldListener); commentTextArea.addKeyListener(new TextComponentSelectionKeyListener(commentTextArea)); diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java index 9835778ca..0b7bd3df4 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketConfig.java @@ -16,10 +16,12 @@ import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; +import javax.swing.border.Border; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; @@ -34,6 +36,12 @@ public class RocketConfig extends RocketComponentConfig { private JTextArea revisionTextArea; private final Rocket rocket; + + private static Border border; + + static { + initColors(); + } public RocketConfig(OpenRocketDocument d, RocketComponent c, JDialog parent) { super(d, c, parent); @@ -55,7 +63,7 @@ public class RocketConfig extends RocketComponentConfig { designerTextArea.setLineWrap(true); designerTextArea.setWrapStyleWord(true); designerTextArea.setEditable(true); - designerTextArea.setBorder(GUIUtil.getUITheme().getBorder()); + designerTextArea.setBorder(border); GUIUtil.setTabToFocusing(designerTextArea); designerTextArea.addFocusListener(textFieldListener); this.add(new JScrollPane(designerTextArea), "wmin 400lp, height 60lp:60lp:, grow 30, wrap para"); @@ -70,7 +78,7 @@ public class RocketConfig extends RocketComponentConfig { revisionTextArea.setLineWrap(true); revisionTextArea.setWrapStyleWord(true); revisionTextArea.setEditable(true); - revisionTextArea.setBorder(GUIUtil.getUITheme().getBorder()); + revisionTextArea.setBorder(border); GUIUtil.setTabToFocusing(revisionTextArea); revisionTextArea.addFocusListener(textFieldListener); @@ -81,6 +89,15 @@ public class RocketConfig extends RocketComponentConfig { addEasterEgg(); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(RocketConfig::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } + /** * Little method that adds a fun easter-egg to the rocket config dialog. */ diff --git a/swing/src/net/sf/openrocket/gui/customexpression/CustomExpressionPanel.java b/swing/src/net/sf/openrocket/gui/customexpression/CustomExpressionPanel.java index c37e8ed2b..8470a6a9a 100644 --- a/swing/src/net/sf/openrocket/gui/customexpression/CustomExpressionPanel.java +++ b/swing/src/net/sf/openrocket/gui/customexpression/CustomExpressionPanel.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.customexpression; +import java.awt.Color; import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -15,10 +16,12 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; +import javax.swing.border.Border; import javax.swing.filechooser.FileNameExtensionFilter; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,7 +45,13 @@ public class CustomExpressionPanel extends JPanel { private JPanel expressionSelectorPanel; private OpenRocketDocument doc; - + + private static Border border; + + static { + initColors(); + } + public CustomExpressionPanel(final OpenRocketDocument doc, final JDialog parentDialog) { super(new MigLayout("fill")); this.doc = doc; @@ -51,7 +60,7 @@ public class CustomExpressionPanel extends JPanel { expressionSelectorPanel.setToolTipText(trans.get("customExpressionPanel.lbl.CalcNote")); JScrollPane scroll = new JScrollPane(expressionSelectorPanel); - expressionSelectorPanel.setBorder(GUIUtil.getUITheme().getBorder()); + expressionSelectorPanel.setBorder(border); //Border bdr = BorderFactory.createTitledBorder(trans.get("customExpressionPanel.lbl.CustomExpressions")); //scroll.setBorder(bdr); @@ -131,7 +140,16 @@ public class CustomExpressionPanel extends JPanel { updateExpressions(); } - + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(CustomExpressionPanel::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } + /* * Update the expressionSelectorPanel */ @@ -171,10 +189,24 @@ public class CustomExpressionPanel extends JPanel { * A JPanel which configures a single expression */ private class SingleExpression extends JPanel { + private static Color backgroundColor; + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SingleExpression::updateColors); + } + + static { + initColors(); + } + + private static void updateColors() { + backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); + } // Convenience method to make the labels consistent private JLabel setLabelStyle(JLabel l) { - l.setBackground(GUIUtil.getUITheme().getBackgroundColor()); + l.setBackground(backgroundColor); l.setOpaque(true); l.setBorder(BorderFactory.createRaisedBevelBorder()); l.setText(" " + l.getText() + " "); @@ -192,7 +224,7 @@ public class CustomExpressionPanel extends JPanel { JLabel symbolLabel = new JLabel(trans.get("customExpression.Symbol") + " :"); JLabel symbol = new JLabel(expression.getSymbol()); symbol = setLabelStyle(symbol); - symbol.setBackground(GUIUtil.getUITheme().getBackgroundColor()); + symbol.setBackground(backgroundColor); JLabel unitLabel = new JLabel(trans.get("customExpression.Units") + " :"); UnitSelector unitSelector = new UnitSelector(expression.getType().getUnitGroup()); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java index 117384b51..7e9818629 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java @@ -29,6 +29,7 @@ import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.URLLabel; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogLevelBufferLogger; import net.sf.openrocket.logging.LogLine; @@ -47,6 +48,12 @@ public class BugReportDialog extends JDialog { private static final Translator trans = Application.getTranslator(); private static final SwingPreferences preferences = (SwingPreferences) Application.getPreferences(); + + private static Color darkWarningColor; + + static { + initColors(); + } public BugReportDialog(Window parent, String labelText, final String message, final boolean sendIfUnchanged) { @@ -103,6 +110,15 @@ public class BugReportDialog extends JDialog { GUIUtil.setDisposableDialogOptions(this, close); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(BugReportDialog::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + } /** * Show a general bug report dialog allowing the user to input information about @@ -178,7 +194,7 @@ public class BugReportDialog extends JDialog { private static void addBugReportInformation(StringBuilder sb) { sb.append("---------- Bug report ----------\n"); sb.append('\n'); - Color color = GUIUtil.getUITheme().getDarkWarningColor(); + Color color = darkWarningColor; sb.append(String.format("Please include a description about what actions you were " + "performing when the exception occurred:\n", color.getRed(), color.getGreen(), color.getBlue())); sb.append("(You can edit text directly in this window)\n"); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java index 2a9d598d7..e91a4af75 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java @@ -33,6 +33,7 @@ import javax.swing.ListSelectionModel; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.UIManager; +import javax.swing.border.Border; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.table.DefaultTableCellRenderer; @@ -41,6 +42,7 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.aerodynamics.AerodynamicCalculator; import net.sf.openrocket.aerodynamics.AerodynamicForces; import net.sf.openrocket.aerodynamics.FlightConditions; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.logging.Warning; import net.sf.openrocket.logging.WarningSet; import net.sf.openrocket.gui.adaptors.Column; @@ -97,6 +99,12 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe private final List dragData = new ArrayList(); private final List rollData = new ArrayList(); + private static Border border; + + static { + initColors(); + } + public ComponentAnalysisDialog(final RocketPanel rocketPanel) { ////Component analysis @@ -150,7 +158,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe warningList = new JList<>(); JScrollPane scrollPane = new JScrollPane(warningList); - warningList.setBorder(GUIUtil.getUITheme().getBorder()); + warningList.setBorder(border); ////Warnings: scrollPane.setBorder(BorderFactory.createTitledBorder(trans.get("componentanalysisdlg.TitledBorder.warnings"))); panel.add(scrollPane, "gap paragraph, spany 4, w 300lp, grow, height :100lp:, wrap"); @@ -499,6 +507,14 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ComponentAnalysisDialog::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } /** * Updates the data in the table and fires a table data change event. @@ -626,6 +642,12 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe private final List data; protected final int decimalPlaces; + private static Color backgroundColor; + + static { + initColors(); + } + public CustomCellRenderer(List data, int decimalPlaces) { super(); this.decimalPlaces = decimalPlaces; @@ -634,6 +656,15 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe this.boldFont = normalFont.deriveFont(Font.BOLD); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(CustomCellRenderer::updateColors); + } + + private static void updateColors() { + backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); + } + @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { @@ -647,7 +678,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe } label.setOpaque(true); - label.setBackground(GUIUtil.getUITheme().getBackgroundColor()); + label.setBackground(backgroundColor); label.setHorizontalAlignment(SwingConstants.LEFT); if ((row < 0) || (row >= data.size())) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java index 26bbd5ddf..9fe13d2d0 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java @@ -32,12 +32,14 @@ import javax.swing.ListSelectionModel; import javax.swing.RowFilter; import javax.swing.SwingUtilities; import javax.swing.Timer; +import javax.swing.border.Border; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; +import net.sf.openrocket.gui.util.UITheme; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -109,6 +111,12 @@ public class DebugLogDialog extends JDialog { private final SelectableLabel locationLabel; private final SelectableLabel messageLabel; private final JTextArea stackTraceLabel; + + private static Border border; + + static { + initColors(); + } public DebugLogDialog(Window parent) { //// OpenRocket debug log @@ -343,7 +351,7 @@ public class DebugLogDialog extends JDialog { bottomPanel.add(new JLabel(trans.get("debuglogdlg.lbl.Stacktrace")), "wrap rel"); stackTraceLabel = new JTextArea(8, 80); stackTraceLabel.setEditable(false); - stackTraceLabel.setBorder(GUIUtil.getUITheme().getBorder()); + stackTraceLabel.setBorder(border); GUIUtil.changeFontSize(stackTraceLabel, -2); bottomPanel.add(new JScrollPane(stackTraceLabel), "grow, pushy 200, growprioy 200"); @@ -385,7 +393,16 @@ public class DebugLogDialog extends JDialog { setLocationRelativeTo(parent); followBox.requestFocus(); } - + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(DebugLogDialog::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } + private void updateSelected(int row) { if (row < 0) { diff --git a/swing/src/net/sf/openrocket/gui/dialogs/ErrorWarningDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/ErrorWarningDialog.java index 29e74dcde..13e2a8b1f 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/ErrorWarningDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/ErrorWarningDialog.java @@ -4,6 +4,7 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.util.BetterListCellRenderer; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.logging.Error; import net.sf.openrocket.logging.ErrorSet; import net.sf.openrocket.logging.Warning; @@ -16,6 +17,8 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSeparator; import javax.swing.ListSelectionModel; +import javax.swing.border.Border; +import java.awt.Color; import java.awt.Component; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -25,12 +28,30 @@ import java.awt.event.MouseEvent; */ @SuppressWarnings("serial") public abstract class ErrorWarningDialog { + private static Border border; + private static Color darkWarningColor; + private static Color textSelectionForegroundColor; + + static { + initColors(); + } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ErrorWarningDialog::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + textSelectionForegroundColor = GUIUtil.getUITheme().getTextSelectionForegroundColor(); + } public static void showErrorsAndWarnings(Component parent, Object message, String title, ErrorSet errors, WarningSet warnings) { JPanel content = new JPanel(new MigLayout("ins 0, fillx")); StyledLabel label = new StyledLabel("Errors"); - label.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + label.setFontColor(darkWarningColor); content.add(label, "wrap, gaptop 15lp"); Error[] e = errors.toArray(new Error[0]); @@ -38,7 +59,7 @@ public abstract class ErrorWarningDialog { errorList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); errorList.setCellRenderer(new ErrorListCellRenderer()); JScrollPane errorPane = new JScrollPane(errorList); - errorList.setBorder(GUIUtil.getUITheme().getBorder()); + errorList.setBorder(border); content.add(errorPane, "wrap, growx"); // Deselect items if clicked on blank region @@ -60,7 +81,7 @@ public abstract class ErrorWarningDialog { final JList warningList = new JList<>(w); warningList.setCellRenderer(new BetterListCellRenderer()); JScrollPane warningPane = new JScrollPane(warningList); - warningList.setBorder(GUIUtil.getUITheme().getBorder()); + warningList.setBorder(border); content.add(warningPane, "wrap, growx"); // Deselect items if clicked on blank region @@ -87,9 +108,9 @@ public abstract class ErrorWarningDialog { // Text color if (isSelected) { - label.setForeground(GUIUtil.getUITheme().getTextSelectionForegroundColor()); + label.setForeground(textSelectionForegroundColor); } else { - label.setForeground(GUIUtil.getUITheme().getDarkWarningColor()); + label.setForeground(darkWarningColor); } return label; diff --git a/swing/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java index cf84659ca..cfcd415d7 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.dialogs; +import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Insets; @@ -32,6 +33,7 @@ import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.Icons; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.util.URLUtil; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.startup.Application; @@ -51,6 +53,12 @@ public class UpdateInfoDialog extends JDialog { private static final Translator trans = Application.getTranslator(); private final SwingPreferences preferences = (SwingPreferences) Application.getPreferences(); + private static Color textColor; + + static { + initColors(); + } + public UpdateInfoDialog(UpdateInfo info) { //// OpenRocket update available super(null, trans.get("update.dlg.updateAvailable.title"), ModalityType.APPLICATION_MODAL); @@ -74,7 +82,7 @@ public class UpdateInfoDialog extends JDialog { // Release information box final JTextPane textPane = new JTextPane(); - textPane.setBorder(BorderFactory.createLineBorder(GUIUtil.getUITheme().getTextColor())); + textPane.setBorder(BorderFactory.createLineBorder(textColor)); textPane.setEditable(false); textPane.setContentType("text/html"); textPane.setMargin(new Insets(10, 10, 40, 10)); @@ -201,6 +209,15 @@ public class UpdateInfoDialog extends JDialog { GUIUtil.setDisposableDialogOptions(this, btnLater); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(UpdateInfoDialog::updateColors); + } + + private static void updateColors() { + textColor = GUIUtil.getUITheme().getTextColor(); + } + /** * ComboBox renderer to display an UpdatePlatform by the platform name */ diff --git a/swing/src/net/sf/openrocket/gui/dialogs/WarningDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/WarningDialog.java index ec2a0a34a..5eb41437c 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/WarningDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/WarningDialog.java @@ -6,21 +6,37 @@ import javax.swing.BorderFactory; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JScrollPane; +import javax.swing.border.Border; import net.sf.openrocket.gui.util.BetterListCellRenderer; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.logging.Warning; import net.sf.openrocket.logging.WarningSet; @SuppressWarnings("serial") public abstract class WarningDialog { + private static Border border; + + static { + initColors(); + } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(WarningDialog::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } + public static void showWarnings(Component parent, Object message, String title, WarningSet warnings) { - Warning[] w = warnings.toArray(new Warning[0]); final JList list = new JList(w); list.setCellRenderer(new BetterListCellRenderer()); JScrollPane pane = new JScrollPane(list); - pane.setBorder(GUIUtil.getUITheme().getBorder()); + pane.setBorder(border); JOptionPane.showMessageDialog(parent, new Object[] { message, pane }, title, JOptionPane.WARNING_MESSAGE); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/WelcomeDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/WelcomeDialog.java index 4d1cfa805..6b8d92d74 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/WelcomeDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/WelcomeDialog.java @@ -4,6 +4,7 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.Icons; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.util.URLUtil; import net.sf.openrocket.gui.widgets.SelectColorButton; import net.sf.openrocket.l10n.Translator; @@ -20,9 +21,9 @@ import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextPane; +import javax.swing.border.Border; import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; -import java.awt.Desktop; import java.awt.Dimension; import java.awt.Insets; import java.awt.event.ActionEvent; @@ -35,6 +36,12 @@ public class WelcomeDialog extends JDialog { private static final Translator trans = Application.getTranslator(); private static final Logger log = LoggerFactory.getLogger(WelcomeDialog.class); + private static Border border; + + static { + initColors(); + } + /** * @param releaseNotes the release notes to display for the current version */ @@ -82,7 +89,7 @@ public class WelcomeDialog extends JDialog { textPane.setCaretPosition(0); // Scroll to the top JScrollPane scrollPane = new JScrollPane(textPane); - scrollPane.setBorder(GUIUtil.getUITheme().getBorder()); + scrollPane.setBorder(border); panel.add(scrollPane, "skip 1, left, spanx, grow, push, gapbottom 6px, wrap"); // Don't show this dialog again @@ -114,4 +121,13 @@ public class WelcomeDialog extends JDialog { this.setLocationRelativeTo(null); GUIUtil.setDisposableDialogOptions(this, closeBtn); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(WelcomeDialog::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } } diff --git a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java index 7cb232a0b..df94a3ffc 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RenameConfigDialog.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.dialogs.flightconfiguration; +import java.awt.Color; import java.awt.Dialog; import java.awt.Window; import java.awt.event.ActionEvent; @@ -15,6 +16,7 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.configdialog.CommonStrings; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.FlightConfigurationId; import net.sf.openrocket.rocketcomponent.Rocket; @@ -25,6 +27,12 @@ public class RenameConfigDialog extends JDialog { private static final long serialVersionUID = -5423008694485357248L; private static final Translator trans = Application.getTranslator(); + private static Color dimTextColor; + + static { + initColors(); + } + public RenameConfigDialog(final Window parent, final Rocket rocket, final FlightConfigurationId fcid) { super(parent, trans.get("RenameConfigDialog.title"), Dialog.ModalityType.APPLICATION_MODAL); @@ -73,11 +81,20 @@ public class RenameConfigDialog extends JDialog { + trans.get("RenameConfigDialog.lbl.infoCases") + trans.get("RenameConfigDialog.lbl.infoCombination"); StyledLabel info = new StyledLabel(text, -2); - info.setFontColor(GUIUtil.getUITheme().getDimTextColor()); + info.setFontColor(dimTextColor); panel.add(info, "spanx, growx, wrap"); this.add(panel); GUIUtil.setDisposableDialogOptions(this, okButton); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(RenameConfigDialog::updateColors); + } + + private static void updateColors() { + dimTextColor = GUIUtil.getUITheme().getDimTextColor(); + } } diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java index 4e461b983..4d1682adc 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorFilterPanel.java @@ -34,6 +34,7 @@ import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.util.CheckList; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.widgets.MultiSlider; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.Manufacturer; @@ -118,6 +119,12 @@ public abstract class MotorFilterPanel extends JPanel { private final MultiSlider lengthSlider; private final MultiSlider diameterSlider; + private static Border border; + + static { + initColors(); + } + public MotorFilterPanel(Collection allManufacturers, MotorRowFilter filter ) { super(new MigLayout("fill", "[grow]")); this.filter = filter; @@ -146,7 +153,7 @@ public abstract class MotorFilterPanel extends JPanel { // Manufacturer selection JPanel sub = new JPanel(new MigLayout("fill")); - Border templateBorder = GUIUtil.getUITheme().getBorder(); + Border templateBorder = border; TitledBorder border = BorderFactory.createTitledBorder(templateBorder); border.setTitle(trans.get("TCurveMotorCol.MANUFACTURER")); GUIUtil.changeFontStyle(border, Font.BOLD); @@ -186,9 +193,8 @@ public abstract class MotorFilterPanel extends JPanel { }); JScrollPane scrollPane = new JScrollPane(manufacturerCheckList.getList()); - Border border1 = GUIUtil.getUITheme().getBorder(); - if (border1 != null) { - scrollPane.setBorder(border1); + if (border != null) { + scrollPane.setBorder(border); } sub.add(scrollPane, "grow, pushy, wrap"); @@ -368,6 +374,15 @@ public abstract class MotorFilterPanel extends JPanel { } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(MotorFilterPanel::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } + public void setMotorMount( MotorMount mount ) { filter.setMotorMount(mount); onSelectionChanged(); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorInformationPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorInformationPanel.java index 741b61ecd..ddb02dde9 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorInformationPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/MotorInformationPanel.java @@ -15,7 +15,9 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.SwingUtilities; +import javax.swing.border.Border; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.util.StringUtils; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; @@ -42,8 +44,10 @@ class MotorInformationPanel extends JPanel { private static final int ZOOM_ICON_POSITION_NEGATIVE_X = 50; private static final int ZOOM_ICON_POSITION_POSITIVE_Y = 12; - private static final Color NO_COMMENT_COLOR = GUIUtil.getUITheme().getDimTextColor(); - private static final Color WITH_COMMENT_COLOR = GUIUtil.getUITheme().getTextColor(); + private static Color NO_COMMENT_COLOR; + private static Color WITH_COMMENT_COLOR; + private static Color textColor; + private static Border border; // Motors in set private List selectedMotorSet; @@ -74,6 +78,10 @@ class MotorInformationPanel extends JPanel { private final ChartPanel chartPanel; private final JLabel zoomIcon; + static { + initColors(); + } + public MotorInformationPanel() { super(new MigLayout("fill")); @@ -159,7 +167,7 @@ class MotorInformationPanel extends JPanel { comment = new JTextArea(5, 5); - comment.setBorder(GUIUtil.getUITheme().getBorder()); + comment.setBorder(border); GUIUtil.changeFontSize(comment, -2); withCommentFont = comment.getFont(); noCommentFont = withCommentFont.deriveFont(Font.ITALIC); @@ -191,7 +199,7 @@ class MotorInformationPanel extends JPanel { //// Thrust curve: TextTitle title = new TextTitle(trans.get("TCMotorSelPan.title.Thrustcurve"), this.getFont()); - title.setPaint(GUIUtil.getUITheme().getTextColor()); + title.setPaint(textColor); chart.setTitle(title); chart.setBackgroundPaint(this.getBackground()); plot.setBackgroundPaint(Color.WHITE); @@ -239,6 +247,18 @@ class MotorInformationPanel extends JPanel { this.add(layer, "width 300:300:, height 180:180:, grow, spanx"); } } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(MotorInformationPanel::updateColors); + } + + private static void updateColors() { + NO_COMMENT_COLOR = GUIUtil.getUITheme().getDimTextColor(); + WITH_COMMENT_COLOR = GUIUtil.getUITheme().getTextColor(); + textColor = GUIUtil.getUITheme().getTextColor(); + border = GUIUtil.getUITheme().getBorder(); + } public void clearData() { selectedMotor = null; diff --git a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java index 2cc104581..60f4eff46 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java @@ -111,6 +111,12 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec private ThrustCurveMotorSet selectedMotorSet; private double selectedDelay; + private static Color dimTextColor; + + static { + initColors(); + } + public ThrustCurveMotorSelectionPanel( final FlightConfigurationId fcid, MotorMount mount ) { this(); setMotorMountAndConfig( fcid, mount ); @@ -336,7 +342,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec nrOfMotorsLabel = new StyledLabel(-2f, StyledLabel.Style.ITALIC); nrOfMotorsLabel.setToolTipText(trans.get("TCMotorSelPan.lbl.ttip.nrOfMotors")); updateNrOfMotors(); - nrOfMotorsLabel.setForeground(GUIUtil.getUITheme().getDimTextColor()); + nrOfMotorsLabel.setForeground(dimTextColor); panel.add(nrOfMotorsLabel, "gapleft para, spanx, wrap"); sorter.addRowSorterListener(new RowSorterListener() { @Override @@ -400,6 +406,15 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ThrustCurveMotorSelectionPanel::updateColors); + } + + private static void updateColors() { + dimTextColor = GUIUtil.getUITheme().getDimTextColor(); + } + public void setMotorMountAndConfig( final FlightConfigurationId _fcid, MotorMount mountToEdit ) { if ( null == _fcid ){ throw new NullPointerException(" attempted to set mount with a null FCID. bug. "); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/optimization/SimulationModifierTree.java b/swing/src/net/sf/openrocket/gui/dialogs/optimization/SimulationModifierTree.java index 8718a48a6..f2c56dc30 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/optimization/SimulationModifierTree.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/optimization/SimulationModifierTree.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.dialogs.optimization; +import java.awt.Color; import java.awt.Component; import java.awt.Font; import java.util.Enumeration; @@ -17,6 +18,7 @@ import javax.swing.tree.TreePath; import net.sf.openrocket.gui.components.BasicTree; import net.sf.openrocket.gui.main.ComponentIcons; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.optimization.rocketoptimization.SimulationModifier; import net.sf.openrocket.rocketcomponent.Rocket; @@ -38,6 +40,15 @@ public class SimulationModifierTree extends BasicTree { private final List selectedModifiers; private static final Translator trans = Application.getTranslator(); + private static Color textColor; + private static Color dimTextColor; + private static Color textSelectionForegroundColor; + private static Color textSelectionBackgroundColor; + + static { + initColors(); + } + /** * Sole constructor. * @@ -57,6 +68,18 @@ public class SimulationModifierTree extends BasicTree { expandComponents(); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SimulationModifierTree::updateColors); + } + + private static void updateColors() { + textColor = GUIUtil.getUITheme().getTextColor(); + dimTextColor = GUIUtil.getUITheme().getDimTextColor(); + textSelectionForegroundColor = GUIUtil.getUITheme().getTextSelectionForegroundColor(); + textSelectionBackgroundColor = GUIUtil.getUITheme().getTextSelectionBackgroundColor(); + } /** @@ -157,7 +180,7 @@ public class SimulationModifierTree extends BasicTree { // Set text color/style if (object instanceof RocketComponent) { - setForeground(GUIUtil.getUITheme().getDimTextColor()); + setForeground(dimTextColor); setFont(componentFont); // Set tooltip @@ -171,21 +194,21 @@ public class SimulationModifierTree extends BasicTree { this.setToolTipText(null); } } else if (object instanceof String) { - setForeground(GUIUtil.getUITheme().getDimTextColor()); + setForeground(dimTextColor); setFont(stringFont); } else if (object instanceof SimulationModifier) { if (selectedModifiers.contains(object)) { - setForeground(GUIUtil.getUITheme().getDimTextColor()); + setForeground(dimTextColor); setFont(stringFont); } else { if (tree.getSelectionRows() != null && IntStream.of(tree.getSelectionRows()).anyMatch(r -> r == row)) { - setForeground(GUIUtil.getUITheme().getTextSelectionForegroundColor()); - setBackground(GUIUtil.getUITheme().getTextSelectionBackgroundColor()); + setForeground(textSelectionForegroundColor); + setBackground(textSelectionBackgroundColor); setOpaque(true); } else { - setForeground(GUIUtil.getUITheme().getTextColor()); + setForeground(textColor); } setFont(modifierFont); } diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preferences/LaunchPreferencesPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/preferences/LaunchPreferencesPanel.java index 2cb386954..50b5d97f7 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preferences/LaunchPreferencesPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preferences/LaunchPreferencesPanel.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.dialogs.preferences; +import java.awt.Color; import java.awt.LayoutManager; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -24,6 +25,7 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.models.atmosphere.ExtendedISAModel; import net.sf.openrocket.simulation.SimulationOptions; import net.sf.openrocket.unit.UnitGroup; @@ -31,6 +33,11 @@ import net.sf.openrocket.util.Chars; import net.sf.openrocket.util.StateChangeListener; public class LaunchPreferencesPanel extends PreferencesPanel { + private static Color darkWarningColor; + + static { + initColors(); + } public LaunchPreferencesPanel(JDialog parent, LayoutManager layout) { super(parent, layout); @@ -44,7 +51,7 @@ public class LaunchPreferencesPanel extends PreferencesPanel { StyledLabel warning = new StyledLabel(String.format( "%s", trans.get("pref.dlg.lbl.launchWarning")), 0.5f, StyledLabel.Style.BOLD); - warning.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + warning.setFontColor(darkWarningColor); warning.setToolTipText(trans.get("pref.dlg.lbl.launchWarning.ttip")); add(warning, "spanx, growx 0, gapbottom para, wrap"); @@ -451,6 +458,15 @@ public class LaunchPreferencesPanel extends PreferencesPanel { } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(LaunchPreferencesPanel::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + } + private String getIntensityDescription(double i) { if (i < 0.001) // // None diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preferences/SimulationPreferencesPanel.java b/swing/src/net/sf/openrocket/gui/dialogs/preferences/SimulationPreferencesPanel.java index 051e312ac..36e3c2dda 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/preferences/SimulationPreferencesPanel.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/preferences/SimulationPreferencesPanel.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.dialogs.preferences; +import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -18,6 +19,7 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.simulation.RK4SimulationStepper; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.GeodeticComputationStrategy; @@ -26,6 +28,12 @@ import net.sf.openrocket.gui.widgets.SelectColorButton; public class SimulationPreferencesPanel extends PreferencesPanel { private static final long serialVersionUID = 7983195730016979888L; + private static Color darkWarningColor; + + static { + initColors(); + } + /* * private GeodeticComputationStrategy geodeticComputation = * GeodeticComputationStrategy.SPHERICAL; @@ -85,7 +93,7 @@ public class SimulationPreferencesPanel extends PreferencesPanel { StyledLabel warning = new StyledLabel(String.format( "%s", trans.get("pref.dlg.lbl.launchWarning")), 0, StyledLabel.Style.BOLD); - warning.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + warning.setFontColor(darkWarningColor); warning.setToolTipText(trans.get("pref.dlg.lbl.launchWarning.ttip")); subsub.add(warning, "spanx, wrap para"); @@ -294,4 +302,13 @@ public class SimulationPreferencesPanel extends PreferencesPanel { * public void fireContentsChanged() { super.fireContentsChanged(this, 0, * getSize()); } } */ + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SimulationPreferencesPanel::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + } } diff --git a/swing/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java b/swing/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java index cc65d95ae..c8a309881 100644 --- a/swing/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java +++ b/swing/src/net/sf/openrocket/gui/figure3d/RocketFigure3d.java @@ -35,6 +35,7 @@ import javax.swing.SwingUtilities; import javax.swing.event.MouseInputAdapter; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -98,13 +99,19 @@ public class RocketFigure3d extends JPanel implements GLEventListener { float[] lightPosition = new float[] { 1, 4, 1, 0 }; RocketRenderer rr = new FigureRenderer(); + + private static Color backgroundColor; + + static { + initColors(); + } public RocketFigure3d(final OpenRocketDocument document) { this.document = document; this.rkt = document.getRocket(); this.setLayout(new BorderLayout()); - - //Only initialize GL if 3d is enabled. + + // Only initialize GL if 3d is enabled. if (is3dEnabled()) { //Fixes a linux / X bug: Splash must be closed before GL Init SplashScreen splash = Splash.getSplashScreen(); @@ -114,6 +121,15 @@ public class RocketFigure3d extends JPanel implements GLEventListener { initGLCanvas(); } } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(RocketFigure3d::updateColors); + } + + private static void updateColors() { + backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); + } public void flushTextureCaches() { ((GLAutoDrawable) canvas).invoke(true, new GLRunnable() { @@ -289,7 +305,6 @@ public class RocketFigure3d extends JPanel implements GLEventListener { GL2 gl = drawable.getGL().getGL2(); GLU glu = new GLU(); - Color backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); gl.glClearColor(backgroundColor.getRed()/255f, backgroundColor.getGreen()/255f, backgroundColor.getBlue()/255f, backgroundColor.getAlpha()/255f); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); diff --git a/swing/src/net/sf/openrocket/gui/figureelements/CGCaret.java b/swing/src/net/sf/openrocket/gui/figureelements/CGCaret.java index 77361260f..81a413cdb 100644 --- a/swing/src/net/sf/openrocket/gui/figureelements/CGCaret.java +++ b/swing/src/net/sf/openrocket/gui/figureelements/CGCaret.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.figureelements; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import java.awt.Color; import java.awt.geom.Area; @@ -19,6 +20,12 @@ public class CGCaret extends Caret { private static Area caret = null; + private static Color CGColor; + + static { + initColors(); + } + /** * Create a new CGCaret at the specified coordinates. */ @@ -26,6 +33,15 @@ public class CGCaret extends Caret { super(x,y); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(CGCaret::updateColors); + } + + private static void updateColors() { + CGColor = GUIUtil.getUITheme().getCGColor(); + } + /** * Returns the Area corresponding to the caret. The Area object is created only once, * after which the object is cloned for new copies. @@ -58,7 +74,7 @@ public class CGCaret extends Caret { */ @Override protected Color getColor() { - return GUIUtil.getUITheme().getCGColor(); + return CGColor; } } diff --git a/swing/src/net/sf/openrocket/gui/figureelements/CPCaret.java b/swing/src/net/sf/openrocket/gui/figureelements/CPCaret.java index a5b66a233..17c2aebae 100644 --- a/swing/src/net/sf/openrocket/gui/figureelements/CPCaret.java +++ b/swing/src/net/sf/openrocket/gui/figureelements/CPCaret.java @@ -1,6 +1,7 @@ package net.sf.openrocket.gui.figureelements; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import java.awt.Color; import java.awt.geom.Area; @@ -18,6 +19,12 @@ public class CPCaret extends Caret { private static Area caret = null; + private static Color CPColor; + + static { + initColors(); + } + /** * Create a new CPCaret at the specified coordinates. */ @@ -25,6 +32,15 @@ public class CPCaret extends Caret { super(x,y); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(CPCaret::updateColors); + } + + private static void updateColors() { + CPColor = GUIUtil.getUITheme().getCPColor(); + } + /** * Returns the Area object of the caret. The Area object is created only once, * after which new copies are cloned from it. @@ -53,6 +69,6 @@ public class CPCaret extends Caret { */ @Override protected Color getColor() { - return GUIUtil.getUITheme().getCPColor(); + return CPColor; } } diff --git a/swing/src/net/sf/openrocket/gui/figureelements/RocketInfo.java b/swing/src/net/sf/openrocket/gui/figureelements/RocketInfo.java index 1836ae644..83bc688f8 100644 --- a/swing/src/net/sf/openrocket/gui/figureelements/RocketInfo.java +++ b/swing/src/net/sf/openrocket/gui/figureelements/RocketInfo.java @@ -3,6 +3,7 @@ package net.sf.openrocket.gui.figureelements; import static net.sf.openrocket.util.Chars.ALPHA; import static net.sf.openrocket.util.Chars.THETA; +import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics2D; @@ -12,6 +13,7 @@ import java.awt.geom.Rectangle2D; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.logging.Warning; import net.sf.openrocket.logging.WarningSet; import net.sf.openrocket.l10n.Translator; @@ -64,13 +66,35 @@ public class RocketInfo implements FigureElement { private Graphics2D g2 = null; private float line = 0; private float x1, x2, y1, y2; - + + private static Color textColor; + private static Color dimTextColor; + private static Color warningColor; + private static Color flightDataTextActiveColor; + private static Color flightDataTextInactiveColor; + + static { + initColors(); + } public RocketInfo(FlightConfiguration configuration) { this.configuration = configuration; this.stabilityUnits = UnitGroup.stabilityUnits(configuration); this.secondaryStabilityUnits = UnitGroup.secondaryStabilityUnits(configuration); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(RocketInfo::updateColors); + } + + private static void updateColors() { + textColor = GUIUtil.getUITheme().getTextColor(); + dimTextColor = GUIUtil.getUITheme().getDimTextColor(); + warningColor = GUIUtil.getUITheme().getWarningColor(); + flightDataTextActiveColor = GUIUtil.getUITheme().getFlightDataTextActiveColor(); + flightDataTextInactiveColor = GUIUtil.getUITheme().getFlightDataTextInactiveColor(); + } @Override @@ -176,7 +200,7 @@ public class RocketInfo implements FigureElement { GlyphVector massLineWithoutMotors = createText(massTextWithoutMotors); - g2.setColor(GUIUtil.getUITheme().getTextColor()); + g2.setColor(textColor); g2.drawGlyphVector(name, x1, y1); g2.drawGlyphVector(lengthLine, x1, y1+line); @@ -234,7 +258,7 @@ public class RocketInfo implements FigureElement { unitWidth = unitWidth + spaceWidth; stabUnitWidth = stabUnitWidth + spaceWidth; - g2.setColor(GUIUtil.getUITheme().getTextColor()); + g2.setColor(textColor); // Draw the stability, CG & CP values (and units) g2.drawGlyphVector(stabValue, (float)(x2-stabRect.getWidth()), y1); @@ -261,7 +285,7 @@ public class RocketInfo implements FigureElement { atPos = (float)(x2 - atTextRect.getWidth()); } - g2.setColor(GUIUtil.getUITheme().getDimTextColor()); + g2.setColor(dimTextColor); g2.drawGlyphVector(atText, atPos, y1 + 3*line); } @@ -411,7 +435,7 @@ public class RocketInfo implements FigureElement { float y = y2 - line * (texts.length-1); - g2.setColor(GUIUtil.getUITheme().getWarningColor()); + g2.setColor(warningColor); for (GlyphVector v: texts) { Rectangle2D rect = v.getVisualBounds(); @@ -427,7 +451,7 @@ public class RocketInfo implements FigureElement { if (calculatingData) { //// Calculating... GlyphVector calculating = createText(trans.get("RocketInfo.Calculating")); - g2.setColor(GUIUtil.getUITheme().getTextColor()); + g2.setColor(textColor); g2.drawGlyphVector(calculating, x1, (float)(y2-height)); } } @@ -485,17 +509,17 @@ public class RocketInfo implements FigureElement { width += 5; if (!calculatingData) - g2.setColor(GUIUtil.getUITheme().getFlightDataTextActiveColor()); + g2.setColor(flightDataTextActiveColor); else - g2.setColor(GUIUtil.getUITheme().getFlightDataTextInactiveColor()); + g2.setColor(flightDataTextInactiveColor); - g2.drawGlyphVector(apogee, (float)x1, (float)(y2-2*line)); - g2.drawGlyphVector(maxVelocity, (float)x1, (float)(y2-line)); - g2.drawGlyphVector(maxAcceleration, (float)x1, (float)(y2)); + g2.drawGlyphVector(apogee, x1, y2-2*line); + g2.drawGlyphVector(maxVelocity, x1, y2-line); + g2.drawGlyphVector(maxAcceleration, x1, y2); - g2.drawGlyphVector(apogeeValue, (float)(x1+width), (float)(y2-2*line)); - g2.drawGlyphVector(velocityValue, (float)(x1+width), (float)(y2-line)); - g2.drawGlyphVector(accelerationValue, (float)(x1+width), (float)(y2)); + g2.drawGlyphVector(apogeeValue, (float)(x1+width), y2-2*line); + g2.drawGlyphVector(velocityValue, (float)(x1+width), y2-line); + g2.drawGlyphVector(accelerationValue, (float)(x1+width), y2); return 3*line; } diff --git a/swing/src/net/sf/openrocket/gui/help/tours/SlideSetManager.java b/swing/src/net/sf/openrocket/gui/help/tours/SlideSetManager.java index 7828dfd8d..14e822b36 100644 --- a/swing/src/net/sf/openrocket/gui/help/tours/SlideSetManager.java +++ b/swing/src/net/sf/openrocket/gui/help/tours/SlideSetManager.java @@ -13,6 +13,7 @@ import java.util.Map; import javax.swing.text.html.StyleSheet; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.util.BugException; /** @@ -32,7 +33,12 @@ public class SlideSetManager { private final String baseDir; private final Map slideSets = new LinkedHashMap(); - + + private static Color textColor; + + static { + initColors(); + } /** * Sole constructor. @@ -45,6 +51,15 @@ public class SlideSetManager { } this.baseDir = baseDir; } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SlideSetManager::updateColors); + } + + private static void updateColors() { + textColor = GUIUtil.getUITheme().getTextColor(); + } /** @@ -132,7 +147,6 @@ public class SlideSetManager { try { StyleSheet ss = new StyleSheet(); - Color textColor = GUIUtil.getUITheme().getTextColor(); ss.addRule(String.format("p { color: rgb(%d, %d, %d, %d)", textColor.getRed(), textColor.getGreen(), textColor.getBlue(), textColor.getAlpha())); InputStreamReader reader = new InputStreamReader(in, "UTF-8"); diff --git a/swing/src/net/sf/openrocket/gui/help/tours/SlideShowComponent.java b/swing/src/net/sf/openrocket/gui/help/tours/SlideShowComponent.java index 561ee518b..a7272ec9e 100644 --- a/swing/src/net/sf/openrocket/gui/help/tours/SlideShowComponent.java +++ b/swing/src/net/sf/openrocket/gui/help/tours/SlideShowComponent.java @@ -7,12 +7,14 @@ import javax.swing.JEditorPane; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTextPane; +import javax.swing.border.Border; import javax.swing.event.HyperlinkListener; import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.StyleSheet; import net.sf.openrocket.gui.components.ImageDisplayComponent; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; /** * Component that displays a single slide, with the image on top and @@ -30,10 +32,16 @@ public class SlideShowComponent extends JSplitPane { private final ImageDisplayComponent imageDisplay; private final JEditorPane textPane; + private static Border border; + + static { + initColors(); + } + public SlideShowComponent() { super(VERTICAL_SPLIT); - + imageDisplay = new ImageDisplayComponent(); imageDisplay.setPreferredSize(new Dimension(WIDTH, HEIGHT_IMAGE)); this.setLeftComponent(imageDisplay); @@ -45,11 +53,20 @@ public class SlideShowComponent extends JSplitPane { textPane.setPreferredSize(new Dimension(WIDTH, HEIGHT_TEXT)); JScrollPane scrollPanel = new JScrollPane(textPane); - textPane.setBorder(GUIUtil.getUITheme().getBorder()); + textPane.setBorder(border); this.setRightComponent(scrollPanel); this.setResizeWeight(((double) HEIGHT_IMAGE) / (HEIGHT_IMAGE + HEIGHT_TEXT)); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SlideShowComponent::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } diff --git a/swing/src/net/sf/openrocket/gui/main/DesignPanel.java b/swing/src/net/sf/openrocket/gui/main/DesignPanel.java index f4e7c274d..d0c460cde 100644 --- a/swing/src/net/sf/openrocket/gui/main/DesignPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/DesignPanel.java @@ -5,6 +5,7 @@ import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.gui.configdialog.ComponentConfigDialog; import net.sf.openrocket.gui.main.componenttree.ComponentTree; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.widgets.IconButton; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.AxialStage; @@ -24,6 +25,7 @@ import javax.swing.KeyStroke; import javax.swing.ScrollPaneConstants; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; +import javax.swing.border.Border; import javax.swing.border.TitledBorder; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; @@ -51,6 +53,12 @@ public class DesignPanel extends JSplitPane { private static final Translator trans = Application.getTranslator(); private final Component tree; + private static Border border; + + static { + initColors(); + } + public DesignPanel(final BasicFrame parent, final OpenRocketDocument document, final ComponentTree tree) { super(JSplitPane.HORIZONTAL_SPLIT, true); setResizeWeight(0.5); @@ -174,7 +182,7 @@ public class DesignPanel extends JSplitPane { // Place tree inside scroll pane JScrollPane scroll = new JScrollPane(tree); - tree.setBorder(GUIUtil.getUITheme().getBorder()); + tree.setBorder(border); panel.add(scroll, "spany, wmin 140px, grow, wrap"); @@ -230,6 +238,15 @@ public class DesignPanel extends JSplitPane { this.setRightComponent(panel); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(DesignPanel::updateColors); + } + + private static void updateColors() { + border = GUIUtil.getUITheme().getBorder(); + } + /** * Highlight all child components of a stage/rocket/podset when it is selected * @param tree the tree in which the component selection took place diff --git a/swing/src/net/sf/openrocket/gui/main/componenttree/ComponentTreeRenderer.java b/swing/src/net/sf/openrocket/gui/main/componenttree/ComponentTreeRenderer.java index 742a0c6d2..ec0f2f33c 100644 --- a/swing/src/net/sf/openrocket/gui/main/componenttree/ComponentTreeRenderer.java +++ b/swing/src/net/sf/openrocket/gui/main/componenttree/ComponentTreeRenderer.java @@ -1,12 +1,14 @@ package net.sf.openrocket.gui.main.componenttree; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Component; import java.awt.FlowLayout; import java.awt.Font; import java.util.List; import javax.swing.BorderFactory; +import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; @@ -18,6 +20,7 @@ import javax.swing.tree.TreePath; import net.sf.openrocket.gui.main.ComponentIcons; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.MassComponent; import net.sf.openrocket.rocketcomponent.MassComponent.MassComponentType; @@ -31,6 +34,21 @@ import net.sf.openrocket.util.TextUtil; public class ComponentTreeRenderer extends DefaultTreeCellRenderer { private static final Translator trans = Application.getTranslator(); + + private static Color textSelectionBackgroundColor; + private static Color textSelectionForegroundColor; + private static Color componentTreeBackgroundColor; + private static Color componentTreeForegroundColor; + private static Icon massOverrideSubcomponentIcon; + private static Icon massOverrideIcon; + private static Icon CGOverrideSubcomponentIcon; + private static Icon CGOverrideIcon; + private static Icon CDOverrideSubcomponentIcon; + private static Icon CDOverrideIcon; + + static { + initColors(); + } @Override public Component getTreeCellRendererComponent(JTree tree, Object value, @@ -81,12 +99,12 @@ public class ComponentTreeRenderer extends DefaultTreeCellRenderer { // Set the background and foreground colors of the text JLabel if (sel) { textLabel.setOpaque(true); - textLabel.setBackground(GUIUtil.getUITheme().getTextSelectionBackgroundColor()); - textLabel.setForeground(GUIUtil.getUITheme().getTextSelectionForegroundColor()); + textLabel.setBackground(textSelectionBackgroundColor); + textLabel.setForeground(textSelectionForegroundColor); } else { textLabel.setOpaque(true); // Set this to true to allow the background color to be visible - textLabel.setBackground(GUIUtil.getUITheme().getComponentTreeBackgroundColor()); - textLabel.setForeground(GUIUtil.getUITheme().getComponentTreeForegroundColor()); + textLabel.setBackground(componentTreeBackgroundColor); + textLabel.setForeground(componentTreeForegroundColor); } applyToolTipText(components, c, panel); @@ -99,23 +117,23 @@ public class ComponentTreeRenderer extends DefaultTreeCellRenderer { c.isCDOverridden() || c.getCDOverriddenBy() != null) { JPanel p = new JPanel(); p.setLayout(new FlowLayout(FlowLayout.LEFT, 1, 1)); - p.setBackground(GUIUtil.getUITheme().getComponentTreeBackgroundColor()); - p.setForeground(GUIUtil.getUITheme().getComponentTreeForegroundColor()); + p.setBackground(componentTreeBackgroundColor); + p.setForeground(componentTreeForegroundColor); p.add(comp/* , BorderLayout.WEST */); if (c.getMassOverriddenBy() != null) { - p.add(new JLabel(GUIUtil.getUITheme().getMassOverrideSubcomponentIcon())); + p.add(new JLabel(massOverrideSubcomponentIcon)); } else if (c.isMassOverridden()) { - p.add(new JLabel(GUIUtil.getUITheme().getMassOverrideIcon())); + p.add(new JLabel(massOverrideIcon)); } if (c.getCGOverriddenBy() != null) { - p.add(new JLabel(GUIUtil.getUITheme().getCGOverrideSubcomponentIcon())); + p.add(new JLabel(CGOverrideSubcomponentIcon)); } else if (c.isCGOverridden()) { - p.add(new JLabel(GUIUtil.getUITheme().getCGOverrideIcon())); + p.add(new JLabel(CGOverrideIcon)); } if (c.getCDOverriddenBy() != null) { - p.add(new JLabel(GUIUtil.getUITheme().getCDOverrideSubcomponentIcon())); + p.add(new JLabel(CDOverrideSubcomponentIcon)); } else if (c.isCDOverridden()) { - p.add(new JLabel(GUIUtil.getUITheme().getCDOverrideIcon())); + p.add(new JLabel(CDOverrideIcon)); } // Make sure the tooltip also works on the override icons @@ -131,6 +149,25 @@ public class ComponentTreeRenderer extends DefaultTreeCellRenderer { return comp; } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ComponentTreeRenderer::updateColors); + } + + private static void updateColors() { + textSelectionBackgroundColor = GUIUtil.getUITheme().getTextSelectionBackgroundColor(); + textSelectionForegroundColor = GUIUtil.getUITheme().getTextSelectionForegroundColor(); + componentTreeBackgroundColor = GUIUtil.getUITheme().getComponentTreeBackgroundColor(); + componentTreeForegroundColor = GUIUtil.getUITheme().getComponentTreeForegroundColor(); + + massOverrideSubcomponentIcon = GUIUtil.getUITheme().getMassOverrideSubcomponentIcon(); + massOverrideIcon = GUIUtil.getUITheme().getMassOverrideIcon(); + CGOverrideSubcomponentIcon = GUIUtil.getUITheme().getCGOverrideSubcomponentIcon(); + CGOverrideIcon = GUIUtil.getUITheme().getCGOverrideIcon(); + CDOverrideSubcomponentIcon = GUIUtil.getUITheme().getCDOverrideSubcomponentIcon(); + CDOverrideIcon = GUIUtil.getUITheme().getCDOverrideIcon(); + } + private void applyToolTipText(List components, RocketComponent c, JComponent comp) { String tooltipText; if (components != null && components.size() > 1 && components.contains(c)) { diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java index ee6cb3b80..47f3249cb 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java @@ -25,6 +25,7 @@ import javax.swing.table.DefaultTableCellRenderer; import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.gui.main.FlightConfigurationPanel; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.util.ArrayList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,6 +56,13 @@ public abstract class FlightConfigurablePanel listeners = new LinkedList(); + + private static Color backgroundColor; + + static { + initColors(); + } public AbstractScaleFigure() { @@ -70,10 +77,19 @@ public abstract class AbstractScaleFigure extends JPanel { this.setPreferredSize(new Dimension(100,100)); setSize(100,100); - setBackground(GUIUtil.getUITheme().getBackgroundColor()); + setBackground(backgroundColor); setOpaque(true); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(AbstractScaleFigure::updateColors); + } + + private static void updateColors() { + backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); + } + public int getBorderHeight(){ return borderThickness_px.height; } public int getBorderWidth(){ return borderThickness_px.width; } diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java b/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java index a8688bec7..dc0ed7c77 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java @@ -16,6 +16,7 @@ import java.util.LinkedList; import java.util.List; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.rocketcomponent.FreeformFinSet; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.SymmetricComponent; @@ -58,23 +59,33 @@ public class FinPointFigure extends AbstractScaleFigure { private Rectangle2D.Double[] finPointHandles = null; private int selectedIndex = -1; + private static Color backgroundColor; private static Color finPointBodyLineColor; private static Color finPointGridMajorLineColor; private static Color finPointGridMinorLineColor; private static Color finPointPointColor; private static Color finPointSelectedPointColor; + + static { + initColors(); + } public FinPointFigure(FreeformFinSet finset) { this.finset = finset; - setBackground(GUIUtil.getUITheme().getBackgroundColor()); + setBackground(backgroundColor); setOpaque(true); - updateColors(); updateFigure(); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(FinPointFigure::updateColors); + } + private static void updateColors() { + backgroundColor = GUIUtil.getUITheme().getBackgroundColor(); finPointBodyLineColor = GUIUtil.getUITheme().getFinPointBodyLineColor(); finPointGridMajorLineColor = GUIUtil.getUITheme().getFinPointGridMajorLineColor(); finPointGridMinorLineColor = GUIUtil.getUITheme().getFinPointGridMinorLineColor(); diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java b/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java index 22f4d8d67..50dd4d1ae 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java @@ -18,6 +18,7 @@ import java.util.*; import java.util.Map.Entry; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.rocketcomponent.AxialStage; import net.sf.openrocket.rocketcomponent.ParallelStage; import net.sf.openrocket.rocketcomponent.PodSet; @@ -93,6 +94,13 @@ public class RocketFigure extends AbstractScaleFigure { private final ArrayList relativeExtra = new ArrayList(); private final ArrayList absoluteExtra = new ArrayList(); + + private static Color motorFillColor; + private static Color motorBorderColor; + + static { + initColors(); + } /** @@ -108,6 +116,16 @@ public class RocketFigure extends AbstractScaleFigure { updateFigure(); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(RocketFigure::updateColors); + } + + private static void updateColors() { + motorFillColor = GUIUtil.getUITheme().getMotorFillColor(); + motorBorderColor = GUIUtil.getUITheme().getMotorBorderColor(); + } + public Point getAutoZoomPoint(){ return new Point( Math.max(0, originLocation_px.x - borderThickness_px.width), Math.max(0, - borderThickness_px.height)); @@ -291,8 +309,8 @@ public class RocketFigure extends AbstractScaleFigure { RenderingHints.VALUE_STROKE_NORMALIZE); // Draw motors - Color fillColor = GUIUtil.getUITheme().getMotorFillColor(); - Color borderColor = GUIUtil.getUITheme().getMotorBorderColor(); + Color fillColor = motorFillColor; + Color borderColor = motorBorderColor; FlightConfiguration config = rocket.getSelectedConfiguration(); for (MotorConfiguration curInstance : config.getActiveMotors()) { diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/ScaleScrollPane.java b/swing/src/net/sf/openrocket/gui/scalefigure/ScaleScrollPane.java index e30bfe840..bb33d649b 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/ScaleScrollPane.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/ScaleScrollPane.java @@ -26,6 +26,7 @@ import javax.swing.event.ChangeListener; import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.unit.Tick; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.unit.UnitGroup; @@ -72,6 +73,12 @@ public class ScaleScrollPane extends JScrollPane private Point2D.Double viewCenter_frac = new Point2D.Double(0.5f, 0.5f); + private static Color textColor; + + static { + initColors(); + } + /** * Create a scale scroll pane. * @@ -83,7 +90,7 @@ public class ScaleScrollPane extends JScrollPane if (!(component instanceof AbstractScaleFigure)) { throw new IllegalArgumentException("component must implement ScaleFigure"); } - + this.component = component; this.figure = (AbstractScaleFigure) component; @@ -127,6 +134,15 @@ public class ScaleScrollPane extends JScrollPane viewport.addMouseMotionListener(this); viewport.addComponentListener(this); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ScaleScrollPane::updateColors); + } + + private static void updateColors() { + textColor = GUIUtil.getUITheme().getTextColor(); + } public AbstractScaleFigure getFigure() { return figure; @@ -399,7 +415,7 @@ public class ScaleScrollPane extends JScrollPane } // Set color & hints - g2.setColor(GUIUtil.getUITheme().getTextColor()); + g2.setColor(textColor); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); g2.setRenderingHint(RenderingHints.KEY_RENDERING, diff --git a/swing/src/net/sf/openrocket/gui/simulation/SimulationOptionsPanel.java b/swing/src/net/sf/openrocket/gui/simulation/SimulationOptionsPanel.java index 82e49ff9a..653d1d80d 100644 --- a/swing/src/net/sf/openrocket/gui/simulation/SimulationOptionsPanel.java +++ b/swing/src/net/sf/openrocket/gui/simulation/SimulationOptionsPanel.java @@ -22,6 +22,7 @@ import javax.swing.JScrollPane; import javax.swing.JSpinner; import javax.swing.MenuElement; import javax.swing.SwingUtilities; +import javax.swing.border.Border; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.OpenRocketDocument; @@ -36,6 +37,7 @@ import net.sf.openrocket.gui.components.StyledLabel.Style; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.Icons; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.RK4SimulationStepper; import net.sf.openrocket.simulation.SimulationOptions; @@ -62,12 +64,19 @@ class SimulationOptionsPanel extends JPanel { private JPanel currentExtensions; final JPopupMenu extensionMenu; JMenu extensionMenuCopyExtension; + + private static Color textColor; + private static Border border; + + static { + initColors(); + } SimulationOptionsPanel(OpenRocketDocument document, final Simulation simulation) { super(new MigLayout("fill")); this.document = document; this.simulation = simulation; - + final SimulationOptions conditions = simulation.getOptions(); JPanel sub, subsub; @@ -207,14 +216,24 @@ class SimulationOptionsPanel extends JPanel { currentExtensions = new JPanel(new MigLayout("fillx, gap 0 0, ins 0")); JScrollPane scroll = new JScrollPane(currentExtensions); - currentExtensions.setBorder(GUIUtil.getUITheme().getBorder()); - scroll.setForeground(GUIUtil.getUITheme().getTextColor()); + currentExtensions.setBorder(border); + scroll.setForeground(textColor); // &#$%! scroll pane will not honor "growy"... sub.add(scroll, "growx, growy, h 100%"); updateCurrentExtensions(); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SimulationOptionsPanel::updateColors); + } + + private static void updateColors() { + textColor = GUIUtil.getUITheme().getTextColor(); + border = GUIUtil.getUITheme().getBorder(); + } private JPopupMenu getExtensionMenu() { Set extensions = Application.getInjector().getInstance(new Key>() { diff --git a/swing/src/net/sf/openrocket/gui/simulation/SimulationPlotPanel.java b/swing/src/net/sf/openrocket/gui/simulation/SimulationPlotPanel.java index 54d773456..11fcbeb32 100644 --- a/swing/src/net/sf/openrocket/gui/simulation/SimulationPlotPanel.java +++ b/swing/src/net/sf/openrocket/gui/simulation/SimulationPlotPanel.java @@ -12,7 +12,6 @@ import javax.swing.BorderFactory; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JComboBox; -import javax.swing.JComponent; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JOptionPane; @@ -20,6 +19,7 @@ import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.border.Border; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; @@ -33,6 +33,7 @@ import net.sf.openrocket.gui.plot.SimulationPlotDialog; import net.sf.openrocket.gui.util.GUIUtil; import net.sf.openrocket.gui.util.Icons; import net.sf.openrocket.gui.util.SwingPreferences; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.FlightDataBranch; import net.sf.openrocket.simulation.FlightDataType; @@ -40,7 +41,6 @@ import net.sf.openrocket.simulation.FlightEvent; import net.sf.openrocket.startup.Application; import net.sf.openrocket.startup.Preferences; import net.sf.openrocket.unit.Unit; -import net.sf.openrocket.util.Color; import net.sf.openrocket.util.Utils; import net.sf.openrocket.gui.widgets.SelectColorButton; @@ -107,11 +107,18 @@ public class SimulationPlotPanel extends JPanel { private int modifying = 0; - private DescriptionArea simPlotPanelDesc; + private DescriptionArea simPlotPanelDesc; + + private static java.awt.Color darkWarningColor; + private static Border border; + + static { + initColors(); + } public SimulationPlotPanel(final Simulation simulation) { super(new MigLayout("fill")); - + this.simulation = simulation; if (simulation.getSimulatedData() == null || simulation.getSimulatedData().getBranchCount() == 0) { @@ -205,7 +212,7 @@ public class SimulationPlotPanel extends JPanel { //// The data will be plotted in time order even if the X axis type is not time. simPlotPanelDesc = new DescriptionArea("", 2, -2f, false); simPlotPanelDesc.setVisible(false); - simPlotPanelDesc.setForeground(GUIUtil.getUITheme().getDarkWarningColor()); + simPlotPanelDesc.setForeground(darkWarningColor); simPlotPanelDesc.setViewportBorder(BorderFactory.createEmptyBorder()); this.add(simPlotPanelDesc, "width 1px, growx 1, wrap unrel"); @@ -220,7 +227,7 @@ public class SimulationPlotPanel extends JPanel { typeSelectorPanel = new JPanel(new MigLayout("gapy rel")); JScrollPane scroll = new JScrollPane(typeSelectorPanel); - scroll.setBorder(GUIUtil.getUITheme().getBorder()); + scroll.setBorder(border); this.add(scroll, "spany 3, height 10px, wmin 400lp, grow 100, gapright para"); @@ -379,6 +386,16 @@ public class SimulationPlotPanel extends JPanel { updatePlots(); } + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SimulationPlotPanel::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + border = GUIUtil.getUITheme().getBorder(); + } + private void updateStyleEventWidgets(JLabel styleEventMarker, JRadioButton radioVerticalMarker, JRadioButton radioIcon) { if (modifying > 0) return; diff --git a/swing/src/net/sf/openrocket/gui/util/BetterListCellRenderer.java b/swing/src/net/sf/openrocket/gui/util/BetterListCellRenderer.java index a91da30c5..dfbb02be0 100644 --- a/swing/src/net/sf/openrocket/gui/util/BetterListCellRenderer.java +++ b/swing/src/net/sf/openrocket/gui/util/BetterListCellRenderer.java @@ -4,6 +4,7 @@ package net.sf.openrocket.gui.util; import javax.swing.DefaultListCellRenderer; import javax.swing.JLabel; import javax.swing.JList; +import java.awt.Color; import java.awt.Component; /** @@ -12,6 +13,14 @@ import java.awt.Component; * @author Sibo Van Gool */ public class BetterListCellRenderer extends DefaultListCellRenderer { + private static Color rowBackgroundDarkerColor; + private static Color rowBackgroundLighterColor; + private static Color textSelectionForegroundColor; + private static Color textColor; + + static { + initColors(); + } @Override public Component getListCellRendererComponent(JList list, Object value, int index, @@ -21,17 +30,29 @@ public class BetterListCellRenderer extends DefaultListCellRenderer { // Alternating row colors if (!isSelected) { if (index % 2 == 0) { - label.setBackground(GUIUtil.getUITheme().getRowBackgroundDarkerColor()); + label.setBackground(rowBackgroundDarkerColor); } else { - label.setBackground(GUIUtil.getUITheme().getRowBackgroundLighterColor()); + label.setBackground(rowBackgroundLighterColor); } } // Text color if (isSelected) { - label.setForeground(GUIUtil.getUITheme().getTextSelectionForegroundColor()); + label.setForeground(textSelectionForegroundColor); } else { - label.setForeground(GUIUtil.getUITheme().getTextColor()); + label.setForeground(textColor); } return label; } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(BetterListCellRenderer::updateColors); + } + + private static void updateColors() { + rowBackgroundDarkerColor = GUIUtil.getUITheme().getRowBackgroundDarkerColor(); + rowBackgroundLighterColor = GUIUtil.getUITheme().getRowBackgroundLighterColor(); + textSelectionForegroundColor = GUIUtil.getUITheme().getTextSelectionForegroundColor(); + textColor = GUIUtil.getUITheme().getTextColor(); + } } diff --git a/swing/src/net/sf/openrocket/gui/util/UITheme.java b/swing/src/net/sf/openrocket/gui/util/UITheme.java index 612792f5f..7af6a200e 100644 --- a/swing/src/net/sf/openrocket/gui/util/UITheme.java +++ b/swing/src/net/sf/openrocket/gui/util/UITheme.java @@ -18,8 +18,10 @@ import java.awt.Color; import java.awt.Font; import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; @@ -83,6 +85,27 @@ public class UITheme { Border getBorder(); void formatScriptTextArea(RSyntaxTextArea textArea); + + // Static list of listeners + static List themeChangeListeners = new ArrayList<>(); + + // Static method to add a listener + static void addUIThemeChangeListener(Runnable listener) { + // TODO: implement this once you have implemented invalidation for each listener so that we don't get memory leaks + //themeChangeListeners.add(listener); + } + + // Static method to remove a listener + static void removeUIThemeChangeListener(Runnable listener) { + themeChangeListeners.remove(listener); + } + + // Static method to notify all listeners + static void notifyUIThemeChangeListeners() { + for (Runnable listener : themeChangeListeners) { + listener.run(); + } + } } public static boolean isLightTheme(Theme theme) { @@ -115,6 +138,9 @@ public class UITheme { GUIUtil.setBestLAF(); setGlobalFontSize(prefs.getUIFontSize()); + + // After applying the theme settings, notify listeners + Theme.notifyUIThemeChangeListeners(); } @Override @@ -338,6 +364,9 @@ public class UITheme { LafManager.install(new DarculaTheme()); setGlobalFontSize(prefs.getUIFontSize()); + + // After applying the theme settings, notify listeners + Theme.notifyUIThemeChangeListeners(); } @Override diff --git a/swing/src/net/sf/openrocket/simulation/extension/impl/JavaCodeConfigurator.java b/swing/src/net/sf/openrocket/simulation/extension/impl/JavaCodeConfigurator.java index eea237e11..6ce79068b 100644 --- a/swing/src/net/sf/openrocket/simulation/extension/impl/JavaCodeConfigurator.java +++ b/swing/src/net/sf/openrocket/simulation/extension/impl/JavaCodeConfigurator.java @@ -10,11 +10,14 @@ import javax.swing.event.DocumentListener; import net.sf.openrocket.document.Simulation; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.plugin.Plugin; import net.sf.openrocket.simulation.extension.AbstractSwingSimulationExtensionConfigurator; import net.sf.openrocket.startup.Application; +import java.awt.Color; + @Plugin public class JavaCodeConfigurator extends AbstractSwingSimulationExtensionConfigurator { private JavaCode extension; @@ -23,9 +26,24 @@ public class JavaCodeConfigurator extends AbstractSwingSimulationExtensionConfig private static final Translator trans = Application.getTranslator(); + private static Color darkWarningColor; + + static { + initColors(); + } + public JavaCodeConfigurator() { super(JavaCode.class); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(JavaCodeConfigurator::updateColors); + } + + private static void updateColors() { + darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + } @Override protected JComponent getConfigurationComponent(final JavaCode extension, Simulation simulation, JPanel panel) { @@ -35,7 +53,7 @@ public class JavaCodeConfigurator extends AbstractSwingSimulationExtensionConfig classNameField = new JTextField(extension.getClassName()); panel.add(classNameField, "growx, wrap"); this.errorMsg = new StyledLabel(); - errorMsg.setFontColor(GUIUtil.getUITheme().getDarkWarningColor()); + errorMsg.setFontColor(darkWarningColor); errorMsg.setVisible(false); panel.add(errorMsg, "growx, wrap"); From 08695a8ffb90bdf041dde02ecc9aed0d5e7f5e12 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Fri, 22 Sep 2023 18:29:06 +0200 Subject: [PATCH 11/28] Add UI color for multi-comp edit color --- .../configdialog/RocketComponentConfig.java | 4 +++- .../gui/simulation/SimulationEditDialog.java | 18 +++++++++++++++++- .../net/sf/openrocket/gui/util/UITheme.java | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java index a62a0e969..0239958b8 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java @@ -100,6 +100,7 @@ public class RocketComponentConfig extends JPanel { private boolean allMassive; // Checks whether all listener components, and this component, are massive private static Color darkWarningColor; + private static Color multiCompEditColor; private static Border border; static { @@ -203,6 +204,7 @@ public class RocketComponentConfig extends JPanel { private static void updateColors() { darkWarningColor = GUIUtil.getUITheme().getDarkWarningColor(); + multiCompEditColor = GUIUtil.getUITheme().getMultiCompEditColor(); border = GUIUtil.getUITheme().getBorder(); } @@ -270,7 +272,7 @@ public class RocketComponentConfig extends JPanel { //// Multi-comp edit label multiCompEditLabel = new StyledLabel(" ", -1, Style.BOLD); - multiCompEditLabel.setFontColor(new Color(170, 0, 100)); + multiCompEditLabel.setFontColor(multiCompEditColor); buttonPanel.add(multiCompEditLabel, "split 2"); //// Mass: diff --git a/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java b/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java index 096bfc576..51fd38235 100644 --- a/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java +++ b/swing/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java @@ -33,6 +33,7 @@ import net.sf.openrocket.document.events.DocumentChangeEvent; import net.sf.openrocket.gui.components.ConfigurationComboBox; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.gui.widgets.SelectColorButton; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.FlightConfiguration; @@ -61,6 +62,12 @@ public class SimulationEditDialog extends JDialog { private final boolean initialIsSaved; // Whether the document was saved before the dialog was opened private boolean isModified = false; // Whether the simulation has been modified private final boolean isNewSimulation; // Whether you are editing a new simulation, or an existing one + + private static Color multiCompEditColor; + + static { + initColors(); + } public SimulationEditDialog(Window parent, final OpenRocketDocument document, boolean isNewSimulation, Simulation... sims) { //// Edit simulation @@ -102,6 +109,15 @@ public class SimulationEditDialog extends JDialog { GUIUtil.setDisposableDialogOptions(this, null); } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(SimulationEditDialog::updateColors); + } + + private static void updateColors() { + multiCompEditColor = GUIUtil.getUITheme().getMultiCompEditColor(); + } private boolean isSingleEdit() { return simulationList.length == 1; @@ -247,7 +263,7 @@ public class SimulationEditDialog extends JDialog { //// Multi-simulation edit if (simulationList.length > 1) { StyledLabel multiSimEditLabel = new StyledLabel("", -1, StyledLabel.Style.BOLD); - multiSimEditLabel.setFontColor(new Color(170, 0, 100)); + multiSimEditLabel.setFontColor(multiCompEditColor); multiSimEditLabel.setText(trans.get("simedtdlg.title.MultiSimEdit")); StringBuilder components = new StringBuilder(trans.get("simedtdlg.title.MultiSimEdit.ttip")); for (int i = 0; i < simulationList.length; i++) { diff --git a/swing/src/net/sf/openrocket/gui/util/UITheme.java b/swing/src/net/sf/openrocket/gui/util/UITheme.java index 7af6a200e..59dcae0c4 100644 --- a/swing/src/net/sf/openrocket/gui/util/UITheme.java +++ b/swing/src/net/sf/openrocket/gui/util/UITheme.java @@ -45,6 +45,7 @@ public class UITheme { Color getRowBackgroundDarkerColor(); Color getFlightDataTextActiveColor(); Color getFlightDataTextInactiveColor(); + Color getMultiCompEditColor(); // Component colors String getDefaultBodyComponentColor(); @@ -208,6 +209,11 @@ public class UITheme { return new Color(0,0,127,127); } + @Override + public Color getMultiCompEditColor() { + return new Color(170, 0, 100); + } + @Override public String getDefaultBodyComponentColor() { return "0,0,240"; @@ -434,6 +440,11 @@ public class UITheme { return new Color(128, 166, 230, 127); } + @Override + public Color getMultiCompEditColor() { + return new Color(222, 146, 176); + } + @Override public String getDefaultBodyComponentColor() { return "150,162,255"; @@ -668,6 +679,11 @@ public class UITheme { return getCurrentTheme().getFlightDataTextInactiveColor(); } + @Override + public Color getMultiCompEditColor() { + return getCurrentTheme().getMultiCompEditColor(); + } + @Override public String getDefaultBodyComponentColor() { return getCurrentTheme().getDefaultBodyComponentColor(); From 5fa13d5b79b674f5c1065153fc83c9e8ac268b37 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Sun, 24 Sep 2023 22:46:48 +0200 Subject: [PATCH 12/28] Add JVM parameters to fix 3D issue on Windows --- install4j/23.09/openrocket-23.09.install4j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install4j/23.09/openrocket-23.09.install4j b/install4j/23.09/openrocket-23.09.install4j index e609e716c..fd9c9dcc8 100644 --- a/install4j/23.09/openrocket-23.09.install4j +++ b/install4j/23.09/openrocket-23.09.install4j @@ -29,7 +29,7 @@ - + From 74d3eecee602726a5100f206cc869659ec130dd0 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Mon, 25 Sep 2023 23:43:33 +0200 Subject: [PATCH 13/28] Fix CG z position in top view --- swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java b/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java index 7cf764261..72e2fff73 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java @@ -790,6 +790,11 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change cgy = cg.y * Math.cos(rotation) + cg.z*Math.sin(rotation); } + // We need to flip the y coordinate if we are in top view + if (figure.getCurrentViewType() == RocketPanel.VIEW_TYPE.TopView) { + cgy = -cgy; + } + double length = curConfig.getLength(); double diameter = Double.NaN; From b46269a82d4ded6262bd87f7351311f54f4a9da0 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 10:33:37 -0400 Subject: [PATCH 14/28] Cleaned-up tubefin icons Fixed some defects and also made them suitable for dark mode as well as light --- .../pix/componenticons/tubefin-large.png | Bin 1781 -> 1722 bytes .../pix/componenticons/tubefin-small.png | Bin 692 -> 1722 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/core/resources/pix/componenticons/tubefin-large.png b/core/resources/pix/componenticons/tubefin-large.png index 76120e2581c54b82c92fa1105435a30d83f56fe2..2210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mUP3um??q_vo;gH!zP0he3scDorhV}>KF(lSZXgDgKiFu>EO&Muvd%}2^e)dx*TtW1Rh(LPez?<& zAupU|V@HrSCa{AQ>12KT_N@&?pNECovHK3xLmr&6&Cbr+;HcGA?6P|sypJ4qhvV{< z%i>6p?XF9pvr|Q7g{q}+{p;&=_{ia}PMtc{2~|2Gonppf-RKCwIt%9@3m29wGG+*^ z*lDhZm>j0M@Ollp@Hh_>j_j#E|&`rC=?EbaXCAbl$20B5hqZ*Is^8D z{a`TY!%#+o*CKm}nvbg;kr(ui@PoVqayK|9qy91f3qJAkM-?1-fjKHGE2GG}h~bEl zDJm)|1UW26MaBsGXpYY@)JKAy;I*Z`!hp3R!jMkLh_FaUL{y$Vdlts=B5$ChZ9Kd|f$yRf0!=P=%b={#t<2#)iLyzqf3iR$F^<|X7DLw|qIPd#j3@g4FF;*#D0hNf@i$hzq6?&gMQ;TNJI zDrksFm=*TW3x XyBS;JSU}da00000NkvXXu0mjf8Ea(w diff --git a/core/resources/pix/componenticons/tubefin-small.png b/core/resources/pix/componenticons/tubefin-small.png index 334bad2332fb6a1e8d7cd63382c815cf14d00beb..addf83b3f71cd9b3e193745d0059434f335b37e1 100644 GIT binary patch literal 1722 zcmeAS@N?(olHy`uVBq!ia0vp^azM<@!3HEVv~9b96k~CayA#8@b22Z1oMWjGo@u_m z3|c@o2Ll_U5Cbzv2@oH=Hw=pzU{o0_9jHuz<}F0kStOU_{uzfC+A%+yZ7e zn;WQ(!N|bK*vi1t%E(l~(A3Jv(#qJJAuRiE5>Se>z$3Dlfq_2}gc(=ZFVAFPVBVA& z5>XQ2>tmIipR1RclAn~SSCLx)GKs;a!V1XDO)W`OsL0L9E4HezRRXK90GK4GQ<#=IWDQi$wiq3C7Jno3LtY6lk!VT zY?YKi7Qq3;oh6xR2%GYXq22;|P#+|tZ>VRWk4+oUvvBvJ=&DF8z^N&&IbiD|zp?R4lc1BR^ z(1g)-`4?rT0^TjvNABWGBrmw1w}2AIiLu%0{bAs zB{MfQuNV|v#z3pFN?_F(iO^_hh^!Gw0;WmtZ+FDJOBc0^4S6wJ7Bl+RlvvFdfy7k!b5?f;nm z_x{puIic`UAoI%7_zPaHUN`l*y02_|pOb4dJ;>Vh!_ArB@15B*cV_IOdZCLi_SWr> z&%Sc~!|4-HOY+b1u+>e$WQy=BXu6tBSgpTVcUcJFOw z3>V(Z$DJs<^`^@Or8Uk@0qt$UAN!7oIlj<7slT8{yXtDpN}W5LmHJYhK@YbTMAYc! z1+AQPQETenXGN!1IvkQ@sdDUJVq0W%I4(MN@#;HM_w^i2+GQ4hWcH^x8@c7{>cr z<(c&__AX#NS9xrz{;3Q34pI#noFyNNWn;Zw)H9SsoA-w_~V&ch9Y%Wveu(`1N%4b6Mw<&;$Tj>N6<- delta 655 zcmV;A0&xAh4YUQ2F@FSSK}|sb0I`n?{9y$E000SaNLh0L01m?d01m?e$8V@)0006> zNklREUpcxD&k?EDOE z-rl4(olc{6yUl)?Vo`2ZzY0rNLS9}fl~BE2XPIB?b{uEv>Q}9sYrbn@!!QtGr_-Uy zMx#M3K|Y^H<$rP+<#IXX3;5`izk^IXpWA!BN9zlP0*y1747I6L3WdXAN)Ar+#C6?d zx7&RYi^X1fp0@#vKn{ULrzfZMBZBSR_Clfg++q2U+ItV~BT*1guh&DGrWriXe+Hhz zrrwhqyBxq~yOMkHFuJgIt+ZwIM*c)KaGa^?b zhOX;t&~wZo&V~|)O#B!GuEWiez>VQ>cqb8jaReRjo>r^nnQ9g*wf)Z6d6JVA!&(OYkz!^*mYc_3uJ-Nd}D)eg+if^ pFs%s_UItMU{BJ;AlB7>R0jgz8+^6lFGXMYp00>D%PDHLkV1oD6G1LG6 From 2e80a27408fc11b3f9cdcb36b10c966233bfbce9 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 10:34:13 -0400 Subject: [PATCH 15/28] dark mode icons for parachute --- .../pix/componenticons/parachute-large_dark.png | Bin 0 -> 3150 bytes .../pix/componenticons/parachute-small_dark.png | Bin 0 -> 653 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/parachute-large_dark.png create mode 100644 core/resources/pix/componenticons/parachute-small_dark.png diff --git a/core/resources/pix/componenticons/parachute-large_dark.png b/core/resources/pix/componenticons/parachute-large_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..bcdc3b9d4ee8f2eb4c1cb619e273f5317c134fa8 GIT binary patch literal 3150 zcmV-U46*ZxP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D3*$*dK~!i%wO4y| zO;;MOCk~p6@=)rJWD;|ZAz;Q^=wfrt)|{%X0aBdic)`IDy37Z-V93_RnJZ> z)v^+n2vMa|O-Vc&5d=4n`<&lz_kQWQ*A*(}TkE&ZKHuJF@9+0L_TI-(PgnfS=TGPM zJk8=y_t^3@h{zn~r?1YRh~a#iN%+1$mQ=J*MdHus0MpZ-Uc{F`MWD#DLXpM(h=`Gd z7|mxu-MV#~^z7NQdqP4&^O`klCIWS%qM~9A!%(*%ckbM|30y-n=fZ^x>AQCAI)?9V z04~4@&}g;^X+IXBKSIQp01?=|d-q<=nl+n}oSfXEe*OAkSFT)f_UhFuh{n6!%8iF! z!wA4bze58#a^#59VzIc-o;`a#J3D*d;lqcQ-n@CU09_>H0DQ^u`A{-?(#H^vBLV?U z;H|gbn$e_5lc|jwH44p0&rlJO5k|+39TlR2ZVY||5r@;Mj%Q@3)2C0nBJ7UL<9S65<+xAxs z%LhnENSVoa5vquY^yw%d-|LJTHELr@N=o|^Cr+sT{rkJyv}vOWSgls&aBv-uFch99 zZFjl6ohU>_0s{k8czC!93JP*>-MZBX2?MR;`*EHR=s__3ELT#HmxK6c?s3PNa*|1vp(W-lYw8yA8Cd zb84MD1srqx_HEt1d-tw^wN%xrRo&PWg8TOE`{LEBR~sPJ4*h11w#$ovNJT_62}B}c z%9JTt2!Hi%-MT3hwY#Y3o?)| zq*zFBh)yqT0!G974c(V>FB@IDbV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-%K754iLBYY zd9$rWix#8t&hO+~&P{uSMEU9NTO*QM1jEKWWC(58nTjV&n2>^P_y=syCvjb9ThNh_%luhcS&IWiW2?5hLxM8v{{3)dk6r2_^GNX0wTFB%?g3qscE)29!@ zd%4Gf7*9kPC5aU0s)hQ?|Mb&O*PvaaUcGv;AAR)Eu{CSf+{DjY7wG7HMvoDY`Kki6 zN79LQK2n5?oFODr4d8^~+{yOs+h<2=%)~p%)EqZ%+-4O26|`k>8XfJ2Na&0iGj?Jt z{S^mh3`rmY|HT%41I68v-vA_GCeHOAO2XgvD`HMFLPDv-IcLtCCHPkugQ(1(JbCiF z(DA?fFF3iw7A#o6|7|WNj-YTYE*|jOYp=D#N!a0PvTBh4Dv4=I&|nh`u!206U7Ghdy$|#iin6zAd{6(4g#6Sj~{P` zvmj;Oym|Xz+@YU-`soz@8+M@Id<9}VXwsxf+oPhQO5pu89Hd8Z5Buf)_uub<=&*?W zksw6xmjvZ;iBNpW5IWsZ{5iO$bY;FTS+e8=YGMM2J%?Rv0Q!YY5YB|Y*rHR={~-u{ zhaaz#PWv_*G5Bj+73guOucWHpf54=eUE-z<1&hGlYZ?;Il%ZAx|nK;^m=>7cV++o@_B?tcbJK^dd4qf}$*w`5SZ!8--cI+a2!tcd!e^ak>P1}Tia|9|)g7P$pP`t=|{q@(!yLIbk!H-~D{7EjK zIB}wokSLg=@x&x3Pn*aCf};MRY15{W2M!$Ah`ST7=rmg2-`MSWuM`PNWopD%%r!#? zNxkq&!KbVxY2|zIdtwrlr%8ljCSxYVC-pRx2Ge*!rAbhpHW7-DF%u$$h>$T8s1ymx o|APoc<`pvLb;NKpDk)0+51ZN7Jt@s2`2YX_07*qoM6N<$g7_o>+5i9m literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/parachute-small_dark.png b/core/resources/pix/componenticons/parachute-small_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a8f264eb6813e3e5ca05b9c6bf1294d5891c6911 GIT binary patch literal 653 zcmV;80&@L{P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0wPI7K~y+TrINvG z6G0Tl-|i-xY)wsD5(q(09*hJ*f?zH}E}{p$wW6S)7ZC&zw1R&^sp7E|FG3M26cp*P z7>n^5^_E~DZ4zRLt+l(`-3`gk_)Q#9u}!P};K!RcJM+FbJ41U_sZ&^PU zzr+~(%sFQm*Sp>Bt4^nL3u}(#aydnA*}qWyI!x*?dt;gwuU4zP-EQ+@vB(>Z2Cvm> z+;JR^b?aaejhvQSchtb{^7*`u6FkEy53Q`OWZf;7Hok3;u7@Zb4$<0|HHyV!d0w>eu5baTC1=Zl0i&=H79VMI z)1+whAaShicpcI-jf^3Kg2AAhJ(XP+5e-~a6s7m0;xBD$48s5nuHv`doqs-`<~}1I zMni@{wq^B=7-uvb879lNNLAE+p#zZ!xt>RwqL8AgUnj;VKI*!@tg7l1%)Nebscnrb zmCBT9n)hY8Z-qjkC+T$hhD>)>tJMmCaWDt!;F_GjBJ+gE#p9CmVelT@k@+R?3A~Ww zh?xIf1MgS}n@%7+1|wh+oCPPrnP#)u&15nP*32Lm%{&6rKxi_NNEGDwFYRjlQz(8O zK@?pDqKUUKzL!iUFJt@=d;mwm0~jtK4wNe6u0pXzgyTRIJq&IFp{D@PoR+|`y_o*D n#GQec;*Jqt1Mvs`K}6pHBv>R>am?FI00000NkvXXu0mjf8si;l literal 0 HcmV?d00001 From a84b764cf290f3f9e543f60b514efc8e3b80f505 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 10:34:41 -0400 Subject: [PATCH 16/28] dark mode icons for pods --- .../pix/componenticons/pods-large_dark.png | Bin 0 -> 1752 bytes .../pix/componenticons/pods-small_dark.png | Bin 0 -> 244 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/pods-large_dark.png create mode 100644 core/resources/pix/componenticons/pods-small_dark.png diff --git a/core/resources/pix/componenticons/pods-large_dark.png b/core/resources/pix/componenticons/pods-large_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a88920e9ac46a744138a37045f9e2a7759611182 GIT binary patch literal 1752 zcmV;}1}FK6P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D25m`1K~!i%)tFCg z6;%|*Z~I#Md`P7ga8VIzkU*d@mD1pf#?UTI3u$A+hJ`Ck7c5Lyf*TTvE229iD-+ld z3Gzv|Ha;5T_6e$^uM?1Pp;)Q|}jH zWhBI6MDPd2bg9Z?2ntcLiExJrChEEm^k#=BHzK*2YwxGzqL ze~N6gzeLL!koOjgGz$XbAy1+*5iu)8#H0Y8hsiimh9B4Sp2BqE@o zJc(m#;h32uaS4hUejrYW1P*~+Q%}3Cge82zi4LL)G3Nxr)?j8$3<3WlvI2mTd+JRD z{UdEDLtHBY2!`#!4D+5KSl%Q472%$G+UZCC$Ra@09Pz_!SU$kk{ zCfDEJ|M}UoXFE=uI6=O|lI&51*mzc<VB`_1t1aO(E$+iu^!eQw*fZLX}W z%+1cux}l*VcmDi&S5s5twrtrlec{4|*N+@I@`J`AhSdSFZn-c(1Vlu#qoZT}$jHd_ z(W6J_dwYAmRag$R(@!h*@X(<{FET!D$86?}f(8jTj*@SsxgDlv|&wig%2ERSZvE zov?5AAQ6m(rHMqMesFNm?cBMOw$PwI<4Q_O7-*mKK`WAd{{+GaF(Ved|DFUz2&H@U z$R0f5VEv1Wi`h~Lv4jUf{+7klgxFyECGEk6e73tEp0a&({R@=>0LvI91u# zFu-n*zno&Sm1T=yNtZjHTBCwJ%ogATaeZA~UG1q;r#=`M7+4`e-tkXuZLO=UtaK9- z6HfJxM~)KmK-ebMtHZ=5h+u>Fak<@0cP9(THk)tmIW{7jE-$YJAm?f4N;~WLC z4OWZTU{#qQ9MX^e{Ex6*ITB*h@J&DZKcB0c36Nmzi371^NlF`A zf_{98*yjjs^fSNtoQExaXqpHU6u2Vd)6S;|4x`Ktc9;+ZKx~>2+Hnlo7OW!etRy}Q zJ`clz0i*s|Lvh&iDP|X=_FvAujb{t71u6ag>1Sj7{loYpKH?-^@2O=%yc>ZAW(wmb z1_NQwr1QIaVdUOy8SOs1ALH}! zXSM(~mJ;0$f8HRJr->yZrOg~AMlt9aOM~kmyV=O@SBSqQza&}^{0{s6p{J&a4Pe9q`C<_q@nm{9e;)l(&Ntzrwq+O4rugKTyd{H;DGxpu3^DSzwda-vJ8 lJiW-C^!{YQhkMKwjQPR^LVr#84*?y;;OXk;vd$@?2>?74S0?}f literal 0 HcmV?d00001 From e668c7b1830d680541905662877133a09d977ba5 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 10:35:19 -0400 Subject: [PATCH 17/28] dark mode icons for shock cord --- .../pix/componenticons/shockcord-large_dark.png | Bin 0 -> 2344 bytes .../pix/componenticons/shockcord-small_dark.png | Bin 0 -> 759 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/shockcord-large_dark.png create mode 100644 core/resources/pix/componenticons/shockcord-small_dark.png diff --git a/core/resources/pix/componenticons/shockcord-large_dark.png b/core/resources/pix/componenticons/shockcord-large_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..437f56a490bd0b69eca498cae8cb871d7f4fe9f8 GIT binary patch literal 2344 zcmV+@3D@?CP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D2)#)}K~!i%?N?c7 zlvfnK|18O5nQXI}YMQ7~<5Hq%C{(FMYo$_c1VIWdYEjx3eW~J`_C*S!SbZqkTHE4- zt>S~BAU?R!fYqo}i4p#v<^K z5i^NcXU?1n_snml>(uPB>jOk<@yR{LK;s*{N^=V51; zZQHrfVsP1>J$v@$<>e_;7A;!Ty>{)|_l_SwUXMPEj2Rt5%BDykLUcNeaBNZw%<<37 zWvySo-ZOFHMBj=PD+1-^<$kx@9dJ6GjEElu1D0j^ApXY2#;Q4U=3MCL=(zpl$rDdF z9QH>dk-S(emeJMK^$`7=9zT9ugZZw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 0 HcmV?d00001 From fb3641e94f855a23a9abcacc3642aa49b6f6ecf0 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 11:08:07 -0400 Subject: [PATCH 18/28] Dark mode icons for mass --- .../pix/componenticons/mass-large_dark.png | Bin 0 -> 1714 bytes .../pix/componenticons/mass-small_dark.png | Bin 0 -> 446 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/mass-large_dark.png create mode 100644 core/resources/pix/componenticons/mass-small_dark.png diff --git a/core/resources/pix/componenticons/mass-large_dark.png b/core/resources/pix/componenticons/mass-large_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..e8f45cf49d502630bc24b8fcadd39fb3d91fa76c GIT binary patch literal 1714 zcmV;j22J^iP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D21iLmK~z{r#aByA zR96`O@0~j!gTU|z&oX5|9`OOOrm2CZz6y4siEc>4$^|YO?ZU=IS6#Vv>8f^RV&c+` zg|@6r7ofP%Xg~*33KS8PVT5@wkK6w{_x^CfVVnVp-{i}=bMCq4{NMTi^Ph7x+I?gi z!?epCW4DE%f9Du@b{dc8k0NF_g(wkMuU>6Gdi3Zo9*-xqyuAE#Z*T7#t``ALAv+S} zvdfPJ@ql7qU*GqaFJB%oO|wbY^}`1b9{h3d-o1D3-@hM1W3<_#{3KX2oT=M%wYIhv z-MDe%*@FiU{^kFL9UUD9hK7cs0|NuU;y<&1na4Dkm{9o^l>V{?KH3S=iU8eiwA;66~2h}%BrwHM$1B2{gmNP4umCP!eHDFIq&u@W1Ao=+5 zC%bH%F5oQr6ohtG~)G;1ry8^B@+osIO_3?PF*gS zwz#+$c=+()s2XXb@fkgm>ta{l0IRF3J72zhsqx^-8z84yf+$Y4WTwn@Lt!{Go=8$W z9^XJ-{EGN~W@d&s+kMIXW1Tp&nT)$7aup)byk76&>FMb_!!VSw5?WkG&z?S2!-{}) z##I?lQ;+XMp%Af`Te%x#HWA_!u%(#o3Ncv7fpB<*y+EeSIy^En{U42uk1NlJIFz7< zAJ@Z+DjZWh0V>pz$}6GJ5;Zk7)$%9EhT;wJNJeZ&2s+KLsi~<8ha(&wtD4L#1R<1R zDC?t0BtpC)QaBu@WIRca9zCML!9f}s8KH@Z2?{O-S&a29!YmexQ)6Qzyn)aX5h5g` zm|TUZ4zFLo-oP_zz+lW|BEB9bYL!i84`Ku>Sp6F#|W!9oq-mru~1nTbI zy-N-L25M_-Qy~|a2++QL`>3L#LY3Z9FD2L;Xe*PDpPx^>X;N)%?QtGPgk&Wq7a;NPJYKjUA3r!f3QX;TUuxNRmaQ2DDqU5XpoDF4TlL(s_Au%Z7Og^rtcUDTavKd10 z)$A+s`FtHb&Snv51qgB#qB`Ug>=z3Q3ouTDH`cRIN{OkjuU8@T=U;zNFu2Hjv`Hl; zB{a?AvB-nLAkELsEANRnASN1(P$U{AUVoqQI3h%t5xEKhv^s`b2hpgtx!GLhSw-Eu z&^u~q@RPr>k?!5QM{}=VBOGbr%^SLP>lTd+k5I9RXE`W`y@2993FcT5zvXV{T$v1iU2acbO7!2;^N|CV`F1ONT0h6 zKFeXj|HN11JN!4oTxH^pA{VZV$NCR~-Ts~ZxU1lCzO^3_VqT_)i7W8t^`eliM?NKR zkB2AV5qQHonQrn(E}^Bui;38E(s}t2;5ir9JKKwq2p>tkAjF_f!fHeR&cQQ5+QDED z#&5naWZPFZ*ephvRs@jC;9@K&#!CrE`7t2I3Z0$+q_jcwKQO4b^|?7Z_5c6?07*qo IM6N<$f))}loB#j- literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/mass-small_dark.png b/core/resources/pix/componenticons/mass-small_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..192e767eabb554b3cd02d3cc89c0a2e716daca0a GIT binary patch literal 446 zcmV;v0YUzWP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0aHmtK~y+Tm6N@0 zgD?=s4?+??LWL5kdn$Ed=+@48fGX;Mgc!SY$WW;-ft0Ze?|>Nl0xT>%086E^@BkSq z*(RwP+qhF>13&5bpE-Po&o+!@zu(^#MR7{g^s_9>pE!>1MQ9Yd(80K_``R>39fsj; zUDsdBC0MxhCnve|5mBuS29*h>%uZdFy^Vkl)IRLVPLwOT#cwhfv-0o$=)Y8aqT zbg)bdOw)w1BGXIb_krc3EvG5z~rrkbw7v2FRgODq;wfHC4eE#8}V@E&7? z0b#lQ6&;GQFxy|IENPcqWr!Ptu6V&61}J;c(zdPsdhjh<1b^!skU%^uiql z%EFH0JTYZ$CI~^>o}`9poOOladEO&;6ete?J6QCp($x~s*q8iqnb~YglXda+`lk1Q o^%fTHXm-1umFIcaf`0&<0g<@Fbah*U-~a#s07*qoM6N<$f@_PxDF6Tf literal 0 HcmV?d00001 From 2af7214eccf82efb70381959545e79be99973786 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 20:39:37 -0400 Subject: [PATCH 19/28] Updated large tubefin icon again --- .../pix/componenticons/tubefin-large.png | Bin 1722 -> 2855 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/core/resources/pix/componenticons/tubefin-large.png b/core/resources/pix/componenticons/tubefin-large.png index 2210d64a54e79dc234bbae92f43ff65a7a267559..5de7272a5d2c576e4c4b953654f6dc38561e7818 100644 GIT binary patch delta 1763 zcmV<91|0di4W||%iBL{Q4GJ0x0000DNk~Le0000o0000e2nGNE0K9UkOpzhBDKek~ z00aO40096104M+e001&DGBY|bIXW^mATc&NGdDUhHvn8h`5&?Y!U6_1Ix{yqF_Xvx zJqk8dGB7$bH###klMe(r0X36J1ULdTFq4A>On>g8t-b&N20TebK~z`??O01s97hoD z*=3jK@-#1t@DL`JEMXra<&uLh&LKjwA`B9dK#FgibIK(b{s))%5XsnrNIoKg4>?7- zM8O6l@rn&b;0H^1?C$Kgzpt2{%+Ag(V+rCMwoq+%SASjI)!kLqgHmNG??8D6$~#cr zfq(z`4pd@&KRT>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componenticons/mass-large_dark.png | Bin 0 -> 1311 bytes .../pix/componenticons/mass-small_dark.png | Bin 0 -> 446 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/mass-large_dark.png create mode 100644 core/resources/pix/componenticons/mass-small_dark.png diff --git a/core/resources/pix/componenticons/mass-large_dark.png b/core/resources/pix/componenticons/mass-large_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..e41e1f590b272ed6cfda159266350ffd65bbd72e GIT binary patch literal 1311 zcmV+)1>pLLP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1hh#+K~z{r)mY0; zBS#dy?QVk*W5ZyC6cG~`fj}tH5G5-lmPpxTm(Ap{%O~Uy@(K9>q!48@*^mW_XR=EM zDMlhJGEs&BX^>46zp!N+{AhP~?zvqB9t4TIjZt#Y)$OXT$31l))yAN~|p7$^}%;wP3@(n0h#%e#Xh6H$6l zfG1wD;U7Zy`8U;f>lieVJHuUs)~_t^1n@q~JM5jJ-|Puj3&gePi%2Gu`K(r}eXW{( zBNmH&l1wJQRn0&MO@vR|avaCr+1Vl2bw&C?tJR|Q^>s2$GsYgPtL~oBPmU}#8VxF! z%VI>k-R?ouI3ABVTAD1t+1VKsDqCRmLu931uj2$SJmPsC8HPcTNQ6AsBleg`r_&L! zI}X{l{hDZ!m|v+#RYo2KMn6Oza(<9ySz@dXt!y?+zdwI2L8}Q|iY?l{rXTaM-tqDA zSF+IcxG@z%6Dbx;U({-KIKk7Wj>bv$Px|A<3-OF52Msas$NlgkwBzytI4(KtDR`w= zEE4C3%n6FnL}IafR4Nq>+in~BWI+g(5{5EALJsZj?$Y`BIXSjNdwYA7N~I{BPSerR z5mm|+CgaaVn3YPUen%I1=^;tih&NT6?PYl~**W@%|@ zNkZ=M=#b{;=V@|sQuO%!aq6%)FjgPJ=;)~A3FGdF;N*B?4~Dox0(pX@!h8LK=lZh_ghaQF(_0KuDqwp;#ysu>O0pO8|r-!Z-StNK7`)fHy9ykSk>P zc9sx&`r{KWsbwO^qp`6u%4RZ>4aqAo)NeJl}vc3Jy{#=j(GGw!!ItiF5vnAX9$J`@pzRpY#IK|+k^dKT#_$q>u5 zXnJ~@wMmPMi?q7BDy6o2OotO637^mBuuq^o2}9%|h+G(<%C29vblZQ1mvmW1 zC^<7ji9~`g$useoKi3zRrNQ@4HhY470#&ZSL~^;@=O6-DQH!EhR7z{0FgnyuN&Jx!{uOD6v(a zf9YIVzgHr991MoQcuhc)=yk1LaFvXfYe@h>HrK{NwDDR4THgk=v0A!40cfp2^fxn1 Vbbkij4Eq28002ovPDHLkV1gTJY9jyu literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/mass-small_dark.png b/core/resources/pix/componenticons/mass-small_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..192e767eabb554b3cd02d3cc89c0a2e716daca0a GIT binary patch literal 446 zcmV;v0YUzWP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0aHmtK~y+Tm6N@0 zgD?=s4?+??LWL5kdn$Ed=+@48fGX;Mgc!SY$WW;-ft0Ze?|>Nl0xT>%086E^@BkSq z*(RwP+qhF>13&5bpE-Po&o+!@zu(^#MR7{g^s_9>pE!>1MQ9Yd(80K_``R>39fsj; zUDsdBC0MxhCnve|5mBuS29*h>%uZdFy^Vkl)IRLVPLwOT#cwhfv-0o$=)Y8aqT zbg)bdOw)w1BGXIb_krc3EvG5z~rrkbw7v2FRgODq;wfHC4eE#8}V@E&7? z0b#lQ6&;GQFxy|IENPcqWr!Ptu6V&61}J;c(zdPsdhjh<1b^!skU%^uiql z%EFH0JTYZ$CI~^>o}`9poOOladEO&;6ete?J6QCp($x~s*q8iqnb~YglXda+`lk1Q o^%fTHXm-1umFIcaf`0&<0g<@Fbah*U-~a#s07*qoM6N<$f@_PxDF6Tf literal 0 HcmV?d00001 From 1c14aec04059355639644b96d1b266bb62db0a33 Mon Sep 17 00:00:00 2001 From: Neil Weinstock Date: Tue, 26 Sep 2023 20:44:51 -0400 Subject: [PATCH 21/28] dark mode small parachute icon tweak --- .../componenticons/parachute-small_dark.png | Bin 653 -> 1780 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/core/resources/pix/componenticons/parachute-small_dark.png b/core/resources/pix/componenticons/parachute-small_dark.png index a8f264eb6813e3e5ca05b9c6bf1294d5891c6911..b837e4eced1b9687d59d5e341f5c95255378115d 100644 GIT binary patch literal 1780 zcmeAS@N?(olHy`uVBq!ia0vp^azM<@!3HEVv~9b96k~CayA#8@b22Z1oMovIo@u_m z3|c@o2Ll_U5Cbzv2@oH=Hw=pzU{o0_B(&Fe2<+zyvo#ZUHl#%?(t?uzcyn zLLkLi;1OBOz`%C|gc+x5^GO5E$jJ=?Nk^)#sNw%$0gl~X?bAC~(f|;Iyo`I4bmx6+VO;Jjk zRgjAtR6CGotCUevQedU8UtV6WS8lAAUzDzIXlZGwZ(yWvWTXpJp<7&;SCUwvn^&w1 zF$89gOKNd)QD#9&W`3Rm$lS!F{L&IzB_)tWZ~$>KW)` z(+2b`++0kTFU2_%g`Z&^7PrGk=ANPd2f9k$eDqmQl%%>Z9ubf+YiB)TM)q}mx7 z7#ZstSn3*?g%}xFnV47^80s1TNuXmu#-ON0G6xhORuMs|#rZj{eh5fgOk}232pP4@!?n z=@XLp!J@#_Z^s1;7FbTQ16*5VMmc;_wy#b&GVhDwq!wO zo+ZauCB^n{4;HdtY*zB^nBaUc?u?_rpJ2x-p*>Ty;#dUx!&aznQIczo*fQ_Zg_zq8 zw^edIaxa%newXK2c09kE+wr>EqXUntH|Ib5n|5!H>Z^hjBgyc+aryg~GPF%Y8n7i-gcWc(JZJp5f+936JYC|t`5X+lxo$EJ#{j$1!^Je1BoM}_NRKqkx zW-QX+X}@uJmcPY`rDc)+ws-H`nIq7D{63@1of~%~g8D;l+22rie4!NhX3<^w-A~?s zpS);AiiB0=?>%Rpe-GThzyAEol4aATPk-;GG_mcjq95zyY5Ad{Uv+BZclFJlP_%?0 zVS+}dOV7oJ3w`AL^$k<(uJxUKSTNy=?!?nigWB8M#2LdA%`N+~|M6{SWq#pu^B6;= z!SA|nOqY2tF}|9nvg&%4xU!jpX*(A->A&#|4jn4h_*(=QyNv z{&R3c_S%Bz0=xP1C#C)je0}KuN7uj_V+)Il-KOmKtv3D%&@kD#b*rfR<1-G5OFtG^ zoXO44@1Oa(XlKp2Ig2l!yb`0QF4}!m^vL_aQPU61vw6e3PgQH`saoyrOShSCYg(qK zqZ8xuGXB8ZX1@dL7L*9Czg}HgTDoTlYwvcqt)E9u+>+i z8*CVNh^LmbHy=!Hc->(4^=FN~yPMm;7YWus>>Jmz{MdgtV}|6OhrNxBjV8P7t*or7 d5{_D5oPV^$nd_#nNHeHl_jL7hS?83{1OTx)X9H7#@f!7(U?6Q0Vu-D^yW8Cj$tGR$oR(X6)WGiY`Mi!3Ji{put*owO-7S|kzHN}MhbSBl z(b|_aip68(IDalN=F{lNC?AWBQ9Kr34+H`W<#PFUDwXQWa(`%`F-|$>d0w>eu5baT zC1=Zl0i&=H79VMI)1+whAaShicpcI-jf^3Kg2AAhJ(XP+5e-~a6s7m0;xBD$48s5n zuHv`doqs-`<~}1IMni@{wq^B=7-uvb879lNNLAE+p??FB2)Uj|nxc@Rsb43?CqC-B zzO1V16wJMTaj9*ME0xNWX`1(Cx^IO-p(p8d`i4w*R;$$tfN?Mf>foB3zasO5$i?H5 z^I`BF+>!Yu@Cm$- Date: Wed, 27 Sep 2023 08:46:43 -0400 Subject: [PATCH 22/28] More small dark-mode icons --- .../componenticons/ellipticalfin-small_dark.png | Bin 0 -> 419 bytes .../pix/componenticons/freeformfin-small_dark.png | Bin 0 -> 464 bytes .../pix/componenticons/launchlug-small_dark.png | Bin 0 -> 284 bytes .../pix/componenticons/streamer-small_dark.png | Bin 0 -> 628 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/ellipticalfin-small_dark.png create mode 100644 core/resources/pix/componenticons/freeformfin-small_dark.png create mode 100644 core/resources/pix/componenticons/launchlug-small_dark.png create mode 100644 core/resources/pix/componenticons/streamer-small_dark.png diff --git a/core/resources/pix/componenticons/ellipticalfin-small_dark.png b/core/resources/pix/componenticons/ellipticalfin-small_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..ea25386e455fa16a45ec7a8fd6f087ebebf24fbe GIT binary patch literal 419 zcmV;U0bKrxP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0XRuSK~y+Tt(389 zgg_96M@emUf?$etrnm>lr4TzUf~DXa1g;b8E`*T0h?Ru2>0{?J*b5PD#IzFg4>!dH z&eO#EV3^(6e`a=-U4{OE<2VM~9qbZT!rrqitKetzr^aY_0rv>IcU^a77zR~UMR}f6 z*L5$5KVbtsYtIHZg}udbJhW{)9Kv&s^SW&Ae4yYiilU+KdujI@j`KR}BxN}$cIEs2 zP}jAzIS#Kw+pu0zM^VL3vGqKUbX}L}ad`j`fl{%H)Yr zWDVDvrnwJHAi7raMw#=e*S2k6%Xk)|KiPQl9%JXbFbtok{_i18(@>hG54h8Ow~wME zNn+yH++e(+Z{?QMVWVjpS(ZioKrDeDm!c^6aUs0WbcEP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0cA-;l9* zj*gBJ#>U1BAS@vv0Te<7xDpl!;LKYR5x16!7B33vfJt`t*qbX!d8I**Af9?Pp?QS_uGM&T(Jj%+nbF0000QCeyX8xK>xx2^Y88dySKPD zyxhP4f78d~-{nspQYc>Fwzz@uv*9&`4`06>edSej;Mv;Q8*d%V$j^VjXvK;bYAPxz znp!%`^fYx9PaQvge8IYP=M)qb8AILVDn349J$!byxujj~uOlCxUyn~XQ(OJ%@9*!2 fvM~6v*IhXFb^9Km;~6|%{an^LB{Ts5L6CNC literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/streamer-small_dark.png b/core/resources/pix/componenticons/streamer-small_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a0ac436d29a19ae287f717c3f4bc3814195cce50 GIT binary patch literal 628 zcmV-)0*n2LP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0trb(K~y+TjZ-~~ zT0s=O&qUud5O>8Tg&VO-DT2XHM2j?GAwkjyYy*b;jFhpo3aNvnN|i!I2yUaGL<>z3 zf<%a9gUkE=$eD58%h!9m9vJV;nS1X!Sc-G{`Va+H5woUax7p-HOU^G#ZWnbRtjO?RLFlu?R64q6tc{C?i7HGAsx)aST%@ zLo-P;G}2X#N5^qUQEpLEQE2sf6)GGP@oIP?a-R};5(vMQw{O9yKY^^@IUzVec;C@u zT|CwaGZsB>zm#0A%FP5h*W)i?_V@ZjP@<27L`HG>{Y;YhDe=pbxEZ!146qe1jX>m{ zf5)!tMt(s4$9Ds5R9z=s#~o`rIj+O+S4k#mwF-9Unfu9!_q(R()+0*Q4V7T3GAO4&W#uy(kUZUt5 Date: Wed, 27 Sep 2023 09:05:22 -0400 Subject: [PATCH 23/28] Tweaks and cleanup --- .../pix/componenticons/shockcord-small_dark.png | Bin 759 -> 768 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/core/resources/pix/componenticons/shockcord-small_dark.png b/core/resources/pix/componenticons/shockcord-small_dark.png index 4f6a3b376a2f5471616a3e80468664b01290b35a..c673df524cd0ab776821961ee60068e77a110402 100644 GIT binary patch delta 694 zcmV;n0!jV%1%L*SR)3XAL_t(IPpy>CYZE~f$9I!7-PB6b{HV4>w8R)`k|AK{zpr@P-N+F0n^dcfC3ccv1hk`kzJs47`#^x8%<`64*3hA$`g#5DE^*fnK z<2HB@`hmxr+4pw7GjHB5*QO+v#$k71&tacoawrtCvhaz+Gk@PAm&;vOahz8x2se11 zzg#R9eh5FHgFm_uloD@U#HXQQTj?Z;c)l`shIdnd=GofDml)=Efm7o z*&f^u*`Xv$MSm=wHknKXx7!^G27`5y1Mwxe&1SPXOyjYbbkX`v7v85ybJUdV~};7e0eQ-3bpa~|{WETzpSl;6k33M>}O z#jUNaj7Fom2J6L%jSw**q^B8_<9FOH_r6-A7Hu}$WG0h&NFyDp)#@5tyV(@<_4T0- zb!Yv4|E-~+p)+`7K${U^dnfxu=ypFgx;vJ2>bi11%!xw&L87(?{c6E6a%ZJ(^g;^N{Rl>Hm|mSN;CNdAU@ ceajs82bQH2@K)H3iU0rr07*qoM6N<$f{rLn+5i9m delta 685 zcmV;e0#f~e2KNP!R)361L_t(IPpy<+Xi`xe$M4l;*SYY|W`%8(7zz%8AR=h%!BT4U zRxf*9Pd)85gh3GlgGTrkjiO$xz4V~aUJ5pAXlOD`nv=Cn!H4`aum4cz^!B~?9w&Fw zQ~SW-ch33!?)jeI@0@$6F4NP~+|v6G-0I2-x4XN`u_cysxqn=v#C`10#0n%537d?f zt}7Vk7EROEY&P4<=ks?bCnx7sD%AuD3ztfzcN&f6EgAn4j^i%CRIyfGoaq4_3Hc6M zv)N4VH}~sStM#MRBFe+x|-uF z$yb!P``O&wJb#C*?ykj<-&tOV}!x?5-_NEvi(kIN98@p{b>W!)G?d_t&;rK*chYSr3 Date: Wed, 27 Sep 2023 09:39:09 -0400 Subject: [PATCH 24/28] dark mode icon for streamer (large) --- .../pix/componenticons/streamer-large_dark.png | Bin 0 -> 1573 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 core/resources/pix/componenticons/streamer-large_dark.png diff --git a/core/resources/pix/componenticons/streamer-large_dark.png b/core/resources/pix/componenticons/streamer-large_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..734c726bc3773667ed98356775679a18ebb5cd6d GIT binary patch literal 1573 zcmV+=2HN?FP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1-eN@K~!i%?N>`k zBv%xz^8aZyI2s$HMxy8-M#T`L3<me_mv5UhpcmLr`qGB4ihm1I zKqljrED?!XCz3!l)=!AEa{$Yi>IoPe9ApA_!OEzu249J?Tq~b}8&R%;3*hhIZ*6UD zv#>9NxP`D|1W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gr7pw?wvm#6Py~}AMxKQ_M2J`sT2_%q!9}MG9 XUmOj}MwCkF00000NkvXXu0mjfcpl{k literal 0 HcmV?d00001 From edbb826bbbdc6aca9cb6b425c3f275ad83e2f020 Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Wed, 27 Sep 2023 08:20:47 -0600 Subject: [PATCH 25/28] update 3D printable rocket example --- .../examples/A 3D printable model rocket.ork | Bin 4292 -> 4356 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/swing/resources/datafiles/examples/A 3D printable model rocket.ork b/swing/resources/datafiles/examples/A 3D printable model rocket.ork index 4b3a2bbea7b847f49f1c3bf8989732d72abcbd31..7c1ff65d85a34171dd3802c22804675f8320b759 100644 GIT binary patch delta 4329 zcmV@6aWYa2mpz#I*|<=e>`h*nys!7T2?grCp^S_t5$E3`2*UeVVrY6QfQk<6`=}kxhOFzbJQ z2jxJtOR_MB>7abSQ%Csq+XJ#lwp$hFf2-R~m>tH9HatW5LjtqH?W}e@&9grsj)E{o zg2&g0#}XdnBvVKvv6`csPrD?|QNB?%Qi&7h84{Z?lBohfh5#4Me|q;9K#KZQO-8xa0zGZQ^+u&23sJ5+*d-Mme-M25>)Sc{m~0hVCy7MKP7e^c1YLZ%x&2c)xwr2= zc4xJPf#vmZbO%|^4r_Pvml@3F zwlfd?UkXu%9u%w%Fio#%kfaYhm7tjNx|$m`{sVdfH!u>_D=kuhBm$BZkPFAPjs<11=Qw zP^>qx%3$5PQhU|5K&;~yz)m!MRb7{h59|!Wb&>M2nd&J7lO(xGZP&E1;aMJL!eiJM z(!$J>N*N9{EzV|DL(mj(aSiKJ=-%JVj2YrEtb4Fjd0MF1;?UvZf4IkUhGJN*XZse% z4&e@FE*IE$xWbA{OQ3uziHC3`) zmvyQX#8cE@Gvr4FtdK=uwW8gI1JttWwdypGZGeLiqu9$u^|RmgVyf>YxSBBAtV&C_ zTpXVIC|jPZ6yl^qNaPpMoi+k7ghG3W`ltn=(QH-vNsNfmcmoin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6f0^Ba=Lm&8lN%0K5>~zh z8?Fq5;ZedZ9GI>n*{fUl8gAkFa*$Vt@c-E%l(MI_vDO*0L|FV$u=_ZkE%NK*P~1d^jD=r;)o6CYV>|Qf&&)~!$W zPfYD_o7}|i+&=jbywlh{c12Gitv2eXX0tk!J!>6b<$Z#$X0%T=+tuiB&NAAI-d6Zc zj8oBSU z8gS23f0%LCb6rdL%7nRKj!!Ny+V}Q9w5R=&x%{q-_M$hSUXAuE7_IeeM*Agm`CS?9 zMeoYJ8tqpwTIbn}_DkmSAmfAQJs{K+2d7{26yJc+eg@e+`g$l!lRE~RA0l<7g@M3 zqB5o(8|YB_H%d$Wj>{76-@{Uky4qD9M%`_QNxf;8dRe`g=-3+PcpziN)LMB+$# z$I~?V1bNr{hNcght4e&3Q;1VJ{C! zRpvIJjWD;S==CK=Y;^r8j3vKUsh(1zxx0iu8>Fd#QT;WC>J7vJZP=6MHKa}_PG3!` zkK*#<4Q9364e^9K0dGBQyCt^lTa`!!8C>P^HUYG_UJZyXH_!J;cG#)(_|ca)e~U2V z-K1ijhkHn})uB8&q|XfB zJLxlDyD)E`#g^EHJB@j?cRa zEU{;gqn<8J?^}VMLb{hHiGB+)%~82_emQR7oI>ua8+dgCvu=PmR4)Ste{R6T8e}70 zz_GwTu$~)$^z+mWFvsh=0moc=)u$%L+yJ3dZh(5ugd3pCPVm>p!P8iuOZxTrDHf2r z4~6OoBc7MvLPXg?zd`(?18EQ1A9g>16&;1Yjay+a$BCR%SbudQuTEsviBQPW8Komm zggKL5 Date: Thu, 28 Sep 2023 15:41:19 +0200 Subject: [PATCH 26/28] Remove dark icons --- .../pix/componenticons/mass-large_dark.png | Bin 1714 -> 0 bytes .../pix/componenticons/mass-small_dark.png | Bin 446 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 core/resources/pix/componenticons/mass-large_dark.png delete mode 100644 core/resources/pix/componenticons/mass-small_dark.png diff --git a/core/resources/pix/componenticons/mass-large_dark.png b/core/resources/pix/componenticons/mass-large_dark.png deleted file mode 100644 index e8f45cf49d502630bc24b8fcadd39fb3d91fa76c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1714 zcmV;j22J^iP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D21iLmK~z{r#aByA zR96`O@0~j!gTU|z&oX5|9`OOOrm2CZz6y4siEc>4$^|YO?ZU=IS6#Vv>8f^RV&c+` zg|@6r7ofP%Xg~*33KS8PVT5@wkK6w{_x^CfVVnVp-{i}=bMCq4{NMTi^Ph7x+I?gi z!?epCW4DE%f9Du@b{dc8k0NF_g(wkMuU>6Gdi3Zo9*-xqyuAE#Z*T7#t``ALAv+S} zvdfPJ@ql7qU*GqaFJB%oO|wbY^}`1b9{h3d-o1D3-@hM1W3<_#{3KX2oT=M%wYIhv z-MDe%*@FiU{^kFL9UUD9hK7cs0|NuU;y<&1na4Dkm{9o^l>V{?KH3S=iU8eiwA;66~2h}%BrwHM$1B2{gmNP4umCP!eHDFIq&u@W1Ao=+5 zC%bH%F5oQr6ohtG~)G;1ry8^B@+osIO_3?PF*gS zwz#+$c=+()s2XXb@fkgm>ta{l0IRF3J72zhsqx^-8z84yf+$Y4WTwn@Lt!{Go=8$W z9^XJ-{EGN~W@d&s+kMIXW1Tp&nT)$7aup)byk76&>FMb_!!VSw5?WkG&z?S2!-{}) z##I?lQ;+XMp%Af`Te%x#HWA_!u%(#o3Ncv7fpB<*y+EeSIy^En{U42uk1NlJIFz7< zAJ@Z+DjZWh0V>pz$}6GJ5;Zk7)$%9EhT;wJNJeZ&2s+KLsi~<8ha(&wtD4L#1R<1R zDC?t0BtpC)QaBu@WIRca9zCML!9f}s8KH@Z2?{O-S&a29!YmexQ)6Qzyn)aX5h5g` zm|TUZ4zFLo-oP_zz+lW|BEB9bYL!i84`Ku>Sp6F#|W!9oq-mru~1nTbI zy-N-L25M_-Qy~|a2++QL`>3L#LY3Z9FD2L;Xe*PDpPx^>X;N)%?QtGPgk&Wq7a;NPJYKjUA3r!f3QX;TUuxNRmaQ2DDqU5XpoDF4TlL(s_Au%Z7Og^rtcUDTavKd10 z)$A+s`FtHb&Snv51qgB#qB`Ug>=z3Q3ouTDH`cRIN{OkjuU8@T=U;zNFu2Hjv`Hl; zB{a?AvB-nLAkELsEANRnASN1(P$U{AUVoqQI3h%t5xEKhv^s`b2hpgtx!GLhSw-Eu z&^u~q@RPr>k?!5QM{}=VBOGbr%^SLP>lTd+k5I9RXE`W`y@2993FcT5zvXV{T$v1iU2acbO7!2;^N|CV`F1ONT0h6 zKFeXj|HN11JN!4oTxH^pA{VZV$NCR~-Ts~ZxU1lCzO^3_VqT_)i7W8t^`eliM?NKR zkB2AV5qQHonQrn(E}^Bui;38E(s}t2;5ir9JKKwq2p>tkAjF_f!fHeR&cQQ5+QDED z#&5naWZPFZ*ephvRs@jC;9@K&#!CrE`7t2I3Z0$+q_jcwKQO4b^|?7Z_5c6?07*qo IM6N<$f))}loB#j- diff --git a/core/resources/pix/componenticons/mass-small_dark.png b/core/resources/pix/componenticons/mass-small_dark.png deleted file mode 100644 index 192e767eabb554b3cd02d3cc89c0a2e716daca0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 446 zcmV;v0YUzWP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0aHmtK~y+Tm6N@0 zgD?=s4?+??LWL5kdn$Ed=+@48fGX;Mgc!SY$WW;-ft0Ze?|>Nl0xT>%086E^@BkSq z*(RwP+qhF>13&5bpE-Po&o+!@zu(^#MR7{g^s_9>pE!>1MQ9Yd(80K_``R>39fsj; zUDsdBC0MxhCnve|5mBuS29*h>%uZdFy^Vkl)IRLVPLwOT#cwhfv-0o$=)Y8aqT zbg)bdOw)w1BGXIb_krc3EvG5z~rrkbw7v2FRgODq;wfHC4eE#8}V@E&7? z0b#lQ6&;GQFxy|IENPcqWr!Ptu6V&61}J;c(zdPsdhjh<1b^!skU%^uiql z%EFH0JTYZ$CI~^>o}`9poOOladEO&;6ete?J6QCp($x~s*q8iqnb~YglXda+`lk1Q o^%fTHXm-1umFIcaf`0&<0g<@Fbah*U-~a#s07*qoM6N<$f@_PxDF6Tf From 382600f8661808f1bf4ce85c2a3bffa531497e23 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Thu, 28 Sep 2023 18:50:35 +0200 Subject: [PATCH 27/28] Implement dark component icons --- .../componenticons/altimeter_dark-small.png | Bin 0 -> 1732 bytes .../pix/componenticons/battery_dark-small.png | Bin 0 -> 1530 bytes .../deployment-charge_dark-small.png | Bin 0 -> 2015 bytes .../ellipticalfin_dark-large.png | Bin 0 -> 1594 bytes ..._dark.png => ellipticalfin_dark-small.png} | Bin .../componenticons/flight-comp_dark-small.png | Bin 0 -> 1574 bytes .../componenticons/freeformfin_dark-large.png | Bin 0 -> 1598 bytes ...ll_dark.png => freeformfin_dark-small.png} | Bin .../componenticons/launchlug_dark-large.png | Bin 0 -> 1779 bytes ...mall_dark.png => launchlug_dark-small.png} | Bin ...ass-large_dark.png => mass_dark-large.png} | Bin ...ass-small_dark.png => mass_dark-small.png} | Bin ...arge_dark.png => parachute_dark-large.png} | Bin ...mall_dark.png => parachute_dark-small.png} | Bin ...ods-large_dark.png => pods_dark-large.png} | Bin ...ods-small_dark.png => pods_dark-small.png} | Bin .../recovery-hardware_dark-small.png | Bin 0 -> 1805 bytes ...arge_dark.png => shockcord_dark-large.png} | Bin ...mall_dark.png => shockcord_dark-small.png} | Bin ...large_dark.png => streamer_dark-large.png} | Bin ...small_dark.png => streamer_dark-small.png} | Bin .../pix/componenticons/tracker_dark-small.png | Bin 0 -> 1579 bytes .../openrocket/gui/main/ComponentIcons.java | 141 +++++-- .../net/sf/openrocket/gui/util/UITheme.java | 372 +++++++++++++++++- 24 files changed, 471 insertions(+), 42 deletions(-) create mode 100644 core/resources/pix/componenticons/altimeter_dark-small.png create mode 100644 core/resources/pix/componenticons/battery_dark-small.png create mode 100644 core/resources/pix/componenticons/deployment-charge_dark-small.png create mode 100644 core/resources/pix/componenticons/ellipticalfin_dark-large.png rename core/resources/pix/componenticons/{ellipticalfin-small_dark.png => ellipticalfin_dark-small.png} (100%) create mode 100644 core/resources/pix/componenticons/flight-comp_dark-small.png create mode 100644 core/resources/pix/componenticons/freeformfin_dark-large.png rename core/resources/pix/componenticons/{freeformfin-small_dark.png => freeformfin_dark-small.png} (100%) create mode 100644 core/resources/pix/componenticons/launchlug_dark-large.png rename core/resources/pix/componenticons/{launchlug-small_dark.png => launchlug_dark-small.png} (100%) rename core/resources/pix/componenticons/{mass-large_dark.png => mass_dark-large.png} (100%) rename core/resources/pix/componenticons/{mass-small_dark.png => mass_dark-small.png} (100%) rename core/resources/pix/componenticons/{parachute-large_dark.png => parachute_dark-large.png} (100%) rename core/resources/pix/componenticons/{parachute-small_dark.png => parachute_dark-small.png} (100%) rename core/resources/pix/componenticons/{pods-large_dark.png => pods_dark-large.png} (100%) rename core/resources/pix/componenticons/{pods-small_dark.png => pods_dark-small.png} (100%) create mode 100644 core/resources/pix/componenticons/recovery-hardware_dark-small.png rename core/resources/pix/componenticons/{shockcord-large_dark.png => shockcord_dark-large.png} (100%) rename core/resources/pix/componenticons/{shockcord-small_dark.png => shockcord_dark-small.png} (100%) rename core/resources/pix/componenticons/{streamer-large_dark.png => streamer_dark-large.png} (100%) rename core/resources/pix/componenticons/{streamer-small_dark.png => streamer_dark-small.png} (100%) create mode 100644 core/resources/pix/componenticons/tracker_dark-small.png diff --git a/core/resources/pix/componenticons/altimeter_dark-small.png b/core/resources/pix/componenticons/altimeter_dark-small.png new file mode 100644 index 0000000000000000000000000000000000000000..3506a26e5c0d37131e02b0ae32f53609270c281a GIT binary patch literal 1732 zcmb_dPl()97@sP%+qFeR5G~pbDTunw-^on!9?h=n%<2v_>$082)r0sZ?`0+yW+u^*EtX;+$;*4c_x<_( zzW3$bt<6_XFP>SfR4S)i8_jKapN0F8h2!w-ExT9Xbu!s_J%hQ&#eJ;u!G}*)D#uTR z?cIFWyNG=rsf6+lQ%6w(=t||n>L?-p9?PW;>xQu_|NhlCvJ_HRey!%|UeaK_aN{s# zmku}E{^6dFsJyx&T^M075V4#{qo^Nec;w0xyBNk|T9c&-B;Rx8HQ`X&^|qu2Pnm>N zL-BRpkZc%Pb<;t}w(awhshd?zuWM#aF{`*{W5beWmkb_L8sP2b%QJuQ<;uN0Pq3y9 zheLH(Re9Rg41|!To0@4VfKak=oRg6fXXgqFO_up-nB*akC1H_t_#k&>h<2Jrl$2)U zY(^E3rj1CV8LBSQngFR^;*vqypE#$!#`-K`ah?IzD6vV8=RE82dzdbl=NtgNo>%%f zGL|SRU1a(C0i-b_PuraL zL06xrv2?)FOt5LGHPsXbXDHSrIdf&9s-h#su-m4It2VBg%eskmeG2tB4TJGK)O6a0 zgDnSF>vK>jD@tK0!Hi9D)u+IKM=|n`zh?Vkb`JI4aG!+ zDOO#tDo#)}lq%FaLR6>Bv5Wn$rXid@(tmI}LMccsN>Y{yL0q{eihfc@cq7a}w(;y3 zU1IyQQ9qO>rGtqtj)W^`wu(a|nKf0Hp7V$w#^M+~Uqt8kNZe)6s5Du7;B@X!<9nwwSEc`FI-2NCQ=znf zYdBf^M<;{qCsWWK#jxzn@KJVm76Vf$^zP2xtEZsv`>p0$+j;M|t80swUtC!K;?C0k z8y63+Jn?niJ9Sh3|o{acGGX!ye~m#;0YezbJ=kmEs>uvkZ)s-K`f2Os*+5GIK Hx8D8>p(r3p literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/battery_dark-small.png b/core/resources/pix/componenticons/battery_dark-small.png new file mode 100644 index 0000000000000000000000000000000000000000..72b498ebde75df5cabf56e2bee852d0fac3cb9ba GIT binary patch literal 1530 zcmbVM&u`pB6kgPVAP_D{2sl)uX_10b|F+}x5Vs2Jl&lnoC|%SbE==s%wUxEU*iLqn zBDE@qs6}ufhf0VG0*OOaZk!N;167Lz9QYr4D3=N@9FQn)cGsqhiV(GA&v@pW?|tvR zdGGT2+N-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)jpSX0Hct6GzLiqK%Rzt%wHko{Xb)===6c)z1wk> zLaAw{1#MT50KvIMpQ$4;q}oWfj_fg-3zud`NfpnOjtFG;NCXHQv_pl+PO5hxs;C*))ug4ssQNdXJi#1VnHcF~+WG&sw7XuM1UvZ}ksXhtqNIRW%I zM2(6fsC!Q5?lk_FbZ)QG|1%xR?M_2NQGeGkvvyl2L)mAhP`xAJ%0GZbv^68{q@krV_gTY-B=Q8?7mgamrW&J z-0*x&P$C|BtLcZsgO#h+9=@{d$I|Zj{qwMI3KNAP_Gn4L`hoYazPEJOyz`f?c6ROD zxp4pPuGJt3**AYOjO&kGY}^)h7GL|UZE^pSJ=5MeIrX*1tHs?bi#HxSUGPNxJD+cV zyNn8-n7zKZ5R>P09qiH0pX?i4j_uf|RV_VbOq5#(j&2KI+P%oLXWznIW9FAVyjA^r z)kXe%&GaqhUz&Vh`AmLN%c#LRy+EY_~3=;??v*dTW7K6UGq|_CX9OJP<7*s871o;=|6Yn*=BWl z@6GDq3MQ7`vcozxg_HVMP8k33b9?{z^m@5-;6l;K4?6n>AK1S6=a0^o+n4(T)S3}% Q-CuA+T~l!P%okSt38wh0KL7v# literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/ellipticalfin_dark-large.png b/core/resources/pix/componenticons/ellipticalfin_dark-large.png new file mode 100644 index 0000000000000000000000000000000000000000..cb186f3ebc68bb58223366d564c6748515c34d79 GIT binary patch literal 1594 zcmV-A2F3Y_P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXMz z4K)Ndh&4a}00p{9L_t(o!|j>RYaGcH$3L&Sdn9>&tbRC>SJ9G02T5ye3yicTuppg{ z9em0q5J+-2KKSU12_!lAPe>papK{D4Hulw+K#n%#V6j25*47HkVJvAh)306*s*zi* zp3z7e?P2kQqNls*s`}Kc@2gieVrKjh%<%)UPavN_K7n+%`1@{9L0{%vnKv4s1Su{@l7*7HD~S z*?_-?Z)*W24nR=>*a4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large.png b/core/resources/pix/componenticons/freeformfin_dark-large.png new file mode 100644 index 0000000000000000000000000000000000000000..a1f1e694d1a67868ad4cda167fe9dfbb07338d20 GIT binary patch literal 1598 zcmV-E2EqA>P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXMz z4hRYgAVh$3N%3H}mF)lEh>rA`+_#r)P=6JyRH;5bR|eAIA9mHnqY`&Qi(C<$NYHrbdmew&GXF| zf7Pk00P)jETdkTPY zLmY@?SXH(E1&;_2xVeQM{S~l4Lqr;BFdYR%Rn>XL0PBIA=NSVufLXwbi25|^)L{P! zm;~+tW58YD4zM36B%bo9*jYf_#J(IF8v0CC#UJHz8Q><6_bImmMpZjz0K1|nnyyx> zs;X9<4G#}1@Fy?`YyrA~$ij1x{;w8ywA|ldB z)cX10!Gk+aojSErKN8lAjEp2e#7oWM*BR3x-uSw^yZci|A=0&NbaWKpR#FtbG`#{Q z>;Mq^fbVYJyeSC?FBx(F{(YvVrXD0|*Nt@5f3wsQk#)e2=g*(7Y}v8}pH7KQOiVB~ zHueXw@;XPWJHVm`LSL!+70+5|rc5p6lFS#CO6A)N z7cOMRMPfH@+`tvYhDWPcr+)p(`cfeag!@i_0TKBK_yG9w%9ShR^Z86lB{niLvgoS3 zuY!HA=nEG_KVz)nx-#$;a2Xgobm-9HrAwFe-o1OPie4)#l}h8labO7825bU)fRd~7 z0U$37pcM%3{88W+puT=5b^=?0eplI70STXnLg}>Uoh!N< zybByJm&>2`_xBf1o;=Cv)2E4|NR!{C(`!4seEBlK-@qd;&}|02+Q&!=gruse0Pi`z zf4FDQo_+iG@85d(@L`S~JxZZa(A2eUVrMH#f)Q$B*gl?IntG#IdfN&*$@O-n^M=wYuF^ z_-6x2f_r9WMnwWELPJCrt+kJPdwUznKM_zY z7BvV%nVg)Yudh#|C`$fAo6RNz0|O;sAVZo+TaQdkOz7O)qlF+a_k$oX#+W7GK|Y_q zGd(?>o1b5ho}O-r<5;Y<%k8L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2ktM}czcimgJZdDj#6{S?kvaGUg+a=C9V~kl*6cG_IB7zVC zmSttO5BhDWiqcIdBBGR1It)V*hM|a}aTEljvG4mKfUz0es8_6DigMmD;^xpcN>NJm zK~_N@G)-r%Gd?HZO{7^{L;@sALI6;9&cw+{nE7Me^VpX_T<7&!XZR5N5igc9s{^fQ4Atd6V4hU4@RXTbfKxFD|Eh;l0KTz7Lm?@(K#J3 zvYN)ccah6B7H9_1NW&nfy}xutrU}m91xV4>kiLoobj|Ct*lE-^y+QY`OymDze*sDl V-3t4UEzJM`002ovPDHLkV1gIMH=O_g literal 0 HcmV?d00001 diff --git a/core/resources/pix/componenticons/launchlug-small_dark.png b/core/resources/pix/componenticons/launchlug_dark-small.png similarity index 100% rename from core/resources/pix/componenticons/launchlug-small_dark.png rename to core/resources/pix/componenticons/launchlug_dark-small.png diff --git a/core/resources/pix/componenticons/mass-large_dark.png b/core/resources/pix/componenticons/mass_dark-large.png similarity index 100% rename from core/resources/pix/componenticons/mass-large_dark.png rename to core/resources/pix/componenticons/mass_dark-large.png diff --git a/core/resources/pix/componenticons/mass-small_dark.png b/core/resources/pix/componenticons/mass_dark-small.png similarity index 100% rename from core/resources/pix/componenticons/mass-small_dark.png rename to core/resources/pix/componenticons/mass_dark-small.png diff --git a/core/resources/pix/componenticons/parachute-large_dark.png b/core/resources/pix/componenticons/parachute_dark-large.png similarity index 100% rename from core/resources/pix/componenticons/parachute-large_dark.png rename to core/resources/pix/componenticons/parachute_dark-large.png diff --git a/core/resources/pix/componenticons/parachute-small_dark.png b/core/resources/pix/componenticons/parachute_dark-small.png similarity index 100% rename from core/resources/pix/componenticons/parachute-small_dark.png rename to core/resources/pix/componenticons/parachute_dark-small.png diff --git a/core/resources/pix/componenticons/pods-large_dark.png b/core/resources/pix/componenticons/pods_dark-large.png similarity index 100% rename from core/resources/pix/componenticons/pods-large_dark.png rename to core/resources/pix/componenticons/pods_dark-large.png diff --git a/core/resources/pix/componenticons/pods-small_dark.png b/core/resources/pix/componenticons/pods_dark-small.png similarity index 100% rename from core/resources/pix/componenticons/pods-small_dark.png rename to core/resources/pix/componenticons/pods_dark-small.png diff --git a/core/resources/pix/componenticons/recovery-hardware_dark-small.png b/core/resources/pix/componenticons/recovery-hardware_dark-small.png new file mode 100644 index 0000000000000000000000000000000000000000..b3eb482b9f3d2196e6799dd14ee451853ac98ef0 GIT binary patch literal 1805 zcmbVNe^3-v9A6ngz+t43)SP0rH78W=c5m;;-tBNP2ZzGMAp-}V73s43?r!65cimm? z4iYQSOhwF5gc_q9$4Fc#(ro;Z;!i68k;6}W_RDd z_j#Z1=llJ>?{{}rl&{UqSeAhxNM>n?vl6~@;JqL%6+Zo|?YrPBT`Jk2z_~@*Jr8;L z&{70RvGQ(@>T#9PtQgcYoLC3+k)Q<82$EkAkr=ifsAwJV@q!(jKJ`9^@|+!8Z*~zb zsR;P_k|r5cHI=*Brh3-KVFiz%`4Jit1cAz+kzhbj=!hMQ^3rguP2(6Eg{bv*%%K@X zJ+2D0NR$C;(;IXwK^Ra9j!YKPYO_%km4}i9X~YQ&PMUS3kv3Db!Gy*x3|f>qFJ0+e z6SD`u?3iCwB^t-W;jlhz)QhqYH`r`8oFH+M)Io$!X%ti@q7#(maRw()SechpUKCJ` zk*O0KR67RM&bkql610L63l$6+9$_ThpeHo9qCl1R{w-h*Qd^k=<=6zJ)F20I|`QAOD;iUF8cR+I%a1Y|{vrb%zsleeLOlTm>k)3T}~Y&rww zCP~^z(PnZrLDB><3w4Pc?`@n5C9Q6Ql{T4Z12qQp8Nml&qrx#9x`S)wJnI?$Pp6}6x0QYz z4*Q8VOf)n2k!XiNfYh?q>?Z$s4MFBTUFvkWt$R)%a6Fpi$UZl5Es*)ti+QbeEkdXM ztDDKSEvFA&SaN;x!NIN_+tKsgN&6~?+M81g3bP6yXkDD0{d_If|M{1m&=2mZws(t1 zXDrh*-mPNJ-W}e7`?lO$nD$=P$;-{j&whff8+-c(_$AUln77$_e|PRKdCEEx%1Z7U z*!bJ;PrljXId~%(L5KU-rWwk{1}m%I8Mx9sw0=}L+4nlXaHkWiI_ADu*EfD>W8UJ! z6VnS89y^}VTXXfNz-5bR*`6gIj@Pd0_+k+~Jb%rRPkH*4iw(6C9{2ZRb#Ki?*;xLF zcR(rV{B=+lG{1Ft+MH(b183q*ZBCp60Z7*7uFn^y!B^!ZdX=aSbco- z{L)n-XK(OQ!}>0VrkXirNnB@FFpm%Nhh72%mT0gfs|dy=hQn2?e%l zC`8u{V2M%gkXf*8%d#E=rfz06{g7tn6*G(S7BX_6_dsDW@oQ+teX?gy%pBO@JVu(< zYPHl>R%Jy8wHcbS#e~qwB_VTEIv%59LNRAa zg|Vi{D`80lmS~d7Xy(+sYTkgNF6PvMGOLPiD~44uO_a4z-aM$ANY}eikNH7uc^GOI zDn7rM2$k$w#=%cQyVKe%OZ+hFnlr1;k=*Ek}R$E&%2B) z${hF4`~UO&;Uo|xiJP~~BMVht4pa(Kk+$Vt86BYuy-_m&o%?_=ktN~46faR9_7;O% z_Pt2%hZ!z74gZ9LjnM;bV)Q_-k2 zs0nv8S8#o8o%uzE7$TTzv4vx$R5w3Ge*59j8}E;T!Az zNapCVmv{WCZ(QG)yA0;We%v~>b@vzVUD`Tu{nRgOvzM=4iQN4s&us2}w)oC(_Q*#g z&wsu6+C${%&tKgePcQsYTzL5R&)2rgtM8uOxAokMWP9#g=gh?X;q}`3r>kIm=jQt# U@8#d$Cfj*=a>_mX#PJvY0?Tp%EdT%j literal 0 HcmV?d00001 diff --git a/swing/src/net/sf/openrocket/gui/main/ComponentIcons.java b/swing/src/net/sf/openrocket/gui/main/ComponentIcons.java index d5e9b3a28..39dd7ec91 100644 --- a/swing/src/net/sf/openrocket/gui/main/ComponentIcons.java +++ b/swing/src/net/sf/openrocket/gui/main/ComponentIcons.java @@ -9,6 +9,8 @@ import javax.imageio.ImageIO; import javax.swing.Icon; import javax.swing.ImageIcon; +import net.sf.openrocket.gui.util.GUIUtil; +import net.sf.openrocket.gui.util.UITheme; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.AxialStage; import net.sf.openrocket.rocketcomponent.BodyTube; @@ -41,77 +43,138 @@ public class ComponentIcons { private static final String SMALL_SUFFIX = "-small.png"; private static final String LARGE_SUFFIX = "-large.png"; + // Component image file keys + private static String noseCone; + private static String bodyTube; + private static String transition; + private static String trapezoidFinSet; + private static String ellipticalFinSet; + private static String freeformFinSet; + private static String tubeFinSet; + private static String launchLug; + private static String railButton; + private static String innerTube; + private static String tubeCoupler; + private static String centeringRing; + private static String bulkhead; + private static String engineBlock; + private static String parachute; + private static String streamer; + private static String shockCord; + private static String mass; + private static String stage; + private static String boosters; + private static String pods; + + private static String mass_altimeter; + private static String mass_battery; + private static String mass_deployment_charge; + private static String mass_payload; + private static String mass_flight_comp; + private static String mass_recovery_hardware; + private static String mass_tracker; + private static final HashMap, ImageIcon> SMALL_ICONS = new HashMap, ImageIcon>(); private static final HashMap, ImageIcon> LARGE_ICONS = new HashMap, ImageIcon>(); private static final HashMap, ImageIcon> DISABLED_ICONS = new HashMap, ImageIcon>(); private static final HashMap MASS_COMPONENT_SMALL_ICONS = new HashMap(); static { + initColors(); + // // Nose cone - load("nosecone", trans.get("ComponentIcons.Nosecone"), NoseCone.class); + load(noseCone, trans.get("ComponentIcons.Nosecone"), NoseCone.class); // // Body tube - load("bodytube", trans.get("ComponentIcons.Bodytube"), BodyTube.class); + load(bodyTube, trans.get("ComponentIcons.Bodytube"), BodyTube.class); //// Transition - load("transition", trans.get("ComponentIcons.Transition"), Transition.class); + load(transition, trans.get("ComponentIcons.Transition"), Transition.class); //// Trapezoidal fin set - load("trapezoidfin", trans.get("ComponentIcons.Trapezoidalfinset"), TrapezoidFinSet.class); + load(trapezoidFinSet, trans.get("ComponentIcons.Trapezoidalfinset"), TrapezoidFinSet.class); //// Elliptical fin set - load("ellipticalfin", trans.get("ComponentIcons.Ellipticalfinset"), EllipticalFinSet.class); + load(ellipticalFinSet, trans.get("ComponentIcons.Ellipticalfinset"), EllipticalFinSet.class); //// Freeform fin set - load("freeformfin", trans.get("ComponentIcons.Freeformfinset"), FreeformFinSet.class); + load(freeformFinSet, trans.get("ComponentIcons.Freeformfinset"), FreeformFinSet.class); //// Tube fin set - load("tubefin", trans.get("ComponentIcons.Tubefinset"), TubeFinSet.class); + load(tubeFinSet, trans.get("ComponentIcons.Tubefinset"), TubeFinSet.class); //// Launch lug - load("launchlug", trans.get("ComponentIcons.Launchlug"), LaunchLug.class); + load(launchLug, trans.get("ComponentIcons.Launchlug"), LaunchLug.class); //// Rail Button - load("railbutton", trans.get("ComponentIcons.RailButton"), RailButton.class); + load(railButton, trans.get("ComponentIcons.RailButton"), RailButton.class); //// Inner tube - load("innertube", trans.get("ComponentIcons.Innertube"), InnerTube.class); + load(innerTube, trans.get("ComponentIcons.Innertube"), InnerTube.class); //// Tube coupler - load("tubecoupler", trans.get("ComponentIcons.Tubecoupler"), TubeCoupler.class); + load(tubeCoupler, trans.get("ComponentIcons.Tubecoupler"), TubeCoupler.class); //// Centering ring - load("centeringring", trans.get("ComponentIcons.Centeringring"), CenteringRing.class); + load(centeringRing, trans.get("ComponentIcons.Centeringring"), CenteringRing.class); //// Bulkhead - load("bulkhead", trans.get("ComponentIcons.Bulkhead"), Bulkhead.class); + load(bulkhead, trans.get("ComponentIcons.Bulkhead"), Bulkhead.class); // // Engine block - load("engineblock", trans.get("ComponentIcons.Engineblock"), + load(engineBlock, trans.get("ComponentIcons.Engineblock"), EngineBlock.class); // // Parachute - load("parachute", trans.get("ComponentIcons.Parachute"), + load(parachute, trans.get("ComponentIcons.Parachute"), Parachute.class); // // Streamer - load("streamer", trans.get("ComponentIcons.Streamer"), Streamer.class); + load(streamer, trans.get("ComponentIcons.Streamer"), Streamer.class); // // Shock cord - load("shockcord", trans.get("ComponentIcons.Shockcord"), + load(shockCord, trans.get("ComponentIcons.Shockcord"), ShockCord.class); - load("mass", trans.get("ComponentIcons.Masscomponent"), + load(mass, trans.get("ComponentIcons.Masscomponent"), MassComponent.class); // // Component Assemblies - load("stage", trans.get("ComponentIcons.Stage"), + load(stage, trans.get("ComponentIcons.Stage"), AxialStage.class); - load("boosters", trans.get("ComponentIcons.Boosters"), + load(boosters, trans.get("ComponentIcons.Boosters"), ParallelStage.class); - load("pods", trans.get("ComponentIcons.Pods"), + load(pods, trans.get("ComponentIcons.Pods"), PodSet.class); // // Mass components - loadMassTypeIcon("mass", trans.get("ComponentIcons.Masscomponent"), - MassComponentType.MASSCOMPONENT); - loadMassTypeIcon("altimeter", trans.get("ComponentIcons.Altimeter"), - MassComponentType.ALTIMETER); - loadMassTypeIcon("battery", trans.get("ComponentIcons.Battery"), - MassComponentType.BATTERY); - loadMassTypeIcon("deployment-charge", - trans.get("ComponentIcons.Deploymentcharge"), + loadMassTypeIcon(mass, trans.get("ComponentIcons.Masscomponent"), MassComponentType.MASSCOMPONENT); + loadMassTypeIcon(mass_altimeter, trans.get("ComponentIcons.Altimeter"), MassComponentType.ALTIMETER); + loadMassTypeIcon(mass_battery, trans.get("ComponentIcons.Battery"), MassComponentType.BATTERY); + loadMassTypeIcon(mass_deployment_charge, trans.get("ComponentIcons.Deploymentcharge"), MassComponentType.DEPLOYMENTCHARGE); - loadMassTypeIcon("payload", trans.get("ComponentIcons.Payload"), - MassComponentType.PAYLOAD); - loadMassTypeIcon("flight-comp", - trans.get("ComponentIcons.Flightcomputer"), - MassComponentType.FLIGHTCOMPUTER); - loadMassTypeIcon("recovery-hardware", - trans.get("ComponentIcons.Recoveryhardware"), - MassComponentType.RECOVERYHARDWARE); - loadMassTypeIcon("tracker", trans.get("ComponentIcons.Tracker"), - MassComponentType.TRACKER); + loadMassTypeIcon(mass_payload, trans.get("ComponentIcons.Payload"), MassComponentType.PAYLOAD); + loadMassTypeIcon(mass_flight_comp, + trans.get("ComponentIcons.Flightcomputer"), MassComponentType.FLIGHTCOMPUTER); + loadMassTypeIcon(mass_recovery_hardware, + trans.get("ComponentIcons.Recoveryhardware"), MassComponentType.RECOVERYHARDWARE); + loadMassTypeIcon(mass_tracker, trans.get("ComponentIcons.Tracker"), MassComponentType.TRACKER); + } + + private static void initColors() { + updateColors(); + UITheme.Theme.addUIThemeChangeListener(ComponentIcons::updateColors); + } + + private static void updateColors() { + noseCone = GUIUtil.getUITheme().getComponentIconNoseCone(); + bodyTube = GUIUtil.getUITheme().getComponentIconBodyTube(); + transition = GUIUtil.getUITheme().getComponentIconTransition(); + trapezoidFinSet = GUIUtil.getUITheme().getComponentIconTrapezoidFinSet(); + ellipticalFinSet = GUIUtil.getUITheme().getComponentIconEllipticalFinSet(); + freeformFinSet = GUIUtil.getUITheme().getComponentIconFreeformFinSet(); + tubeFinSet = GUIUtil.getUITheme().getComponentIconTubeFinSet(); + launchLug = GUIUtil.getUITheme().getComponentIconLaunchLug(); + railButton = GUIUtil.getUITheme().getComponentIconRailButton(); + innerTube = GUIUtil.getUITheme().getComponentIconInnerTube(); + tubeCoupler = GUIUtil.getUITheme().getComponentIconTubeCoupler(); + centeringRing = GUIUtil.getUITheme().getComponentIconCenteringRing(); + bulkhead = GUIUtil.getUITheme().getComponentIconBulkhead(); + engineBlock = GUIUtil.getUITheme().getComponentIconEngineBlock(); + parachute = GUIUtil.getUITheme().getComponentIconParachute(); + streamer = GUIUtil.getUITheme().getComponentIconStreamer(); + shockCord = GUIUtil.getUITheme().getComponentIconShockCord(); + mass = GUIUtil.getUITheme().getComponentIconMass(); + stage = GUIUtil.getUITheme().getComponentIconStage(); + boosters = GUIUtil.getUITheme().getComponentIconBoosters(); + pods = GUIUtil.getUITheme().getComponentIconPods(); + mass_altimeter = GUIUtil.getUITheme().getComponentIconMassAltimeter(); + mass_battery = GUIUtil.getUITheme().getComponentIconMassBattery(); + mass_deployment_charge = GUIUtil.getUITheme().getComponentIconMassDeploymentCharge(); + mass_payload = GUIUtil.getUITheme().getComponentIconMassPayload(); + mass_flight_comp = GUIUtil.getUITheme().getComponentIconMassFlightComp(); + mass_recovery_hardware = GUIUtil.getUITheme().getComponentIconMassRecoveryHardware(); + mass_tracker = GUIUtil.getUITheme().getComponentIconMassTracker(); } private static void load(String filename, String name, diff --git a/swing/src/net/sf/openrocket/gui/util/UITheme.java b/swing/src/net/sf/openrocket/gui/util/UITheme.java index 59dcae0c4..96cb57ac1 100644 --- a/swing/src/net/sf/openrocket/gui/util/UITheme.java +++ b/swing/src/net/sf/openrocket/gui/util/UITheme.java @@ -11,19 +11,16 @@ import org.slf4j.LoggerFactory; import javax.swing.BorderFactory; import javax.swing.Icon; -import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.border.Border; import java.awt.Color; import java.awt.Font; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; public class UITheme { private static final Translator trans = Application.getTranslator(); @@ -87,6 +84,36 @@ public class UITheme { void formatScriptTextArea(RSyntaxTextArea textArea); + // Rocket component icons + String getComponentIconNoseCone(); + String getComponentIconBodyTube(); + String getComponentIconTransition(); + String getComponentIconTrapezoidFinSet(); + String getComponentIconEllipticalFinSet(); + String getComponentIconFreeformFinSet(); + String getComponentIconTubeFinSet(); + String getComponentIconLaunchLug(); + String getComponentIconRailButton(); + String getComponentIconInnerTube(); + String getComponentIconTubeCoupler(); + String getComponentIconCenteringRing(); + String getComponentIconBulkhead(); + String getComponentIconEngineBlock(); + String getComponentIconParachute(); + String getComponentIconStreamer(); + String getComponentIconShockCord(); + String getComponentIconMass(); + String getComponentIconStage(); + String getComponentIconBoosters(); + String getComponentIconPods(); + String getComponentIconMassAltimeter(); + String getComponentIconMassBattery(); + String getComponentIconMassDeploymentCharge(); + String getComponentIconMassPayload(); + String getComponentIconMassFlightComp(); + String getComponentIconMassRecoveryHardware(); + String getComponentIconMassTracker(); + // Static list of listeners static List themeChangeListeners = new ArrayList<>(); @@ -361,6 +388,119 @@ public class UITheme { log.warn("Unable to load RSyntaxTextArea theme", ioe); } } + + @Override + public String getComponentIconNoseCone() { + return "nosecone"; + } + @Override + public String getComponentIconBodyTube() { + return "bodytube"; + } + @Override + public String getComponentIconTransition() { + return "transition"; + } + @Override + public String getComponentIconTrapezoidFinSet() { + return "trapezoidfin"; + } + @Override + public String getComponentIconEllipticalFinSet() { + return "ellipticalfin"; + } + @Override + public String getComponentIconFreeformFinSet() { + return "freeformfin"; + } + @Override + public String getComponentIconTubeFinSet() { + return "tubefin"; + } + @Override + public String getComponentIconLaunchLug() { + return "launchlug"; + } + @Override + public String getComponentIconRailButton() { + return "railbutton"; + } + @Override + public String getComponentIconInnerTube() { + return "innertube"; + } + @Override + public String getComponentIconTubeCoupler() { + return "tubecoupler"; + } + @Override + public String getComponentIconCenteringRing() { + return "centeringring"; + } + @Override + public String getComponentIconBulkhead() { + return "bulkhead"; + } + @Override + public String getComponentIconEngineBlock() { + return "engineblock"; + } + @Override + public String getComponentIconParachute() { + return "parachute"; + } + @Override + public String getComponentIconStreamer() { + return "streamer"; + } + @Override + public String getComponentIconShockCord() { + return "shockcord"; + } + @Override + public String getComponentIconMass() { + return "mass"; + } + @Override + public String getComponentIconStage() { + return "stage"; + } + @Override + public String getComponentIconBoosters() { + return "boosters"; + } + @Override + public String getComponentIconPods() { + return "pods"; + } + @Override + public String getComponentIconMassAltimeter() { + return "altimeter"; + } + @Override + public String getComponentIconMassBattery() { + return "battery"; + } + @Override + public String getComponentIconMassDeploymentCharge() { + return "deployment-charge"; + } + @Override + public String getComponentIconMassPayload() { + return "payload"; + } + @Override + public String getComponentIconMassFlightComp() { + return "flight-comp"; + } + @Override + public String getComponentIconMassRecoveryHardware() { + return "recovery-hardware"; + } + @Override + public String getComponentIconMassTracker() { + return "tracker"; + } }, DARK { private final String displayName = trans.get("UITheme.Dark"); @@ -591,6 +731,119 @@ public class UITheme { log.warn("Unable to load RSyntaxTextArea theme", ioe); } } + + @Override + public String getComponentIconNoseCone() { + return "nosecone"; + } + @Override + public String getComponentIconBodyTube() { + return "bodytube"; + } + @Override + public String getComponentIconTransition() { + return "transition"; + } + @Override + public String getComponentIconTrapezoidFinSet() { + return "trapezoidfin"; + } + @Override + public String getComponentIconEllipticalFinSet() { + return "ellipticalfin_dark"; + } + @Override + public String getComponentIconFreeformFinSet() { + return "freeformfin_dark"; + } + @Override + public String getComponentIconTubeFinSet() { + return "tubefin"; + } + @Override + public String getComponentIconLaunchLug() { + return "launchlug_dark"; + } + @Override + public String getComponentIconRailButton() { + return "railbutton"; + } + @Override + public String getComponentIconInnerTube() { + return "innertube"; + } + @Override + public String getComponentIconTubeCoupler() { + return "tubecoupler"; + } + @Override + public String getComponentIconCenteringRing() { + return "centeringring"; + } + @Override + public String getComponentIconBulkhead() { + return "bulkhead"; + } + @Override + public String getComponentIconEngineBlock() { + return "engineblock"; + } + @Override + public String getComponentIconParachute() { + return "parachute_dark"; + } + @Override + public String getComponentIconStreamer() { + return "streamer_dark"; + } + @Override + public String getComponentIconShockCord() { + return "shockcord_dark"; + } + @Override + public String getComponentIconMass() { + return "mass_dark"; + } + @Override + public String getComponentIconStage() { + return "stage"; + } + @Override + public String getComponentIconBoosters() { + return "boosters"; + } + @Override + public String getComponentIconPods() { + return "pods_dark"; + } + @Override + public String getComponentIconMassAltimeter() { + return "altimeter_dark"; + } + @Override + public String getComponentIconMassBattery() { + return "battery_dark"; + } + @Override + public String getComponentIconMassDeploymentCharge() { + return "deployment-charge_dark"; + } + @Override + public String getComponentIconMassPayload() { + return "payload"; + } + @Override + public String getComponentIconMassFlightComp() { + return "flight-comp_dark"; + } + @Override + public String getComponentIconMassRecoveryHardware() { + return "recovery-hardware_dark"; + } + @Override + public String getComponentIconMassTracker() { + return "tracker_dark"; + } }, AUTO { private final String displayName = trans.get("UITheme.Auto"); @@ -833,6 +1086,119 @@ public class UITheme { public void formatScriptTextArea(RSyntaxTextArea textArea) { getCurrentTheme().formatScriptTextArea(textArea); } + + @Override + public String getComponentIconNoseCone() { + return getCurrentTheme().getComponentIconNoseCone(); + } + @Override + public String getComponentIconBodyTube() { + return getCurrentTheme().getComponentIconBodyTube(); + } + @Override + public String getComponentIconTransition() { + return getCurrentTheme().getComponentIconTransition(); + } + @Override + public String getComponentIconTrapezoidFinSet() { + return getCurrentTheme().getComponentIconTrapezoidFinSet(); + } + @Override + public String getComponentIconEllipticalFinSet() { + return getCurrentTheme().getComponentIconEllipticalFinSet(); + } + @Override + public String getComponentIconFreeformFinSet() { + return getCurrentTheme().getComponentIconFreeformFinSet(); + } + @Override + public String getComponentIconTubeFinSet() { + return getCurrentTheme().getComponentIconTubeFinSet(); + } + @Override + public String getComponentIconLaunchLug() { + return getCurrentTheme().getComponentIconLaunchLug(); + } + @Override + public String getComponentIconRailButton() { + return getCurrentTheme().getComponentIconRailButton(); + } + @Override + public String getComponentIconInnerTube() { + return getCurrentTheme().getComponentIconInnerTube(); + } + @Override + public String getComponentIconTubeCoupler() { + return getCurrentTheme().getComponentIconTubeCoupler(); + } + @Override + public String getComponentIconCenteringRing() { + return getCurrentTheme().getComponentIconCenteringRing(); + } + @Override + public String getComponentIconBulkhead() { + return getCurrentTheme().getComponentIconBulkhead(); + } + @Override + public String getComponentIconEngineBlock() { + return getCurrentTheme().getComponentIconEngineBlock(); + } + @Override + public String getComponentIconParachute() { + return getCurrentTheme().getComponentIconParachute(); + } + @Override + public String getComponentIconStreamer() { + return getCurrentTheme().getComponentIconStreamer(); + } + @Override + public String getComponentIconShockCord() { + return getCurrentTheme().getComponentIconShockCord(); + } + @Override + public String getComponentIconMass() { + return getCurrentTheme().getComponentIconMass(); + } + @Override + public String getComponentIconStage() { + return getCurrentTheme().getComponentIconStage(); + } + @Override + public String getComponentIconBoosters() { + return getCurrentTheme().getComponentIconBoosters(); + } + @Override + public String getComponentIconPods() { + return getCurrentTheme().getComponentIconPods(); + } + @Override + public String getComponentIconMassAltimeter() { + return getCurrentTheme().getComponentIconMassAltimeter(); + } + @Override + public String getComponentIconMassBattery() { + return getCurrentTheme().getComponentIconMassBattery(); + } + @Override + public String getComponentIconMassDeploymentCharge() { + return getCurrentTheme().getComponentIconMassDeploymentCharge(); + } + @Override + public String getComponentIconMassPayload() { + return getCurrentTheme().getComponentIconMassPayload(); + } + @Override + public String getComponentIconMassFlightComp() { + return getCurrentTheme().getComponentIconMassFlightComp(); + } + @Override + public String getComponentIconMassRecoveryHardware() { + return getCurrentTheme().getComponentIconMassRecoveryHardware(); + } + @Override + public String getComponentIconMassTracker() { + return getCurrentTheme().getComponentIconMassTracker(); + } } } From b88b789a091f50c99fefeee4675ba703c04db0cc Mon Sep 17 00:00:00 2001 From: SiboVG Date: Thu, 28 Sep 2023 21:52:59 +0200 Subject: [PATCH 28/28] Ensure column index does not exceed table size --- swing/src/net/sf/openrocket/gui/util/GUIUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swing/src/net/sf/openrocket/gui/util/GUIUtil.java b/swing/src/net/sf/openrocket/gui/util/GUIUtil.java index e11f5fe81..2becea7c8 100644 --- a/swing/src/net/sf/openrocket/gui/util/GUIUtil.java +++ b/swing/src/net/sf/openrocket/gui/util/GUIUtil.java @@ -435,6 +435,10 @@ public class GUIUtil { } public static int getOptimalColumnWidth(JTable table, int columnIndex) { + if (columnIndex >= table.getColumnModel().getColumnCount()) { + return -1; + } + TableColumn column = table.getColumnModel().getColumn(columnIndex); Component headerRenderer = table.getTableHeader().getDefaultRenderer() .getTableCellRendererComponent(table, column.getHeaderValue(), false, false, 0, columnIndex);