mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:23:25 +00:00
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 <helling@atdotde.de>
This commit is contained in:
parent
b4d37e8eeb
commit
de49f2484f
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue