diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-02-09 14:40:35 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-02-09 17:14:25 +0100 |
commit | a97602889753f596e9738104bc0f9b6ab424f7a7 (patch) | |
tree | 31008b27c0e73fc362848b3b66af673cc6721c68 /src/gui/updaterwindow.cpp | |
parent | b5e416f8cd52f69ff1edd832ee10bac550544ef6 (diff) | |
download | mana-a97602889753f596e9738104bc0f9b6ab424f7a7.tar.gz mana-a97602889753f596e9738104bc0f9b6ab424f7a7.tar.bz2 mana-a97602889753f596e9738104bc0f9b6ab424f7a7.tar.xz mana-a97602889753f596e9738104bc0f9b6ab424f7a7.zip |
Optimized BrowserBox
* Introduced a LayoutContext that conveniently allows for relayouting
all rows, or just a single one when it is added. BrowserBox::addRow
no longer relayouts all the rows.
* BrowserLink and LinePart are now merged into a new TextRow struct,
so they can be conveniently dropped when the row limit has been
reached.
* Removed "opaque" option, which was enabled by default but disabled
for all BrowserBox instances.
* Removed "always update" option, and instead start delaying relayouting
automatically when there are a lot of rows (> 100 currently).
* Update window now also has text wrapping enabled.
Closes #50
Diffstat (limited to 'src/gui/updaterwindow.cpp')
-rw-r--r-- | src/gui/updaterwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp index b26119e6..728b2464 100644 --- a/src/gui/updaterwindow.cpp +++ b/src/gui/updaterwindow.cpp @@ -131,7 +131,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, setMinWidth(320); setMinHeight(240); - mBrowserBox = new BrowserBox; + mBrowserBox = new BrowserBox(BrowserBox::AUTO_WRAP); mScrollArea = new ScrollArea(mBrowserBox); mLabel = new Label(_("Connecting...")); mProgressBar = new ProgressBar(0.0, 310, 20); @@ -139,7 +139,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, mPlayButton = new Button(_("Play"), "play", this); mProgressBar->setSmoothProgress(false); - mBrowserBox->setOpaque(false); + mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); mPlayButton->setEnabled(false); place(0, 0, mScrollArea, 5, 3).setPadding(3); |