]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
updater: fix button focus
authortobtoht <tob@featherwallet.org>
Fri, 3 May 2024 14:29:26 +0000 (16:29 +0200)
committertobtoht <tob@featherwallet.org>
Fri, 3 May 2024 15:30:40 +0000 (17:30 +0200)
src/utils/updater/UpdateDialog.cpp
src/utils/updater/UpdateDialog.ui

index 12a7656936068b496f0b475d63a1dd5211dba718..c7aab33cc97db26bbabe3da6ceb6fc7dc5351c31 100644 (file)
@@ -69,6 +69,7 @@ void UpdateDialog::noUpdateAvailable() {
 void UpdateDialog::updateAvailable() {
     m_waitingTimer.stop();
     ui->frame->show();
+    ui->btn_download->setFocus();
     ui->btn_installUpdate->hide();
     ui->btn_restart->hide();
     ui->progressBar->hide();
@@ -134,6 +135,7 @@ void UpdateDialog::onDownloadFinished() {
     this->setStatus("Download finished and verified.", true);
 
     ui->btn_installUpdate->show();
+    ui->btn_installUpdate->setFocus();
     ui->progressBar->hide();
 
     m_updateZipArchive = responseStr;
@@ -246,6 +248,7 @@ void UpdateDialog::onInstallUpdate() {
         this->setStatus("Installation successful. Do you want to restart Feather now?");
     }
     ui->btn_restart->show();
+    ui->btn_restart->setFocus();
 }
 
 void UpdateDialog::installUpdateMac() {
index 3c12c1d67e4ddf14bb58569e966568a1bc9dd14a..6a848cf2634553995b1d864047a4e64f83d7aa23 100644 (file)
@@ -79,6 +79,9 @@
           <property name="text">
            <string>Cancel</string>
           </property>
+          <property name="autoDefault">
+           <bool>false</bool>
+          </property>
          </widget>
         </item>
         <item>
@@ -86,6 +89,9 @@
           <property name="text">
            <string>Download</string>
           </property>
+          <property name="default">
+           <bool>true</bool>
+          </property>
          </widget>
         </item>
         <item>
@@ -93,6 +99,9 @@
           <property name="text">
            <string>Install Update</string>
           </property>
+          <property name="default">
+           <bool>true</bool>
+          </property>
          </widget>
         </item>
         <item>
           <property name="text">
            <string>Restart Feather</string>
           </property>
+          <property name="default">
+           <bool>true</bool>
+          </property>
          </widget>
         </item>
        </layout>