Skip to content

Commit ff196e4

Browse files
Restore change in RootPaneUI
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent ce1d346 commit ff196e4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ dependencies {
2626
testCompile group: 'org.assertj', name: 'assertj-swing-junit', version: '3.9.2'
2727
testCompile 'io.github.material-ui-swing:DarkStackOverflowTheme:0.0.1-rc2'
2828
testCompile group: 'com.toedter', name: 'jcalendar', version: '1.4'
29-
3029
}
3130

3231
allprojects {

src/main/java/mdlaf/components/rootpane/MaterialRootPaneUI.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ public void mouseDragged(MouseEvent e) {
826826
newX = startingBounds.x - deltaX;
827827
newY = startingBounds.y - deltaY;
828828

829-
/**
829+
830830
//TODO see this point because with two display not worked well (Resolved -> testing)
831831
// Make sure we stay in-bounds
832832
if (newX + windows.left <= -windiwNowX) {
@@ -835,13 +835,13 @@ public void mouseDragged(MouseEvent e) {
835835
} else if (newY + windows.top <= -windowNowY) {
836836
//What operation do this?
837837
newY = -windowNowY - windows.top + 1;
838-
} else if (newX + windiwNowX + windows.right >= pWidth) {
838+
} else if (newX + windiwNowX + windows.right >= parentWidth) {
839839
//What operation do this?
840-
newX = pWidth - windiwNowX - windows.right - 1;
841-
} else if (newY + windowNowY + windows.bottom >= pHeight) {
840+
newX = parentWidth - windiwNowX - windows.right - 1;
841+
} else if (newY + windowNowY + windows.bottom >= parentHeight) {
842842
//What operation do this?
843-
newY = pHeight - windowNowY - windows.bottom - 1;
844-
} **/
843+
newY = parentHeight - windowNowY - windows.bottom - 1;
844+
}
845845
//System.out.printf("(%03d, %03d) -> (%03d, %03d)\n", viewX, viewY, newX, newY);
846846
dragFrame(window, newX, newY);
847847
return;

0 commit comments

Comments
 (0)