mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Window decorations: fixed broken window resizing on Linux multi-screen setups (issue #632)
This commit is contained in:
@@ -5,6 +5,8 @@ FlatLaf Change Log
|
|||||||
|
|
||||||
#### Fixed bugs
|
#### Fixed bugs
|
||||||
|
|
||||||
|
- FlatLaf window decorations on Linux: Fixed broken window resizing on
|
||||||
|
multi-screen setups. (issue #632)
|
||||||
- IntelliJ Themes:
|
- IntelliJ Themes:
|
||||||
- Fixed default button hover background in "Solarized Light" theme. (issue
|
- Fixed default button hover background in "Solarized Light" theme. (issue
|
||||||
#628)
|
#628)
|
||||||
|
|||||||
@@ -606,9 +606,10 @@ debug*/
|
|||||||
if( resizeDir == S_RESIZE_CURSOR || resizeDir == SW_RESIZE_CURSOR || resizeDir == SE_RESIZE_CURSOR ) {
|
if( resizeDir == S_RESIZE_CURSOR || resizeDir == SW_RESIZE_CURSOR || resizeDir == SE_RESIZE_CURSOR ) {
|
||||||
newBounds.height = (yOnScreen + dragBottomOffset) - newBounds.y;
|
newBounds.height = (yOnScreen + dragBottomOffset) - newBounds.y;
|
||||||
if( limitToParentBounds() ) {
|
if( limitToParentBounds() ) {
|
||||||
int parentHeight = getParentBounds().height;
|
Rectangle parentBounds = getParentBounds();
|
||||||
if( newBounds.y + newBounds.height > parentHeight )
|
int parentBottomY = parentBounds.y + parentBounds.height;
|
||||||
newBounds.height = parentHeight - newBounds.y;
|
if( newBounds.y + newBounds.height > parentBottomY )
|
||||||
|
newBounds.height = parentBottomY - newBounds.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,9 +625,10 @@ debug*/
|
|||||||
if( resizeDir == E_RESIZE_CURSOR || resizeDir == NE_RESIZE_CURSOR || resizeDir == SE_RESIZE_CURSOR ) {
|
if( resizeDir == E_RESIZE_CURSOR || resizeDir == NE_RESIZE_CURSOR || resizeDir == SE_RESIZE_CURSOR ) {
|
||||||
newBounds.width = (xOnScreen + dragRightOffset) - newBounds.x;
|
newBounds.width = (xOnScreen + dragRightOffset) - newBounds.x;
|
||||||
if( limitToParentBounds() ) {
|
if( limitToParentBounds() ) {
|
||||||
int parentWidth = getParentBounds().width;
|
Rectangle parentBounds = getParentBounds();
|
||||||
if( newBounds.x + newBounds.width > parentWidth )
|
int parentRightX = parentBounds.x + parentBounds.width;
|
||||||
newBounds.width = parentWidth - newBounds.x;
|
if( newBounds.x + newBounds.width > parentRightX )
|
||||||
|
newBounds.width = parentRightX - newBounds.x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user