IDEA-125565 Start from Scratch: Customize IDEA dialog: UI Themes page looks bad on...
authorVassiliy <vassiliy.kudryashov@jetbrains.com>
Fri, 30 May 2014 12:51:46 +0000 (16:51 +0400)
committerVassiliy <vassiliy.kudryashov@jetbrains.com>
Fri, 30 May 2014 12:52:39 +0000 (16:52 +0400)
platform/core-api/src/com/intellij/util/IconUtil.java
platform/platform-impl/src/com/intellij/ide/customize/CustomizeUIThemeStepPanel.java

index d1f1d62426dca55278e9fc20b7ae65a3026913f4..28ff9df4186b31aed0957e4ae560503017ef67f3 100644 (file)
@@ -380,6 +380,7 @@ public class IconUtil {
           AffineTransform transform = AffineTransform.getScaleInstance(scale, scale);
           transform.preConcatenate(g2d.getTransform());
           g2d.setTransform(transform);
+          g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
           source.paintIcon(c, g2d, x, y);
         } finally {
           g2d.dispose();
index ea0ff866b0308007db10655b693be7deb1140296..f49a8ad6388e9df8830f967adfe76a74b9d939d3 100644 (file)
@@ -53,6 +53,7 @@ public class CustomizeUIThemeStepPanel extends AbstractCustomizeWizardStep {
     if (SystemInfo.isMac) {
       myLafNames.put(DEFAULT, IconLoader.getIcon("/lafs/OSXAqua.png"));
       myLafNames.put(DARCULA, IconLoader.getIcon("/lafs/OSXDarcula.png"));
+      myLafNames.put(GTK, IconLoader.getIcon("/lafs/LinuxGTK.png"));
     }
     else if (SystemInfo.isWindows) {
       if (PlatformUtils.isIdeaCommunity()) {
@@ -90,7 +91,7 @@ public class CustomizeUIThemeStepPanel extends AbstractCustomizeWizardStep {
       });
       panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
       panel.add(radioButton, myColumnMode ? BorderLayout.WEST : BorderLayout.NORTH);
-      final JLabel label = new JLabel(myColumnMode ? IconUtil.scale(icon, .33) : icon);
+      final JLabel label = new JLabel(myColumnMode ? IconUtil.scale(IconUtil.cropIcon(icon, icon.getIconWidth() * 2 / 3, icon.getIconHeight() * 2 / 3), .75) : icon);
       label.setVerticalAlignment(SwingConstants.TOP);
       label.setHorizontalAlignment(SwingConstants.RIGHT);
       panel.add(label, BorderLayout.CENTER);