-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native window decorations for Windows 10 (using JNI) #267
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… replaced with JNI later)
… on application icon, close window on left-double-click on app icon
…latlaf-natives/flatlaf-natives-jna` removed module-info.java because this JAR is not released/published
…LL size from 100kb to 8kb
…dows) if no C++ compiler is available
…ecause it is not used/needed
…e approach as used in JNA)
DevCharly
added
the
custom window decorations
Related to using FlatLaf custom window decorations
label
Mar 10, 2021
- enabled by default (via UI property `TitlePane.useWindowDecorations`) - dropped system property `flatlaf.useNativeWindowDecorations` and replaced with `flatlaf.useWindowDecorations` - old functionality of system property `flatlaf.useWindowDecorations` removed
This feature is now enabled by default (see updated main post) |
Very nice and complex job. |
Closed
kingthorin
added a commit
to kingthorin/zaproxy
that referenced
this pull request
Apr 29, 2021
Native Decorations were causing various issues for me: - ZAP wouldn't start maximized. - Split pane dividers would drift noticeably between starts of ZAP. - The close button would sometimes be inaccessible. See: JFormDesigner/FlatLaf#267 for further details. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
kosap
pushed a commit
to kosap/zaproxy
that referenced
this pull request
Jun 3, 2021
Native Decorations were causing various issues for me: - ZAP wouldn't start maximized. - Split pane dividers would drift noticeably between starts of ZAP. - The close button would sometimes be inaccessible. See: JFormDesigner/FlatLaf#267 for further details. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
preetkaran20
pushed a commit
to preetkaran20/zaproxy
that referenced
this pull request
Jul 19, 2021
Native Decorations were causing various issues for me: - ZAP wouldn't start maximized. - Split pane dividers would drift noticeably between starts of ZAP. - The close button would sometimes be inaccessible. See: JFormDesigner/FlatLaf#267 for further details. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the successor of PR #262 and implements native window decorations for Windows 10 using JNI. This avoids the 3MB dependency on JNA. Also
flatlaf-native-jna-1.1-SNAPSHOT.jar
is no longer needed. A small 9kB DLL is now contained inflatlaf.jar
. This DLL is extracted at startup to folder$TEMP/flatlaf.temp
. Since it is not possible to delete it when the application exits (because Windows has locked it), unused temporary DLL is deleted on next startup.This PR enables dark frame/dialog title bar and embedded menu bar with all JREs while still having:
Try it
To try it out, either build from source or download the build artifacts ZIP from GitHub Actions
(at the bottom of that page):
https://github.com/JFormDesigner/FlatLaf/actions/runs/642361750
The ZIP contains the demo
flatlaf-demo-1.1-SNAPSHOT.jar
(contains all dependencies).To test in own applications, add
flatlaf-1.1-SNAPSHOT.jar
to the classpath.Enable/disable
This feature is enabled by default on Windows 10.
If you don't like/want it, you can disable it with:
It is also possible to disable only the embedded menu bar (and keep the dark title pane) with:
It is also possible to disable this on command line with following VM options:
If you have following code in your app, you can remove it (no longer necessary):
JetBrains Runtime (JRE)
If you're using JetBrains Runtime 11 to run your app, this feature is not used.
Instead the native window decorations feature provided by the JetBrains Runtime is used (as in FlatLaf 1.0).
fixes issue #170