Skip to content

feat: Add quick tabs controls to toolbar#1007

Merged
dail8859 merged 7 commits intodail8859:masterfrom
ok-developer:feat/inline-ctrl-buttons
May 5, 2026
Merged

feat: Add quick tabs controls to toolbar#1007
dail8859 merged 7 commits intodail8859:masterfrom
ok-developer:feat/inline-ctrl-buttons

Conversation

@ok-developer
Copy link
Copy Markdown
Contributor

@ok-developer ok-developer commented Apr 18, 2026

Description

Added quick actions for tabs manipulation: add new, list existed and close current. Same as in Notepad++.

Screenshot_20260418_224317 Screenshot_20260418_224458 Screenshot_20260418_225859

Technical Details

  • Uses all existed actions: MainWindow::newFile(), MainWindow::closeCurrentFile() and tabs listing nearly same workflow from CDockAreaTitleBar::onTabsMenuAboutToShow();
  • Buttons visibility options for future customization(if else);
  • 3 extra icons added from Lucide community;
  • Tabs listing button disabled in DockManager via config flag.

@dail8859
Copy link
Copy Markdown
Owner

Hi @ok-developer! Thanks for this PR.

Personally, I've never been a fan of having these options in Notepad++ since there's other ways to do most of this behavior, however I know many other people find it useful, and this code really just reuses mostly existing logic and keeps everything self-contained. Plus it can be configurable later.

So my first few initial asks are:

  1. Remove the use of TabsQuickActionsBar::Private as nothing else in the code base uses a private struct since there's no intention to expose these classes externally and needing to keep a stable ABI.
  2. I'd just ask to try to keep the formatting similar to the existing code. This mostly a failure on my part as I have no clear guidance or tools to enforce a particular style, but for now just use the existing code and keep it fairly similar.
  3. Also, I think for any active editors I'd request making the QAction text bold rather than just pretending it with "> " so that it is more visual distinct.

But overall I think the implementation makes sense keeping nearly everything to that single TabsQuickActionsBar and the icons are clean and simple.

The other thing I always wrestle with is where to put the 'glue' logic. Right now, the MainWindow knows about TabsQuickActionsBar implementation but in theory the main window could be passed into the TabsQuickActionsBar constructor and let that do all the connecting...I'm fine with the current implementation though...just a thought.

- icons size adjusted to style.
@ok-developer ok-developer marked this pull request as draft May 3, 2026 22:19
@ok-developer
Copy link
Copy Markdown
Contributor Author

@dail8859, You're right: it's a small improvement, but the layout of these buttons is already stuck in muscle memory. The first time, I was even a bit confused when I didn't find them)

Updated.

image

@ok-developer ok-developer marked this pull request as ready for review May 3, 2026 22:53
@dail8859 dail8859 merged commit 24dacc1 into dail8859:master May 5, 2026
12 checks passed
@dail8859
Copy link
Copy Markdown
Owner

dail8859 commented May 5, 2026

Overall looks good. I cleaned it up a bit but kept all the functionality.

Thanks for the PR!

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