From 404d5b60bc64c09e1b63b960560cfd7a84260555 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Tue, 4 Jun 2019 14:05:33 +0100 Subject: [PATCH] format length in shared file stable an resize columns --- gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy b/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy index a85a464b..a922fbc7 100644 --- a/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy +++ b/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy @@ -129,8 +129,9 @@ class MainFrameView { scrollPane ( constraints : BorderLayout.CENTER) { table(id : "shared-files-table") { tableModel(list : model.shared) { - closureColumn(header : "Name", type : String, read : {row -> row.file.getAbsolutePath()}) - closureColumn(header : "Size", type : Long, read : {row -> row.file.length()}) + closureColumn(header : "Name", preferredWidth : 550, type : String, read : {row -> row.file.getAbsolutePath()}) + closureColumn(header : "Size", preferredWidth : 50, type : String, + read : {row -> DataHelper.formatSize2Decimal(row.file.length(),false) + "B"}) } } }