add restoring tournament table chat divider location

refactor getting current bounds into utility function
This commit is contained in:
GrayedFox 2018-05-22 20:36:05 +02:00
parent 5822a7d94d
commit ebc36c503e
No known key found for this signature in database
GPG key ID: 7FF4748DBF28C93F
4 changed files with 22 additions and 7 deletions

View file

@ -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));
}