Fix tab wrapping with vertical tab layout (#4152)

This commit is contained in:
Daniel Sage 2022-11-15 02:45:10 -05:00 committed by GitHub
parent 8031f33b53
commit 90121ed756
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -82,7 +82,7 @@
- Minor: Improved text selection to match Windows native behaviour. (#4127) - Minor: Improved text selection to match Windows native behaviour. (#4127)
- Minor: Add settings tooltips. (#3437) - Minor: Add settings tooltips. (#3437)
- Minor: Add setting to limit message input length. (#3418) - 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: 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: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
- Bugfix: Fixed `Smooth scrolling on new messages` setting sometimes hiding messages. (#4028) - Bugfix: Fixed `Smooth scrolling on new messages` setting sometimes hiding messages. (#4028)

View file

@ -617,7 +617,7 @@ void Notebook::performLayout(bool animated)
// zneix: if we were to remove buttons when tabs are hidden // zneix: if we were to remove buttons when tabs are hidden
// stuff below to "set page bounds" part should be in conditional statement // 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 if (tabsPerColumn == 0) // window hasn't properly rendered yet
{ {
return; return;
@ -719,7 +719,7 @@ void Notebook::performLayout(bool animated)
// zneix: if we were to remove buttons when tabs are hidden // zneix: if we were to remove buttons when tabs are hidden
// stuff below to "set page bounds" part should be in conditional statement // 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 if (tabsPerColumn == 0) // window hasn't properly rendered yet
{ {
return; return;