From ca402c2ba144e33dc9a6bb69437d78aca55da5c3 Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 2 Mar 2018 18:05:11 +0100 Subject: [PATCH] fixed column sizing in FT dialog --- .../src/gui/FileTransfer/TransfersDialog.cpp | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp index 460f97169..94e6f924e 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp @@ -264,22 +264,24 @@ public: QVariant sizeHintRole(int col) const { + float factor = QFontMetricsF(font())/14.0f ; + switch(col) { default: - case COLUMN_NAME: return QVariant( 170 ); - case COLUMN_SIZE: return QVariant( 70 ); - case COLUMN_COMPLETED: return QVariant( 75 ); - case COLUMN_DLSPEED: return QVariant( 75 ); - case COLUMN_PROGRESS: return QVariant( 170 ); - case COLUMN_SOURCES: return QVariant( 90 ); - case COLUMN_STATUS: return QVariant( 100 ); - case COLUMN_PRIORITY: return QVariant( 100 ); - case COLUMN_REMAINING: return QVariant( 100 ); - case COLUMN_DOWNLOADTIME: return QVariant( 100 ); - case COLUMN_ID: return QVariant( 100 ); - case COLUMN_LASTDL: return QVariant( 100 ); - case COLUMN_PATH: return QVariant( 100 ); + case COLUMN_NAME: return QVariant( factor * 170 ); + case COLUMN_SIZE: return QVariant( factor * 70 ); + case COLUMN_COMPLETED: return QVariant( factor * 75 ); + case COLUMN_DLSPEED: return QVariant( factor * 75 ); + case COLUMN_PROGRESS: return QVariant( factor * 170 ); + case COLUMN_SOURCES: return QVariant( factor * 90 ); + case COLUMN_STATUS: return QVariant( factor * 100 ); + case COLUMN_PRIORITY: return QVariant( factor * 100 ); + case COLUMN_REMAINING: return QVariant( factor * 100 ); + case COLUMN_DOWNLOADTIME: return QVariant( factor * 100 ); + case COLUMN_ID: return QVariant( factor * 100 ); + case COLUMN_LASTDL: return QVariant( factor * 100 ); + case COLUMN_PATH: return QVariant( factor * 100 ); } }