Skip to content

Commit ebbc1e9

Browse files
authored
Qt/Updater: Move Download Size indicator to the top (#3499)
1 parent edd63df commit ebbc1e9

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

src/duckstation-qt/autoupdaterwindow.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ void AutoUpdaterWindow::getLatestReleaseComplete(s32 status_code, const Error& e
385385

386386
m_ui.currentVersion->setText(tr("Current Version: %1 (%2)").arg(g_scm_hash_str).arg(g_scm_date_str));
387387
m_ui.newVersion->setText(tr("New Version: %1 (%2)").arg(m_latest_sha).arg(doc_object["published_at"].toString()));
388+
m_ui.downloadSize->setText(tr("Download Size: %1 MB").arg(static_cast<double>(m_download_size) / 1000000.0, 0, 'f', 2));
388389

389390
#ifdef AUTO_UPDATER_SUPPORTED
390391
// search for the correct file
@@ -503,9 +504,6 @@ void AutoUpdaterWindow::getChangesComplete(s32 status_code, const Error& error,
503504
"that you will have to reconfigure your settings after this update.</p>"));
504505
}
505506

506-
changes_html += tr("<h4>Installing this update will download %1 MB through your internet connection.</h4>")
507-
.arg(static_cast<double>(m_download_size) / 1000000.0, 0, 'f', 2);
508-
509507
m_ui.updateNotes->setText(changes_html);
510508
}
511509
else

src/duckstation-qt/autoupdaterwindow.ui

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
1717
<item>
18-
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
18+
<layout class="QHBoxLayout" name="updateTextLayout" stretch="0,1">
1919
<item>
20-
<widget class="QLabel" name="label_2">
20+
<widget class="QLabel" name="icon">
2121
<property name="sizePolicy">
2222
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
2323
<horstretch>0</horstretch>
@@ -28,16 +28,15 @@
2828
<string/>
2929
</property>
3030
<property name="pixmap">
31-
<pixmap resource="resources/resources.qrc">:/icons/UpdateDuck.png</pixmap>
31+
<pixmap resource="resources/duckstation-qt.qrc">:/icons/UpdateDuck.png</pixmap>
3232
</property>
3333
</widget>
3434
</item>
3535
<item>
36-
<widget class="QLabel" name="label">
36+
<widget class="QLabel" name="updateLabel">
3737
<property name="font">
3838
<font>
3939
<pointsize>16</pointsize>
40-
<weight>75</weight>
4140
<bold>true</bold>
4241
</font>
4342
</property>
@@ -62,15 +61,22 @@
6261
</property>
6362
</widget>
6463
</item>
64+
<item>
65+
<widget class="QLabel" name="downloadSize">
66+
<property name="text">
67+
<string>Download Size:</string>
68+
</property>
69+
</widget>
70+
</item>
6571
<item>
6672
<widget class="QTextBrowser" name="updateNotes"/>
6773
</item>
6874
<item>
69-
<layout class="QHBoxLayout" name="horizontalLayout">
75+
<layout class="QHBoxLayout" name="actionButtons">
7076
<item>
71-
<spacer name="horizontalSpacer">
77+
<spacer name="buttonSpacer">
7278
<property name="orientation">
73-
<enum>Qt::Horizontal</enum>
79+
<enum>Qt::Orientation::Horizontal</enum>
7480
</property>
7581
<property name="sizeHint" stdset="0">
7682
<size>
@@ -112,7 +118,7 @@
112118
</layout>
113119
</widget>
114120
<resources>
115-
<include location="resources/resources.qrc"/>
121+
<include location="resources/duckstation-qt.qrc"/>
116122
</resources>
117123
<connections/>
118124
</ui>

0 commit comments

Comments
 (0)