mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
UI/Qt: Don't show URL when a new tab is initially focused
The URL is now not shown when a new tab is initially activated until the location bar loses focus. This allows the user to see the location bar placeholder text when opening a new tab. It also makes it easier to paste URLs into the location bar after opening a new tab.
This commit is contained in:
committed by
Andreas Kling
parent
7242fdcf23
commit
808784092c
@@ -648,8 +648,11 @@ Tab& BrowserWindow::create_new_tab(Web::HTML::ActivateTab activate_tab, Tab& par
|
||||
}
|
||||
|
||||
m_tabs_container->addTab(tab, "New Tab");
|
||||
if (activate_tab == Web::HTML::ActivateTab::Yes)
|
||||
if (activate_tab == Web::HTML::ActivateTab::Yes) {
|
||||
m_tabs_container->setCurrentWidget(tab);
|
||||
if (m_tabs_container->count() != 1)
|
||||
tab->set_url_is_hidden(true);
|
||||
}
|
||||
initialize_tab(tab);
|
||||
return *tab;
|
||||
}
|
||||
@@ -663,8 +666,11 @@ Tab& BrowserWindow::create_new_tab(Web::HTML::ActivateTab activate_tab)
|
||||
}
|
||||
|
||||
m_tabs_container->addTab(tab, "New Tab");
|
||||
if (activate_tab == Web::HTML::ActivateTab::Yes)
|
||||
if (activate_tab == Web::HTML::ActivateTab::Yes) {
|
||||
m_tabs_container->setCurrentWidget(tab);
|
||||
if (m_tabs_container->count() != 1)
|
||||
tab->set_url_is_hidden(true);
|
||||
}
|
||||
initialize_tab(tab);
|
||||
|
||||
return *tab;
|
||||
|
||||
Reference in New Issue
Block a user