diff --git a/app/src/processing/app/contrib/ListPanel.java b/app/src/processing/app/contrib/ListPanel.java index bef919f75..a59ec8f5a 100644 --- a/app/src/processing/app/contrib/ListPanel.java +++ b/app/src/processing/app/contrib/ListPanel.java @@ -144,13 +144,15 @@ public class ListPanel extends JPanel implements Scrollable { scrollPane.setBorder(BorderFactory.createEmptyBorder()); table.setFillsViewportHeight(true); table.setDefaultRenderer(Contribution.class, new ContribStatusRenderer()); -// table.setFont(ManagerFrame.NORMAL_PLAIN); table.setRowHeight(Toolkit.zoom(28)); table.setRowMargin(Toolkit.zoom(6)); - table.getColumnModel().setColumnMargin(0); - table.getColumnModel().getColumn(0).setMaxWidth(ManagerFrame.STATUS_WIDTH); - table.getColumnModel().getColumn(2).setMinWidth(ManagerFrame.AUTHOR_WIDTH); - table.getColumnModel().getColumn(2).setMaxWidth(ManagerFrame.AUTHOR_WIDTH); + + TableColumnModel tcm = table.getColumnModel(); + tcm.setColumnMargin(0); + tcm.getColumn(0).setMaxWidth(ManagerFrame.STATUS_WIDTH); + tcm.getColumn(2).setMinWidth(ManagerFrame.AUTHOR_WIDTH); + tcm.getColumn(2).setMaxWidth(ManagerFrame.AUTHOR_WIDTH); + table.setShowGrid(false); table.setColumnSelectionAllowed(false); table.setCellSelectionEnabled(false); @@ -188,6 +190,7 @@ public class ListPanel extends JPanel implements Scrollable { } table.getTableHeader().setDefaultRenderer(new ContribHeaderRenderer()); table.getTableHeader().setReorderingAllowed(false); + table.getTableHeader().setResizingAllowed(true); table.setVisible(true); setLayout(new BorderLayout()); diff --git a/app/src/processing/app/contrib/ManagerFrame.java b/app/src/processing/app/contrib/ManagerFrame.java index 6cef3c724..2bcedc888 100644 --- a/app/src/processing/app/contrib/ManagerFrame.java +++ b/app/src/processing/app/contrib/ManagerFrame.java @@ -41,6 +41,7 @@ public class ManagerFrame { static final int AUTHOR_WIDTH = Toolkit.zoom(240); static final int STATUS_WIDTH = Toolkit.zoom(66); + static final int VERSION_WIDTH = Toolkit.zoom(66); static final String title = "Contribution Manager"; diff --git a/app/src/processing/app/contrib/UpdateListPanel.java b/app/src/processing/app/contrib/UpdateListPanel.java index 2d8ba85ee..b374ab1ba 100644 --- a/app/src/processing/app/contrib/UpdateListPanel.java +++ b/app/src/processing/app/contrib/UpdateListPanel.java @@ -20,6 +20,8 @@ */ package processing.app.contrib; +import javax.swing.table.TableColumnModel; + public class UpdateListPanel extends ListPanel { Contribution.Filter contribFilter; @@ -34,7 +36,15 @@ public class UpdateListPanel extends ListPanel { ContributionColumn.INSTALLED_VERSION, ContributionColumn.AVAILABLE_VERSION); + TableColumnModel tcm = table.getColumnModel(); + tcm.getColumn(3).setMaxWidth(ManagerFrame.VERSION_WIDTH); + tcm.getColumn(4).setMaxWidth(ManagerFrame.VERSION_WIDTH); + this.contribFilter = contribFilter; + // This is apparently a hack to prevent rows from being sorted by + // clicking on the column headers, which makes a mess because this + // list has sub-headers for the categories mixed into the list. + // However, unfortunately it also breaks column resizing. [fry 220726] table.getTableHeader().setEnabled(false); } diff --git a/todo.txt b/todo.txt index 807f35b65..23545f8ea 100755 --- a/todo.txt +++ b/todo.txt @@ -171,6 +171,7 @@ X icons in the status bar (using emojis at the moment, now out of place) X console collapse/expand button X copy to clipboard button X contribs exclamation looks like an error, not "update available" +X clean up the updates panel in the manager manager X make ContributionTab.FilterField into a static class