diff --git a/core/src/main/java/com/github/weisj/darklaf/platform/DecorationsHandler.java b/core/src/main/java/com/github/weisj/darklaf/platform/DecorationsHandler.java index 471403b4..f58e20e6 100644 --- a/core/src/main/java/com/github/weisj/darklaf/platform/DecorationsHandler.java +++ b/core/src/main/java/com/github/weisj/darklaf/platform/DecorationsHandler.java @@ -110,8 +110,4 @@ public class DecorationsHandler { public void adjustContentArea(final JRootPane root, final Rectangle rect) { decorationsProvider.adjustContentArea(root, rect); } - - public void adjustWindowInsets(final Window window, final Insets i) { - decorationsProvider.adjustWindowInsets(window, i); - } } diff --git a/platform-base/src/main/java/com/github/weisj/darklaf/platform/decorations/DecorationsProvider.java b/platform-base/src/main/java/com/github/weisj/darklaf/platform/decorations/DecorationsProvider.java index e7506329..09b24699 100644 --- a/platform-base/src/main/java/com/github/weisj/darklaf/platform/decorations/DecorationsProvider.java +++ b/platform-base/src/main/java/com/github/weisj/darklaf/platform/decorations/DecorationsProvider.java @@ -70,12 +70,4 @@ public interface DecorationsProvider { * @param rect the proposed content area. */ default void adjustContentArea(final JRootPane root, final Rectangle rect) {} - - /** - * Adjust the window insets. - * - * @param window the corresponding window. - * @param i the insets to adjust. - */ - default void adjustWindowInsets(final Window window, final Insets i) {} } diff --git a/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java b/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java index bf1b0dcd..d7f3d2c1 100644 --- a/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java +++ b/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java @@ -98,18 +98,6 @@ public class WindowsDecorationsProvider implements DecorationsProvider { } } - @Override - public void adjustWindowInsets(final Window window, final Insets i) { - // Compensate for the insets of the native window peer that include the decorations. - if (window != null) { - Insets insets = window.getInsets(); - i.left -= insets.left; - i.right -= insets.right; - i.top -= insets.top; - i.bottom -= insets.bottom; - } - } - @Override public void loadDecorationProperties(final Properties properties, final UIDefaults currentDefaults) { IconLoader iconLoader = IconLoader.get(WindowsDecorationsProvider.class);