summaryrefslogtreecommitdiffstats
path: root/src/progress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progress.cpp')
-rw-r--r--src/progress.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/progress.cpp b/src/progress.cpp
index 6d01482..cf5328b 100644
--- a/src/progress.cpp
+++ b/src/progress.cpp
@@ -15,6 +15,14 @@ Progress::Progress(QString text, QWidget *parent)
l->setMargin(0);
setLayout(l);
_progress->setRange(0, 100);
+ _label->setMinimumHeight(16);
+ _progress->setMinimumHeight(16);
+ _label->show();
+ _progress->show();
+ l->addWidget(_label);
+ l->addWidget(_progress);
+ _label->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
+ _progress->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred));
}
Progress::~Progress()
@@ -26,8 +34,8 @@ void Progress::resizeEvent(QResizeEvent *event)
{
QWidget::resizeEvent(event);
auto size = event->size();
- int width = size.width() - 150;
- if (width < 250) {
+ int width = size.width() - 110;
+ if (width < 120) {
width = size.width();
_progress->hide();
} else if (_progress->value() != -1) {
@@ -47,7 +55,7 @@ void Progress::setProgress(int percent)
_progress->setValue(percent);
if (_hidden) {
_hidden = false;
- if (_label->width() > 250) {
+ if (_label->width() > 200) {
_progress->show();
}
}