-
-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI/Qt: Move New Tab button in tab bar #629
Conversation
Ladybird/Qt/BrowserWindow.h
Outdated
@@ -212,6 +214,7 @@ public slots: | |||
StringView m_webdriver_content_ipc_path; | |||
|
|||
bool m_allow_popups { false }; | |||
QToolBar* m_new_tab_button_toolbar { nullptr }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of an awkward place to put this, it is up to you, but maybe it could be closer m_zoom_menu
like so?
QMenu* m_zoom_menu { nullptr };
QToolBar* m_new_tab_button_toolbar { nullptr };
QMenu* m_hamburger_menu { nullptr };
Also, the button disappearing given too many tabs is a bit odd. Could the TabWidget width be limited so that it always leaves room for it? Otherwise pretty cool
I've not investigated why this happens, but the New Tab button isn't visible when the menu bar is shown (via View -> Show Menubar). |
aaccba8
to
6155944
Compare
Thanks! This resolves my comment. |
6155944
to
d0934d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Let's get this in tree and let folks iterate on it if there's any other edge cases.
Uses the tab bar's width to determine the location of the button. The button is hidden if the window is small enough
This is in reference to #252
QToolBar with a single action is used instead of just a QToolButton, there is an issue where the button is completely black when just using a button. If that is resolved, it could be used instead.