updater: fix button focus

This commit is contained in:
tobtoht 2024-05-03 16:29:26 +02:00
parent e2eb8e4ed3
commit 478248f99c
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
2 changed files with 15 additions and 0 deletions

View file

@ -69,6 +69,7 @@ void UpdateDialog::noUpdateAvailable() {
void UpdateDialog::updateAvailable() { void UpdateDialog::updateAvailable() {
m_waitingTimer.stop(); m_waitingTimer.stop();
ui->frame->show(); ui->frame->show();
ui->btn_download->setFocus();
ui->btn_installUpdate->hide(); ui->btn_installUpdate->hide();
ui->btn_restart->hide(); ui->btn_restart->hide();
ui->progressBar->hide(); ui->progressBar->hide();
@ -134,6 +135,7 @@ void UpdateDialog::onDownloadFinished() {
this->setStatus("Download finished and verified.", true); this->setStatus("Download finished and verified.", true);
ui->btn_installUpdate->show(); ui->btn_installUpdate->show();
ui->btn_installUpdate->setFocus();
ui->progressBar->hide(); ui->progressBar->hide();
m_updateZipArchive = responseStr; m_updateZipArchive = responseStr;
@ -246,6 +248,7 @@ void UpdateDialog::onInstallUpdate() {
this->setStatus("Installation successful. Do you want to restart Feather now?"); this->setStatus("Installation successful. Do you want to restart Feather now?");
} }
ui->btn_restart->show(); ui->btn_restart->show();
ui->btn_restart->setFocus();
} }
void UpdateDialog::installUpdateMac() { void UpdateDialog::installUpdateMac() {

View file

@ -79,6 +79,9 @@
<property name="text"> <property name="text">
<string>Cancel</string> <string>Cancel</string>
</property> </property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -86,6 +89,9 @@
<property name="text"> <property name="text">
<string>Download</string> <string>Download</string>
</property> </property>
<property name="default">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -93,6 +99,9 @@
<property name="text"> <property name="text">
<string>Install Update</string> <string>Install Update</string>
</property> </property>
<property name="default">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -100,6 +109,9 @@
<property name="text"> <property name="text">
<string>Restart Feather</string> <string>Restart Feather</string>
</property> </property>
<property name="default">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>