NavBar HiDPI support

This commit is contained in:
Konstantin Bulenkov
2014-12-08 14:56:03 +01:00
parent e588a3a3ce
commit dbc5663baa
2 changed files with 5 additions and 5 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,8 +78,8 @@ public class NavBarPresentation {
}
});
if (icon != null && (icon.getIconHeight() > 16 || icon.getIconWidth() > 16)) {
icon = IconUtil.cropIcon(icon, 16, 16);
if (icon != null && (icon.getIconHeight() > 16 * 2 || icon.getIconWidth() > 16 * 2)) {
icon = IconUtil.cropIcon(icon, 16 * 2, 16 * 2);
}
return icon;
}
@@ -126,8 +126,8 @@ public abstract class AbstractNavBarUI implements NavBarUI {
}
private BufferedImage drawToBuffer(NavBarItem item, boolean floating, boolean toolbarVisible, boolean selected, NavBarPanel navbar) {
int w = item.getWidth();
int h = item.getHeight();
int w = 2 * item.getWidth();
int h = 2 * item.getHeight();
int offset = (w - getDecorationOffset());
int h2 = h / 2;