forked from External/mage
add restoring tournament table chat divider location
refactor getting current bounds into utility function
This commit is contained in:
parent
5822a7d94d
commit
ebc36c503e
4 changed files with 22 additions and 7 deletions
|
|
@ -48,6 +48,12 @@ public final class GuiDisplayUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static void saveCurrentBoundsToPrefs() {
|
||||
Rectangle rec = MageFrame.getDesktop().getBounds();
|
||||
String currentBounds = Double.toString(rec.getWidth()) + 'x' + Double.toString(rec.getHeight());
|
||||
PreferencesDialog.saveValue(KEY_MAGE_PANEL_LAST_SIZE, currentBounds);
|
||||
}
|
||||
|
||||
public static void setDividerLocation(String dividerPrefKey, int position) {
|
||||
PreferencesDialog.saveValue(dividerPrefKey, Integer.toString(position));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue