From 5eaa8b827aad222e75c1cbb50feb3b3d07b4c1e1 Mon Sep 17 00:00:00 2001 From: Sergei Tachenov Date: Thu, 17 Oct 2024 18:01:04 +0300 Subject: [PATCH] IJPL-164066 Add popup.resize.zone.* registry keys for Windows and Linux Let's make it more consistent and possible for internal and power users to adjust to their liking. GitOrigin-RevId: b344587e147f8dce32ecf72a2b5ec0a76fa48906 --- .../src/com/intellij/ui/WindowResizeListenerEx.kt | 10 +++++++++- platform/util/resources/misc/registry.properties | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ui/WindowResizeListenerEx.kt b/platform/platform-impl/src/com/intellij/ui/WindowResizeListenerEx.kt index 46c182c1fe3d..320f18279108 100644 --- a/platform/platform-impl/src/com/intellij/ui/WindowResizeListenerEx.kt +++ b/platform/platform-impl/src/com/intellij/ui/WindowResizeListenerEx.kt @@ -74,4 +74,12 @@ private fun defaultBorder(movable: Boolean): Insets { } } -private fun defaultZone(): Int = if (SystemInfo.isMac) Registry.intValue("popup.resize.zone.macos", 8) else 4 +private fun defaultZone(): Int = if (SystemInfo.isMac) { + Registry.intValue("popup.resize.zone.macos", 8) // for some reason, small values on macOS make it really uncomfortable +} +else if (SystemInfo.isWindows) { + Registry.intValue("popup.resize.zone.windows", 4) +} +else { + Registry.intValue("popup.resize.zone.linux", 4) +} diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 05cf57363c19..80a2e19cfc3e 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -1370,6 +1370,10 @@ allow.dialog.based.popups=false allow.dialog.based.popups.description=Allows to use a JDialog as popup toplevel popup.resize.zone.macos=8 popup.resize.zone.macos.description=The size of mouse resize zone on macOS +popup.resize.zone.windows=4 +popup.resize.zone.windows.description=The size of mouse resize zone on Windows +popup.resize.zone.linux=4 +popup.resize.zone.linux.description=The size of mouse resize zone on Linux popup.fix.ide.frame.owner=false popup.fix.ide.frame.owner.description=Uses correct owner for IdeFrame, but can break some popups