mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
compact view for installed plugins
This commit is contained in:
@@ -28,6 +28,6 @@ class AvailablePluginColumnInfo extends PluginManagerColumnInfo {
|
||||
|
||||
@Override
|
||||
public TableCellRenderer getRenderer(final IdeaPluginDescriptor pluginDescriptor) {
|
||||
return new PluginsTableRenderer(pluginDescriptor);
|
||||
return new PluginsTableRenderer(pluginDescriptor, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ public class InstalledPluginsTableModel extends PluginTableModel {
|
||||
|
||||
@Override
|
||||
public TableCellRenderer getRenderer(final IdeaPluginDescriptor pluginDescriptor) {
|
||||
return new PluginsTableRenderer(pluginDescriptor);
|
||||
return new PluginsTableRenderer(pluginDescriptor, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="cebe0" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="cebe0" binding="myInfoPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<opaque value="false"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="80605" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="80605" binding="myBottomPanel" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints border-constraint="South"/>
|
||||
<properties>
|
||||
|
||||
@@ -43,10 +43,13 @@ public class PluginsTableRenderer extends DefaultTableCellRenderer {
|
||||
|
||||
private JLabel myCategory;
|
||||
private JPanel myRightPanel;
|
||||
private JPanel myBottomPanel;
|
||||
private JPanel myInfoPanel;
|
||||
private final IdeaPluginDescriptor myPluginDescriptor;
|
||||
|
||||
public PluginsTableRenderer(IdeaPluginDescriptor pluginDescriptor) {
|
||||
public PluginsTableRenderer(IdeaPluginDescriptor pluginDescriptor, boolean showFullInfo) {
|
||||
myPluginDescriptor = pluginDescriptor;
|
||||
boolean myShowFullInfo = showFullInfo;
|
||||
|
||||
final Font smallFont;
|
||||
if (SystemInfo.isMac) {
|
||||
@@ -61,9 +64,14 @@ public class PluginsTableRenderer extends DefaultTableCellRenderer {
|
||||
myStatus.setText("");
|
||||
myCategory.setText("");
|
||||
myLastUpdated.setFont(smallFont);
|
||||
if (! (pluginDescriptor instanceof PluginNode)) {
|
||||
if (!myShowFullInfo || !(pluginDescriptor instanceof PluginNode)) {
|
||||
myPanel.remove(myRightPanel);
|
||||
}
|
||||
|
||||
if (!myShowFullInfo) {
|
||||
myInfoPanel.remove(myBottomPanel);
|
||||
}
|
||||
|
||||
myPanel.setBorder(UIUtil.isRetina() ? new EmptyBorder(4,3,4,3) : new EmptyBorder(2,3,2,3));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user