mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
HiDPI: fix menu items
This commit is contained in:
@@ -557,9 +557,11 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
|
||||
private static void patchHiDPI(UIDefaults defaults) {
|
||||
if (JBUI.isHiDPI()) {
|
||||
for (Map.Entry<Object, Object> entry : defaults.entrySet()) {
|
||||
if (entry.getValue() instanceof DimensionUIResource) {
|
||||
DimensionUIResource size = (DimensionUIResource)entry.getValue();
|
||||
entry.setValue(JBUI.size(size).asUIResource());
|
||||
Object value = entry.getValue();
|
||||
if (value instanceof DimensionUIResource) {
|
||||
entry.setValue(JBUI.size((DimensionUIResource)value).asUIResource());
|
||||
} else if (value instanceof Integer && entry.getKey().toString().endsWith(".maxGutterIconWidth")) {
|
||||
entry.setValue(Integer.valueOf(JBUI.scale((Integer)value)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 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.
|
||||
@@ -17,6 +17,7 @@ package com.intellij.ui.plaf.beg;
|
||||
|
||||
import com.intellij.Patches;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -55,7 +56,7 @@ public class IdeaMenuUI extends BasicMenuUI{
|
||||
}
|
||||
|
||||
public IdeaMenuUI() {
|
||||
myMaxGutterIconWidth = 18;
|
||||
myMaxGutterIconWidth = JBUI.scale(18);
|
||||
|
||||
if (UIUtil.isUnderAquaLookAndFeel()) {
|
||||
if (myAquaSelectedBackgroundPainter == null) myAquaSelectedBackgroundPainter = (Border) UIManager.get("MenuItem.selectedBackgroundPainter");
|
||||
|
||||
Reference in New Issue
Block a user