summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp7
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp2
4 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index a4f6de473..486ad9ebd 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -887,6 +887,13 @@ void BrowserBox::updateHeight()
}
}
+void BrowserBox::updateSize(const bool always)
+{
+ if (always)
+ mUpdateTime = 0;
+ updateHeight();
+}
+
std::string BrowserBox::getTextAtPos(const int x, const int y) const
{
int textX = 0;
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index a80729cb5..60635c8de 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -117,6 +117,8 @@ class BrowserBox final : public Widget,
void updateHeight();
+ void updateSize(const bool always);
+
typedef std::list<std::string> TextRows;
TextRows &getRows() noexcept2 A_WARN_UNUSED
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 1f61b25c9..a1111b7ae 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -119,7 +119,7 @@ void Desktop::reloadWallpaper()
void Desktop::widgetResized(const Event &event A_UNUSED)
{
mVersionLabel->setSize(getWidth(), getHeight());
- mVersionLabel->updateHeight();
+ mVersionLabel->updateSize(true);
setBestFittingWallpaper();
}
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index d311ea83f..91df77ded 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -94,7 +94,7 @@ ChatTab::ChatTab(const Widget2 *const widget,
if (chatWindow != nullptr)
chatWindow->addTab(this);
- mTextOutput->updateHeight();
+ mTextOutput->updateSize(true);
}
ChatTab::~ChatTab()