From de49f2484f108b725ad239a66352a42c63fb2070 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sat, 13 Jan 2018 16:37:19 +0100 Subject: [PATCH] Resize progress bar width to fit all text At least on Mac with larger font sizes part of the label text of the git access progress bar is cut off (even though it should automatically resize). This patch adds explicit resize. Fixes #1041 Signed-off-by: Robert C. Helling --- desktop-widgets/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 5cf3dc27f..26c67a261 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -78,6 +78,8 @@ extern "C" int updateProgress(const char *text) if (progressDialog) { progressDialog->setLabelText(text); progressDialog->setValue(++progressCounter); + int width = QFontMetrics(qApp->font()).width(text) + 100; + progressDialog->resize(width, progressDialog->height()); if (progressCounter == 100) progressCounter = 0; // yes this is silly, but we really don't know how long it will take }