Window decorations: add small resize area at top of embedded menu bar only if frame is resizable

This commit is contained in:
Karl Tauber
2022-07-11 17:47:04 +02:00
parent ef151c68f4
commit 2c041dce3a

View File

@@ -809,9 +809,9 @@ debug*/
if( hasVisibleEmbeddedMenuBar( menuBar ) ) {
r = getNativeHitTestSpot( menuBar );
if( r != null ) {
// if frame is not maximized, make menu bar hit test spot smaller at top
// if frame is resizable and not maximized, make menu bar hit test spot smaller at top
// to have a small area above the menu bar to resize the window
if( !isWindowMaximized() ) {
if( window instanceof Frame && ((Frame)window).isResizable() && !isWindowMaximized() ) {
// limit to 8, because Windows does not use a larger height
int resizeHeight = UIScale.scale( Math.min( menuBarResizeHeight, 8 ) );
r.y += resizeHeight;