From 90121ed75659a407344fbc8a4ff69af5bfe7fc4c Mon Sep 17 00:00:00 2001 From: Daniel Sage <24928223+dnsge@users.noreply.github.com> Date: Tue, 15 Nov 2022 02:45:10 -0500 Subject: [PATCH] Fix tab wrapping with vertical tab layout (#4152) --- CHANGELOG.md | 2 +- src/widgets/Notebook.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e70b6f81..b13539648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,7 +82,7 @@ - Minor: Improved text selection to match Windows native behaviour. (#4127) - Minor: Add settings tooltips. (#3437) - Minor: Add setting to limit message input length. (#3418) -- Minor: Improved look of tabs when using a layout other than top. (#3925) +- Minor: Improved look of tabs when using a layout other than top. (#3925, #4152) - Bugfix: Fixed `Add new account` dialog causing main chatterino window to be non movable. (#4121) - Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716) - Bugfix: Fixed `Smooth scrolling on new messages` setting sometimes hiding messages. (#4028) diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index df8ef5dea..ecd7e09fc 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -617,7 +617,7 @@ void Notebook::performLayout(bool animated) // zneix: if we were to remove buttons when tabs are hidden // stuff below to "set page bounds" part should be in conditional statement - int tabsPerColumn = (this->height() - top) / tabHeight; + int tabsPerColumn = (this->height() - top) / (tabHeight + tabSpacer); if (tabsPerColumn == 0) // window hasn't properly rendered yet { return; @@ -719,7 +719,7 @@ void Notebook::performLayout(bool animated) // zneix: if we were to remove buttons when tabs are hidden // stuff below to "set page bounds" part should be in conditional statement - int tabsPerColumn = (this->height() - top) / tabHeight; + int tabsPerColumn = (this->height() - top) / (tabHeight + tabSpacer); if (tabsPerColumn == 0) // window hasn't properly rendered yet { return;