diff --git a/platform/icons/src/actions/checked.png b/platform/icons/src/actions/checked.png index 366b1b532cd6..0cdacea486cb 100644 Binary files a/platform/icons/src/actions/checked.png and b/platform/icons/src/actions/checked.png differ diff --git a/platform/icons/src/actions/checked_selected.png b/platform/icons/src/actions/checked_selected.png new file mode 100644 index 000000000000..59042e8c0308 Binary files /dev/null and b/platform/icons/src/actions/checked_selected.png differ diff --git a/platform/icons/src/actions/checked_small.png b/platform/icons/src/actions/checked_small.png new file mode 100644 index 000000000000..366b1b532cd6 Binary files /dev/null and b/platform/icons/src/actions/checked_small.png differ diff --git a/platform/icons/src/actions/checked_small_selected.png b/platform/icons/src/actions/checked_small_selected.png new file mode 100644 index 000000000000..7911a95b4192 Binary files /dev/null and b/platform/icons/src/actions/checked_small_selected.png differ diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java index 97289c509187..f324d6594b2c 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java @@ -621,6 +621,7 @@ public abstract class OptionTableWithPreviewPanel extends MultilanguageCodeStyle } }); myBooleanEditor.putClientProperty("JComponent.sizeVariant", "small"); + myOptionsEditor.putClientProperty("JComponent.sizeVariant", "small"); } public Object getCellEditorValue() { diff --git a/platform/platform-api/src/com/intellij/ui/components/editors/JBComboBoxTableCellEditorComponent.java b/platform/platform-api/src/com/intellij/ui/components/editors/JBComboBoxTableCellEditorComponent.java index f14561de9384..5ba558f748fc 100644 --- a/platform/platform-api/src/com/intellij/ui/components/editors/JBComboBoxTableCellEditorComponent.java +++ b/platform/platform-api/src/com/intellij/ui/components/editors/JBComboBoxTableCellEditorComponent.java @@ -42,18 +42,32 @@ public class JBComboBoxTableCellEditorComponent extends JBLabel { private Object myValue; private ListCellRenderer myRenderer = new DefaultListCellRenderer() { - private Icon myCheckIcon = Icons.CHECK_ICON; - private Icon myEmptyIcon = EmptyIcon.create(Icons.CHECK_ICON.getIconWidth()); + public Icon myEmptyIcon; + @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { final JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value == myValue) { - label.setIcon(myCheckIcon); + label.setIcon(getIcon(isSelected)); } else { - label.setIcon(myEmptyIcon); + label.setIcon(getEmptyIcon()); } return label; } + + private Icon getEmptyIcon() { + if (myEmptyIcon == null) { + myEmptyIcon = EmptyIcon.create(getIcon(true).getIconWidth()); + } + return myEmptyIcon; + } + + private Icon getIcon(boolean selected) { + final boolean small = "small".equals(JBComboBoxTableCellEditorComponent.this.getClientProperty("JComponent.sizeVariant")); + return small + ? selected ? Icons.CHECK_ICON_SMALL_SELECTED : Icons.CHECK_ICON_SMALL + : selected ? Icons.CHECK_ICON_SELECTED : Icons.CHECK_ICON; + } }; public JBComboBoxTableCellEditorComponent() { diff --git a/platform/platform-api/src/com/intellij/util/Icons.java b/platform/platform-api/src/com/intellij/util/Icons.java index a7777e5a8357..92e2da2c473c 100644 --- a/platform/platform-api/src/com/intellij/util/Icons.java +++ b/platform/platform-api/src/com/intellij/util/Icons.java @@ -110,6 +110,9 @@ public abstract class Icons { public static final Icon SYNCHRONIZE_ICON = IconLoader.getIcon("/actions/sync.png"); public static final Icon CHECK_ICON = IconLoader.getIcon("/actions/checked.png"); + public static final Icon CHECK_ICON_SELECTED = IconLoader.getIcon("/actions/checked_selected.png"); + public static final Icon CHECK_ICON_SMALL = IconLoader.getIcon("/actions/checked_small.png"); + public static final Icon CHECK_ICON_SMALL_SELECTED = IconLoader.getIcon("/actions/checked_small_selected.png"); public static final Icon OPEN_EDIT_DIALOG_ICON = IconLoader.getIcon("/actions/showViewer.png"); public static final Icon FLATTEN_PACKAGES_ICON = IconLoader.getIcon("/objectBrowser/flattenPackages.png");