mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
WebInspector: Fix showing close button with Qt 5.10
It's not tested with Qt 5.9 but it should work there too.
This commit is contained in:
parent
53f6ef91ac
commit
a5e35bac75
@ -115,18 +115,11 @@ void WebInspector::loadFinished()
|
|||||||
{
|
{
|
||||||
// Show close button only when docked
|
// Show close button only when docked
|
||||||
if (!isWindow()) {
|
if (!isWindow()) {
|
||||||
page()->runJavaScript(QL1S("var toolbar = document.getElementsByClassName('inspector-view-toolbar')[1];"
|
page()->runJavaScript(QL1S("var button = Components.dockController._closeButton;"
|
||||||
"var button = document.createElement('button');"
|
"button.setVisible(true);"
|
||||||
"button.style.width = '22px';"
|
"button.element.onmouseup = function() {"
|
||||||
"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();"
|
" window.close();"
|
||||||
"});"
|
"};"));
|
||||||
"toolbar.appendChild(button);"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inspect element
|
// Inspect element
|
||||||
|
Loading…
Reference in New Issue
Block a user