diff --git a/src/lib/popupwindow/popupwindow.cpp b/src/lib/popupwindow/popupwindow.cpp index b031c7dcd..bc32cf79a 100644 --- a/src/lib/popupwindow/popupwindow.cpp +++ b/src/lib/popupwindow/popupwindow.cpp @@ -55,7 +55,6 @@ PopupWindow::PopupWindow(PopupWebView* view) m_menuBar = new QMenuBar(this); QMenu* menuFile = new QMenu(tr("File")); - menuFile->addAction(QIcon::fromTheme("document-save"), tr("&Save Page As..."), m_view, SLOT(savePageAs()))->setShortcut(QKeySequence("Ctrl+S")); menuFile->addAction(QIcon::fromTheme("mail-message-new"), tr("Send Link..."), m_view, SLOT(sendPageByMail())); //menuFile->addAction(QIcon::fromTheme("document-print"), tr("&Print..."), m_view, SLOT(printPage()))->setShortcut(QKeySequence("Ctrl+P")); menuFile->addSeparator(); diff --git a/src/lib/webengine/webinspector.cpp b/src/lib/webengine/webinspector.cpp index b641235bb..af322617a 100644 --- a/src/lib/webengine/webinspector.cpp +++ b/src/lib/webengine/webinspector.cpp @@ -89,19 +89,21 @@ void WebInspector::unregisterView(QWebEngineView *view) void WebInspector::loadFinished() { - // Update close button - page()->runJavaScript(QL1S("var toolbar = document.getElementsByClassName('inspector-view-toolbar')[1];" - "var button = document.createElement('button');" - "button.style.width = '22px';" - "button.style.height = '22px';" - "button.style.border = 'none';" - "button.style.cursor = 'pointer';" - "button.style.background = 'url(qrc:html/close.png) no-repeat';" - "button.style.backgroundPosition = 'center center';" - "button.addEventListener('click', function() {" - " window.close();" - "});" - "toolbar.appendChild(button);")); + // Show close button only when docked + if (!isWindow()) { + page()->runJavaScript(QL1S("var toolbar = document.getElementsByClassName('inspector-view-toolbar')[1];" + "var button = document.createElement('button');" + "button.style.width = '22px';" + "button.style.height = '22px';" + "button.style.border = 'none';" + "button.style.cursor = 'pointer';" + "button.style.background = 'url(qrc:html/close.png) no-repeat';" + "button.style.backgroundPosition = 'center center';" + "button.addEventListener('click', function() {" + " window.close();" + "});" + "toolbar.appendChild(button);")); + } // Inspect element if (m_inspectElement) {