mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
macOS large title bar: fixed wrong "main" JToolBar height and left inset after leaving full screen
This commit is contained in:
@@ -54,7 +54,7 @@ public class FlatNativeMacLibrary
|
||||
|
||||
public native static boolean setWindowRoundedBorder( Window window, float radius, float borderWidth, int borderColor );
|
||||
|
||||
public native static void setWindowToolbar( Window window, boolean hasToolbar );
|
||||
public native static boolean setWindowToolbar( Window window, boolean hasToolbar );
|
||||
public native static int getWindowButtonAreaWidth( Window window );
|
||||
public native static int getWindowTitleBarHeight( Window window );
|
||||
public native static boolean isWindowFullScreen( Window window );
|
||||
|
||||
@@ -116,11 +116,7 @@ public class FlatToolBarBorder
|
||||
}
|
||||
|
||||
// on macOS, add some extra space to left side for close/minimize/zoom buttons (if necessary)
|
||||
if( c instanceof JToolBar &&
|
||||
FlatToolBarUI.isMacOSMainToolbar( (JToolBar) c ) &&
|
||||
(!FlatNativeMacLibrary.isLoaded() ||
|
||||
!FlatNativeMacLibrary.isWindowFullScreen( SwingUtilities.windowForComponent( c ) )) )
|
||||
{
|
||||
if( c instanceof JToolBar && FlatToolBarUI.isMacOSMainToolbar( (JToolBar) c ) ) {
|
||||
// get button area width from macOS
|
||||
int buttonBarWidth = FlatNativeMacLibrary.isLoaded()
|
||||
? FlatNativeMacLibrary.getWindowButtonAreaWidth( SwingUtilities.windowForComponent( c ) )
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user