mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
MemoryWidget: make constants HiDPI friendly
This commit is contained in:
+2
-2
@@ -221,8 +221,8 @@ public class MemoryUsagePanel extends JButton implements CustomStatusBarWidget {
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
final Insets insets = getInsets();
|
||||
int width = getFontMetrics(getWidgetFont()).stringWidth(SAMPLE_STRING) + insets.left + insets.right + 2;
|
||||
int height = getFontMetrics(getWidgetFont()).getHeight() + insets.top + insets.bottom + 2;
|
||||
int width = getFontMetrics(getWidgetFont()).stringWidth(SAMPLE_STRING) + insets.left + insets.right + JBUI.scale(2);
|
||||
int height = getFontMetrics(getWidgetFont()).getHeight() + insets.top + insets.bottom + JBUI.scale(2);
|
||||
return new Dimension(width, height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user