mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 16:58:58 +00:00
UI/Qt: Place the "reset zoom" button to the left of the hamburger menu
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
It feels a bit awkward having this button displace the menu.
This commit is contained in:
parent
9684e6dbc5
commit
4a5c374084
Notes:
github-actions[bot]
2025-09-11 18:24:46 +00:00
Author: https://github.com/trflynn89
Commit: 4a5c374084
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6062
1 changed files with 3 additions and 3 deletions
|
@ -99,9 +99,11 @@ Tab::Tab(BrowserWindow* window, RefPtr<WebView::WebContentClient> parent_client,
|
||||||
m_toolbar->addAction(m_navigate_forward_action);
|
m_toolbar->addAction(m_navigate_forward_action);
|
||||||
m_toolbar->addAction(m_reload_action);
|
m_toolbar->addAction(m_reload_action);
|
||||||
m_toolbar->addWidget(m_location_edit);
|
m_toolbar->addWidget(m_location_edit);
|
||||||
m_toolbar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
m_toolbar->addAction(create_application_action(*m_toolbar, view().reset_zoom_action()));
|
||||||
m_hamburger_button_action = m_toolbar->addWidget(m_hamburger_button);
|
m_hamburger_button_action = m_toolbar->addWidget(m_hamburger_button);
|
||||||
|
|
||||||
m_toolbar->setIconSize({ 16, 16 });
|
m_toolbar->setIconSize({ 16, 16 });
|
||||||
|
m_toolbar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||||
// This is a little awkward, but without this Qt shrinks the button to the size of the icon.
|
// This is a little awkward, but without this Qt shrinks the button to the size of the icon.
|
||||||
// Note: toolButtonStyle="0" -> ToolButtonIconOnly.
|
// Note: toolButtonStyle="0" -> ToolButtonIconOnly.
|
||||||
m_toolbar->setStyleSheet("QToolButton[toolButtonStyle=\"0\"]{width:24px;height:24px}");
|
m_toolbar->setStyleSheet("QToolButton[toolButtonStyle=\"0\"]{width:24px;height:24px}");
|
||||||
|
@ -112,8 +114,6 @@ Tab::Tab(BrowserWindow* window, RefPtr<WebView::WebContentClient> parent_client,
|
||||||
m_hamburger_button_action->setVisible(!show_menubar);
|
m_hamburger_button_action->setVisible(!show_menubar);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_toolbar->addAction(create_application_action(*m_toolbar, view().reset_zoom_action()));
|
|
||||||
|
|
||||||
view().on_activate_tab = [this] {
|
view().on_activate_tab = [this] {
|
||||||
m_window->activate_tab(tab_index());
|
m_window->activate_tab(tab_index());
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue