mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NavBar HiDPI support
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user