macOS large title bar: main JToolBar automatically:

- uses height of macOS window title bar
- adds left insets for close/minimize/zoom buttons (except if full screen, where those buttons are hidden)
This commit is contained in:
Karl Tauber
2023-12-11 15:05:37 +01:00
parent f40baed65e
commit ea2447dcb7
7 changed files with 292 additions and 11 deletions

View File

@@ -18,9 +18,33 @@ JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setW
/*
* Class: com_formdev_flatlaf_ui_FlatNativeMacLibrary
* Method: setWindowToolbar
* Signature: (Ljava/awt/Window;)V
* Signature: (Ljava/awt/Window;Z)V
*/
JNIEXPORT void JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_setWindowToolbar
(JNIEnv *, jclass, jobject, jboolean);
/*
* Class: com_formdev_flatlaf_ui_FlatNativeMacLibrary
* Method: getWindowButtonAreaWidth
* Signature: (Ljava/awt/Window;)I
*/
JNIEXPORT jint JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_getWindowButtonAreaWidth
(JNIEnv *, jclass, jobject);
/*
* Class: com_formdev_flatlaf_ui_FlatNativeMacLibrary
* Method: getWindowTitleBarHeight
* Signature: (Ljava/awt/Window;)I
*/
JNIEXPORT jint JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_getWindowTitleBarHeight
(JNIEnv *, jclass, jobject);
/*
* Class: com_formdev_flatlaf_ui_FlatNativeMacLibrary
* Method: isWindowFullScreen
* Signature: (Ljava/awt/Window;)Z
*/
JNIEXPORT jboolean JNICALL Java_com_formdev_flatlaf_ui_FlatNativeMacLibrary_isWindowFullScreen
(JNIEnv *, jclass, jobject);
#ifdef __cplusplus