mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-184383 Large icons since 2017.3
This commit is contained in:
@@ -221,7 +221,7 @@ public class JBUI {
|
||||
|
||||
static {
|
||||
setUserScaleFactor(UIUtil.isJreHiDPIEnabled() ? 1f : SYSTEM_SCALE_FACTOR);
|
||||
LOG.info("System scale factor: " + SYSTEM_SCALE_FACTOR + " (" +
|
||||
LOG.info("System scale factor: " + String.format("%.02f", SYSTEM_SCALE_FACTOR) + " (" +
|
||||
(UIUtil.isJreHiDPIEnabled() ? "JRE-managed" : "IDE-managed") + " HiDPI)");
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,15 @@ public class UIUtil {
|
||||
|
||||
// Applied to all JLabel instances, including subclasses. Supported in JBSDK only.
|
||||
UIManager.getDefaults().put("javax.swing.JLabel.userStyleSheet", UIUtil.JBHtmlEditorKit.createStyleSheet());
|
||||
|
||||
if (SystemInfo.isLinux && Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Xft/DPI") != null) {
|
||||
float dpi_factor = 96 / (float)72; // J2D factor
|
||||
int gnome_base_font_size = 11;
|
||||
DEF_SYSTEM_FONT_SIZE = gnome_base_font_size * dpi_factor;
|
||||
}
|
||||
else {
|
||||
DEF_SYSTEM_FONT_SIZE = 12;
|
||||
}
|
||||
}
|
||||
|
||||
public static void decorateFrame(@NotNull JRootPane pane) {
|
||||
@@ -334,7 +343,7 @@ public class UIUtil {
|
||||
|
||||
private static volatile Pair<String, Integer> ourSystemFontData;
|
||||
|
||||
public static final float DEF_SYSTEM_FONT_SIZE = 12f; // TODO: consider 12 * 1.33 to compensate JDK's 72dpi font scale
|
||||
public static final float DEF_SYSTEM_FONT_SIZE;
|
||||
|
||||
@NonNls private static final String ROOT_PANE = "JRootPane.future";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user