When we instantiate a Darklaf we have to create the base laf.
For macOS this may require us to install the system laf in the
UIManager. We should restore it the way we found it to ensure
no surprises if one instantiates Darklaf without trying to install
it directly afterwards. Because this makes the instantiation heavier
we skip the restoring if we know we are installing the laf directly
afterwards e.g. when installing through the LafManager.
Installing the custom decorations may cause the window to be resized
as Cocoa tries to compensate for the removal of the titlebar. Hence,
any previously set size for the window wil be incorrect. We circumvent
this issue by restoring the window bounds after the installation is
completed.
Relates to #292
Both are scheduled for removal and only occur because
the respective code replicates JDK classes. All occurrences
aren't strictly necessary hence can be removed.
They were very cluttered before. Adding some dsl functions
help to condense the information and reduce repetition.
This also fixes the failing errorprone CI.
Currently, the JDK doesn't correctly report the current operating system.
For now, we query the value ourselves using native code. This will be updated
once the JDK backport is available:
https://bugs.openjdk.java.net/browse/JDK-8274840
When running on Windows 11 don't need to extend the client frame
anymore. This allows us to give back the titlebar space to the window manager.
Hovering over the maximize button now yields in the snapping popup to appear.
This allows us to move the dependency versions back into
gradle.properties so version for plugins and dependencies are declared
in a centralized way.
This commit also removes the legacy macOS framework dependencies.