1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

Hide sidebar when a web element goes to full screen.

- Closes #2423
This commit is contained in:
srazi 2017-08-23 14:02:26 +04:30
parent 79345645a8
commit a78b595569
3 changed files with 13 additions and 9 deletions

View File

@ -800,10 +800,17 @@ void BrowserWindow::toggleFullScreen()
showFullScreen();
}
void BrowserWindow::enterHtmlFullScreen()
void BrowserWindow::toggleHtmlFullScreen(bool enable)
{
showFullScreen();
m_isHtmlFullScreen = true;
if (enable)
showFullScreen();
else
showNormal();
if (m_sideBar)
m_sideBar.data()->setHidden(enable);
m_isHtmlFullScreen = enable;
}
void BrowserWindow::showWebInspector()

View File

@ -131,7 +131,7 @@ public slots:
void toggleTabsOnTop(bool enable);
void toggleFullScreen();
void enterHtmlFullScreen();
void toggleHtmlFullScreen(bool enable);
void loadActionUrl(QObject* obj = 0);
void loadActionUrlInNewTab(QObject* obj = 0);

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -182,10 +182,7 @@ void TabbedWebView::requestFullScreen(bool enable)
if (!m_window)
return;
if (enable)
m_window->enterHtmlFullScreen();
else
m_window->showNormal();
m_window->toggleHtmlFullScreen(enable);
}
void TabbedWebView::setAsCurrentTab()