feat(updater): final step for portable install

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-06-24 22:21:16 -07:00
parent d2a3acd493
commit 4313466589
8 changed files with 256 additions and 55 deletions

View File

@ -68,6 +68,8 @@ ProgressDialog::ProgressDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Pr
setAttribute(Qt::WidgetAttribute::WA_QuitOnClose, true);
setSkipButton(false);
changeProgress(0, 100);
updateSize();
adjustSize();
}
void ProgressDialog::setSkipButton(bool present, QString label)
@ -96,7 +98,11 @@ ProgressDialog::~ProgressDialog()
void ProgressDialog::updateSize()
{
QSize lastSize = this->size();
QSize qSize = QSize(480, minimumSizeHint().height());
auto min_height = minimumSizeHint().height();
if (ui->taskProgressScrollArea->isHidden())
min_height -= ui->taskProgressScrollArea->minimumSizeHint().height();
min_height = std::max(min_height, 0);
QSize qSize = QSize(480, min_height);
// if the current window is too small
if ((lastSize != qSize) && (lastSize.height() < qSize.height()))
@ -111,7 +117,6 @@ void ProgressDialog::updateSize()
}
setMinimumSize(qSize);
}
int ProgressDialog::execWithTask(Task* task)

View File

@ -48,6 +48,9 @@
<property name="text">
<string>Global Task Status...</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
@ -109,8 +112,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>464</width>
<height>96</height>
<width>460</width>
<height>108</height>
</rect>
</property>
<layout class="QVBoxLayout" name="taskProgressLayout">