mirror of https://github.com/zlatinb/muwire
fix remembering of main window size
parent
f0696a1031
commit
346668dd6d
|
@ -96,8 +96,18 @@ class MainFrameView {
|
|||
String revision = ""
|
||||
if (metadata["build.revision"] != null)
|
||||
revision = " revision " + metadata["build.revision"].substring(0,10)
|
||||
|
||||
int mainFrameX = 1
|
||||
int mainFrameY = 1
|
||||
boolean pack = true
|
||||
if (settings.mainFrameX > 0 && settings.mainFrameY > 0) {
|
||||
pack = false
|
||||
mainFrameX = settings.mainFrameX
|
||||
mainFrameY = settings.mainFrameY
|
||||
}
|
||||
|
||||
builder.with {
|
||||
application(size : [settings.mainFrameX,settings.mainFrameY], id: 'main-frame',
|
||||
application(size : [mainFrameX,mainFrameY], id: 'main-frame',
|
||||
locationRelativeTo : null,
|
||||
defaultCloseOperation : JFrame.DO_NOTHING_ON_CLOSE,
|
||||
title: application.configuration['application.title'] + " " +
|
||||
|
@ -106,7 +116,7 @@ class MainFrameView {
|
|||
iconImages: [imageIcon('/MuWire-48x48.png').image,
|
||||
imageIcon('/MuWire-32x32.png').image,
|
||||
imageIcon('/MuWire-16x16.png').image],
|
||||
pack : true,
|
||||
pack : pack,
|
||||
visible : bind { model.coreInitialized }) {
|
||||
menuBar {
|
||||
menu (text : trans("FILE")) {
|
||||
|
|
|
@ -47,8 +47,8 @@ class UISettings {
|
|||
groupByFile = Boolean.parseBoolean(props.getProperty("groupByFile","false"))
|
||||
maxChatLines = Integer.parseInt(props.getProperty("maxChatLines","-1"))
|
||||
|
||||
mainFrameX = Integer.parseInt(props.getProperty("mainFrameX","1024"))
|
||||
mainFrameY = Integer.parseInt(props.getProperty("mainFrameY","768"))
|
||||
mainFrameX = Integer.parseInt(props.getProperty("mainFrameX","-1"))
|
||||
mainFrameY = Integer.parseInt(props.getProperty("mainFrameY","-1"))
|
||||
|
||||
searchHistory = DataUtil.readEncodedSet(props, "searchHistory")
|
||||
openTabs = DataUtil.readEncodedSet(props, "openTabs")
|
||||
|
|
Loading…
Reference in New Issue