Skip to content

Commit

Permalink
cascade shared stash windows instead of tiling
Browse files Browse the repository at this point in the history
  • Loading branch information
pairofdocs committed Oct 4, 2021
1 parent 8800780 commit baf609f
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions gomule/src/gomule/gui/D2FileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1547,24 +1547,9 @@ public void openStash(String pStashName, boolean load)
if (lExisting != null) {
internalWindowForward(((JInternalFrame) lExisting));
}else {
int BG_WIDTH2 = 908; // 908 x 309 pixels
int BG_HEIGHT2 = 309;
D2ViewSharedStash lSharedStashView = new D2ViewSharedStash(D2FileManager.this, pStashName);
if (iOpenWindows.size() == 0) {
lSharedStashView.setLocation(0, 0); // orig had: 10+ x, 10+ y
} else if (iOpenWindows.size() == 1) {
//BG_WIDTH = 626; //550; // TODO: update to 626 // from D2ViewChar
//BG_HEIGHT = 435; //383; // TODO: update to 457

lSharedStashView.setLocation((BG_WIDTH2 + 16), 0);
} else if (iOpenWindows.size() == 2) {
lSharedStashView.setLocation(0, BG_HEIGHT2 + 48);
} else if (iOpenWindows.size() == 3) { // will this be appropriate for 1920x1080 displays?. having the 3,4th windows go under 1st and 2nd
lSharedStashView.setLocation((BG_WIDTH2 + 16), BG_HEIGHT2 + 48);
} else {
// lSharedStashView.setLocation(20 + (iOpenWindows.size() * 10), 20 + (iOpenWindows.size() * 10)); // orig had: 10+ x, 10+ y
lSharedStashView.setLocation(((iOpenWindows.size()-4 +1) * 20), BG_HEIGHT2 + 48 + ((iOpenWindows.size()-4 +1) * 20));
}
// cascade opening shared stashes. not tiling like with char windows
lSharedStashView.setLocation(5 + (iOpenWindows.size() * 25), 5+ (iOpenWindows.size() * 25));
addToOpenWindows(lSharedStashView);
internalWindowForward(lSharedStashView);
}
Expand Down

0 comments on commit baf609f

Please sign in to comment.