summaryrefslogtreecommitdiff
path: root/src/gui/windows/updaterwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-19 20:53:01 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-19 20:53:01 +0300
commit038270a1d6519237a13a8699582660ed0db04b6d (patch)
tree98f27cf43065fa99bfa6328de38b23140c67eb24 /src/gui/windows/updaterwindow.cpp
parent008c5d7674f5f5ba8d0d993956628752116a1daa (diff)
downloadplus-038270a1d6519237a13a8699582660ed0db04b6d.tar.gz
plus-038270a1d6519237a13a8699582660ed0db04b6d.tar.bz2
plus-038270a1d6519237a13a8699582660ed0db04b6d.tar.xz
plus-038270a1d6519237a13a8699582660ed0db04b6d.zip
Use staticbrowserbox in updaterwindow.
Diffstat (limited to 'src/gui/windows/updaterwindow.cpp')
-rw-r--r--src/gui/windows/updaterwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 10d9c9890..86045c62d 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -35,7 +35,6 @@
#include "fs/virtfs/fs.h"
-#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
#include "gui/widgets/containerplacer.h"
#include "gui/widgets/itemlinkhandler.h"
@@ -43,6 +42,7 @@
#include "gui/widgets/layout.h"
#include "gui/widgets/progressbar.h"
#include "gui/widgets/scrollarea.h"
+#include "gui/widgets/staticbrowserbox.h"
#include "net/download.h"
#include "net/updatetypeoperators.h"
@@ -195,7 +195,7 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
mProgressBar(new ProgressBar(this, 0.0, 310, 0,
ProgressColorId::PROG_UPDATE,
"updateprogressbar.xml", "updateprogressbar_fill.xml")),
- mBrowserBox(new BrowserBox(this, BrowserBoxMode::AUTO_SIZE, Opaque_true,
+ mBrowserBox(new StaticBrowserBox(this, Opaque_true,
"browserbox.xml")),
mScrollArea(new ScrollArea(this, mBrowserBox,
Opaque_true, "update_background.xml")),
@@ -422,6 +422,7 @@ void UpdaterWindow::loadNews()
mMemoryBuffer = nullptr;
mDownloadedBytes = 0;
+ mBrowserBox->updateHeight();
mScrollArea->setVerticalScrollAmount(0);
}
@@ -491,6 +492,7 @@ void UpdaterWindow::loadPatch()
mMemoryBuffer = nullptr;
mDownloadedBytes = 0;
+ mBrowserBox->updateHeight();
mScrollArea->setVerticalScrollAmount(0);
}
@@ -862,6 +864,7 @@ void UpdaterWindow::logic()
mBrowserBox->addRow(_("##1 you try again later."));
if (mDownload != nullptr)
mBrowserBox->addRow(mDownload->getError());
+ mBrowserBox->updateHeight();
mScrollArea->setVerticalScrollAmount(
mScrollArea->getVerticalMaxScroll());
mDownloadStatus = UpdateDownloadStatus::UPDATE_COMPLETE;
@@ -1092,6 +1095,7 @@ void UpdaterWindow::loadFile(std::string file)
for (size_t i = 0, sz = lines.size(); i < sz; ++i)
mBrowserBox->addRow(lines[i]);
+ mBrowserBox->updateHeight();
}
void UpdaterWindow::loadMods(const std::string &dir,