mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Show a warning on HiDPI mode auto-switch with a link to the troubleshooting guide.
This commit is contained in:
@@ -41,6 +41,7 @@ import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.util.JdkBundle;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import com.intellij.util.TimeoutUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.sun.jna.Library;
|
||||
import com.sun.jna.Memory;
|
||||
import com.sun.jna.Native;
|
||||
@@ -78,6 +79,7 @@ public class SystemHealthMonitor implements ApplicationComponent {
|
||||
checkReservedCodeCacheSize();
|
||||
checkIBus();
|
||||
checkSignalBlocking();
|
||||
checkHiDPIMode();
|
||||
startDiskSpaceMonitoring();
|
||||
}
|
||||
|
||||
@@ -166,6 +168,14 @@ public class SystemHealthMonitor implements ApplicationComponent {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkHiDPIMode() {
|
||||
// if switched from JRE-HiDPI to IDE-HiDPI
|
||||
boolean switchedHiDPIMode = SystemInfo.isJetBrainsJvm && "true".equalsIgnoreCase(System.getProperty("sun.java2d.uiScale.enabled")) && !UIUtil.isJreHiDPIEnabled();
|
||||
if (SystemInfo.isWindows && (switchedHiDPIMode || RemoteDesktopService.isRemoteSession())) {
|
||||
showNotification(new KeyHyperlinkAdapter("ide.set.hidpi.mode"));
|
||||
}
|
||||
}
|
||||
|
||||
private void showNotification(KeyHyperlinkAdapter adapter, Object... params) {
|
||||
@PropertyKey(resourceBundle = "messages.IdeBundle") String key = adapter.key;
|
||||
boolean ignored = adapter.isIgnored();
|
||||
|
||||
@@ -538,6 +538,7 @@ ide.restart.required.notification=<a href="#">{0}</a> {1} to activate changes in
|
||||
ide.restart.action=Restart
|
||||
ide.shutdown.action=Shutdown
|
||||
ide.postpone.action=Postpone
|
||||
ide.set.hidpi.mode=You may need to manually configure the HiDPI mode to prevent UI scaling issues. See the <a href="https://intellij-support.jetbrains.com/hc/en-us/articles/115001260010">troubleshooting</a> guide.
|
||||
title.plugins=Plugins
|
||||
title.plugins.changed=Plugins Changed
|
||||
plugin.status.not.specified=(not specified)
|
||||
|
||||
Reference in New Issue
Block a user