diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df68f2a..6f5a144a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Bugfix: Fixed crashes that could occur when Lua functions errored with values other than strings. (#6441) - Bugfix: Fixed zero-width global BTTV emotes not showing in the `:~` completions. (#6440) -- Bugfix: Fixed an issue where the update button would be unclickable on macOS and Linux. (#6447) +- Bugfix: Fixed an issue where the update button would be unclickable on macOS and Linux. (#6447, #6453) - Bugfix: Fixed flickering tooltips on Wayland when the mouse cursor is over them. (#6451) ## 2.5.4-beta.1 diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index b5a945e9..0ee58877 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -801,7 +801,9 @@ void Notebook::performHorizontalLayout(const LayoutContext &ctx, bool animated) // set size of custom buttons (settings, user, ...) for (auto *btn : this->customButtons_) { - if (!btn->isVisible()) + // We use isHidden here since the layout can happen when the button has + // been added but before it's shown + if (btn->isHidden()) { continue; } @@ -925,7 +927,7 @@ void Notebook::performVerticalLayout(const LayoutContext &ctx, bool animated) btnIt != this->customButtons_.rend(); ++btnIt) { auto *btn = *btnIt; - if (!btn->isVisible()) + if (btn->isHidden()) { continue; } @@ -945,7 +947,7 @@ void Notebook::performVerticalLayout(const LayoutContext &ctx, bool animated) // set size of custom buttons (settings, user, ...) for (auto *btn : this->customButtons_) { - if (!btn->isVisible()) + if (btn->isHidden()) { continue; } @@ -1203,7 +1205,7 @@ size_t Notebook::visibleButtonCount() const size_t i = 0; for (auto *btn : this->customButtons_) { - if (btn->isVisible()) + if (!btn->isHidden()) { ++i; } @@ -1508,6 +1510,8 @@ void SplitNotebook::addCustomButtons() QObject::connect(getApp()->getStreamerMode(), &IStreamerMode::changed, this, &SplitNotebook::updateStreamerModeIcon); this->updateStreamerModeIcon(); + + this->performLayout(false); } void SplitNotebook::updateStreamerModeIcon() diff --git a/src/widgets/Notebook.hpp b/src/widgets/Notebook.hpp index d94488a9..40fd675a 100644 --- a/src/widgets/Notebook.hpp +++ b/src/widgets/Notebook.hpp @@ -138,7 +138,6 @@ protected: { auto *btn = new T(std::forward(args)..., this); this->customButtons_.push_back(btn); - this->performLayout(); return btn; }