Skip to content

refactor(notebook): merge top/bottom and left/right layout - #6215

Merged
pajlada merged 4 commits into
Chatterino:masterfrom
Nerixyz:refactor/tab-layout
May 18, 2025
Merged

pajlada merged 4 commits into
Chatterino:masterfrom
Nerixyz:refactor/tab-layout

Conversation

@Nerixyz

@Nerixyz Nerixyz commented May 17, 2025 •

Copy link
Copy Markdown
Contributor

Towards #6153.
Should make it easier to implement refactorings to notebook layout (and potentially fix the issues linked in #6153 (comment)).

Top/bottom and left/right layouts are almost the same, except for the direction. Unfortunately, they're not that similar, but we can still put them together and get the same result. The functions are named horizontal for left-to-right/right-to-left layout and vertical for top-to-bottom layout.

The easiest way to test this is to make screenshots and use the "difference" blend-mode in your favorite photo editor (tbf, all I did was diff the branches and insert an if where they differed). One small difference is that the custom buttons will show 1dip higher in the bottom layout. I don't think this is a major issue.

I sneaked in some static_casts in place of C-casts.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/widgets/Notebook.cpp
Comment thread src/widgets/Notebook.cpp
Comment thread src/widgets/Notebook.cpp
Comment thread src/widgets/Notebook.cpp
Comment thread src/widgets/Notebook.cpp
@Nerixyz

Nerixyz commented May 17, 2025

Copy link
Copy Markdown
Contributor Author

I could fix those, but I feel like it's better to do in another PR.

@pajlada
pajlada enabled auto-merge (squash) May 18, 2025 09:41
@pajlada
pajlada merged commit 67956ef into Chatterino:master May 18, 2025
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants