mirror of https://github.com/zlatinb/muwire
instead of packing use sensible default dimension for main frame
parent
7da68347ad
commit
08e384067b
|
@ -122,16 +122,14 @@ class MainFrameView {
|
||||||
settings = application.context.get("ui-settings")
|
settings = application.context.get("ui-settings")
|
||||||
int rowHeight = application.context.get("row-height")
|
int rowHeight = application.context.get("row-height")
|
||||||
|
|
||||||
int mainFrameX = 1
|
def screenDimensions = Toolkit.getDefaultToolkit().getScreenSize()
|
||||||
int mainFrameY = 1
|
int mainFrameX = (int)Math.min(1400.0d, screenDimensions.getWidth())
|
||||||
int dividerLocation = 750
|
int mainFrameY = (int)Math.min(1200.0d, screenDimensions.getHeight())
|
||||||
boolean pack = true
|
|
||||||
if (settings.mainFrameX > 0 && settings.mainFrameY > 0) {
|
if (settings.mainFrameX > 0 && settings.mainFrameY > 0) {
|
||||||
pack = false
|
|
||||||
mainFrameX = settings.mainFrameX
|
mainFrameX = settings.mainFrameX
|
||||||
mainFrameY = settings.mainFrameY
|
mainFrameY = settings.mainFrameY
|
||||||
dividerLocation = (int)(mainFrameY * 0.75d)
|
|
||||||
}
|
}
|
||||||
|
final int dividerLocation = (int)(0.75d * mainFrameY)
|
||||||
|
|
||||||
def transferHandler = new MWTransferHandler()
|
def transferHandler = new MWTransferHandler()
|
||||||
def collectionsTransferHandler = new FileCollectionTransferHandler()
|
def collectionsTransferHandler = new FileCollectionTransferHandler()
|
||||||
|
@ -149,7 +147,7 @@ class MainFrameView {
|
||||||
iconImages: [imageIcon('/MuWire-48x48.png').image,
|
iconImages: [imageIcon('/MuWire-48x48.png').image,
|
||||||
imageIcon('/MuWire-32x32.png').image,
|
imageIcon('/MuWire-32x32.png').image,
|
||||||
imageIcon('/MuWire-16x16.png').image],
|
imageIcon('/MuWire-16x16.png').image],
|
||||||
pack : pack,
|
pack : false,
|
||||||
visible : bind { model.coreInitialized }) {
|
visible : bind { model.coreInitialized }) {
|
||||||
menuBar {
|
menuBar {
|
||||||
menu (text : trans("FILE")) {
|
menu (text : trans("FILE")) {
|
||||||
|
|
Loading…
Reference in New Issue