Skip to content

Commit

Permalink
Restore change in RootPaneUI
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Sep 20, 2020
1 parent ce1d346 commit ff196e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies {
testCompile group: 'org.assertj', name: 'assertj-swing-junit', version: '3.9.2'
testCompile 'io.github.material-ui-swing:DarkStackOverflowTheme:0.0.1-rc2'
testCompile group: 'com.toedter', name: 'jcalendar', version: '1.4'

}

allprojects {
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/mdlaf/components/rootpane/MaterialRootPaneUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ public void mouseDragged(MouseEvent e) {
newX = startingBounds.x - deltaX;
newY = startingBounds.y - deltaY;

/**

//TODO see this point because with two display not worked well (Resolved -> testing)
// Make sure we stay in-bounds
if (newX + windows.left <= -windiwNowX) {
Expand All @@ -835,13 +835,13 @@ public void mouseDragged(MouseEvent e) {
} else if (newY + windows.top <= -windowNowY) {
//What operation do this?
newY = -windowNowY - windows.top + 1;
} else if (newX + windiwNowX + windows.right >= pWidth) {
} else if (newX + windiwNowX + windows.right >= parentWidth) {
//What operation do this?
newX = pWidth - windiwNowX - windows.right - 1;
} else if (newY + windowNowY + windows.bottom >= pHeight) {
newX = parentWidth - windiwNowX - windows.right - 1;
} else if (newY + windowNowY + windows.bottom >= parentHeight) {
//What operation do this?
newY = pHeight - windowNowY - windows.bottom - 1;
} **/
newY = parentHeight - windowNowY - windows.bottom - 1;
}
//System.out.printf("(%03d, %03d) -> (%03d, %03d)\n", viewX, viewY, newX, newY);
dragFrame(window, newX, newY);
return;
Expand Down

0 comments on commit ff196e4

Please sign in to comment.