1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Merge branch 'Falkon/3.0'

This commit is contained in:
David Rosca 2018-05-03 13:42:10 +02:00
commit 7fce81feaa
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 8 additions and 9 deletions

View File

@ -196,7 +196,6 @@ BrowserWindow::BrowserWindow(Qz::BrowserWindowType type, const QUrl &startUrl)
, m_startTab(0)
, m_startPage(0)
, m_sideBarManager(new SideBarManager(this))
, m_isHtmlFullScreen(false)
, m_hideNavigationTimer(0)
{
setAttribute(Qt::WA_DeleteOnClose);
@ -927,7 +926,7 @@ void BrowserWindow::toggleTabsOnTop(bool enable)
void BrowserWindow::toggleFullScreen()
{
if (m_isHtmlFullScreen) {
if (m_htmlFullScreenView) {
weView()->triggerPageAction(QWebEnginePage::ExitFullScreen);
return;
}
@ -939,7 +938,7 @@ void BrowserWindow::toggleFullScreen()
}
}
void BrowserWindow::toggleHtmlFullScreen(bool enable)
void BrowserWindow::requestHtmlFullScreen(TabbedWebView *view, bool enable)
{
if (enable) {
setWindowState(windowState() | Qt::WindowFullScreen);
@ -950,7 +949,7 @@ void BrowserWindow::toggleHtmlFullScreen(bool enable)
if (m_sideBar)
m_sideBar.data()->setHidden(enable);
m_isHtmlFullScreen = enable;
m_htmlFullScreenView = enable ? view : nullptr;
}
void BrowserWindow::showWebInspector()
@ -1183,7 +1182,7 @@ bool BrowserWindow::fullScreenNavigationVisible() const
void BrowserWindow::showNavigationWithFullScreen()
{
if (m_isHtmlFullScreen)
if (m_htmlFullScreenView)
return;
if (m_hideNavigationTimer->isActive()) {
@ -1242,7 +1241,7 @@ bool BrowserWindow::event(QEvent *event)
m_navigationContainer->show();
m_navigationToolbar->setSuperMenuVisible(!m_menuBarVisible);
m_navigationToolbar->leaveFullScreen();
m_isHtmlFullScreen = false;
m_htmlFullScreenView = nullptr;
}
if (m_hideNavigationTimer) {

View File

@ -153,7 +153,7 @@ public Q_SLOTS:
void toggleTabsOnTop(bool enable);
void toggleFullScreen();
void toggleHtmlFullScreen(bool enable);
void requestHtmlFullScreen(TabbedWebView *view, bool enable);
void loadActionUrl(QObject* obj = 0);
void loadActionUrlInNewTab(QObject* obj = 0);
@ -234,7 +234,7 @@ private:
// Remember visibility of menubar and statusbar after entering Fullscreen
bool m_menuBarVisible;
bool m_statusBarVisible;
bool m_isHtmlFullScreen;
QPointer<TabbedWebView> m_htmlFullScreenView;
QTimer* m_hideNavigationTimer;
QList<QPointer<QWidget> > m_deleteOnCloseWidgets;

View File

@ -172,7 +172,7 @@ void TabbedWebView::requestFullScreen(bool enable)
if (!m_window)
return;
m_window->toggleHtmlFullScreen(enable);
m_window->requestHtmlFullScreen(this, enable);
}
void TabbedWebView::setAsCurrentTab()