fix: notebook custom button resizing/layout (#6453)
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -138,7 +138,6 @@ protected:
|
||||
{
|
||||
auto *btn = new T(std::forward<decltype(args)>(args)..., this);
|
||||
this->customButtons_.push_back(btn);
|
||||
this->performLayout();
|
||||
|
||||
return btn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user