From cba7f32666efc82a2c14d7c134bf71264c38d8c1 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 24 Dec 2018 20:58:05 +0100 Subject: [PATCH] WebTab: Fix size of web inspector in splitter BUG: 397596 FIXED-IN: 3.1.0 --- src/lib/webengine/webinspector.h | 3 ++- src/lib/webtab/webtab.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/webengine/webinspector.h b/src/lib/webengine/webinspector.h index 40c5ec477..830415c46 100644 --- a/src/lib/webengine/webinspector.h +++ b/src/lib/webengine/webinspector.h @@ -34,6 +34,8 @@ public: void setView(WebView *view); void inspectElement(); + QSize sizeHint() const override; + static bool isEnabled(); static void pushView(QWebEngineView *view); static void registerView(QWebEngineView *view); @@ -43,7 +45,6 @@ private Q_SLOTS: void loadFinished(); private: - QSize sizeHint() const override; void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; diff --git a/src/lib/webtab/webtab.cpp b/src/lib/webtab/webtab.cpp index 47357bed1..9a3e0e87a 100644 --- a/src/lib/webtab/webtab.cpp +++ b/src/lib/webtab/webtab.cpp @@ -226,7 +226,9 @@ void WebTab::showWebInspector(bool inspectElement) if (inspectElement) inspector->inspectElement(); + const int height = inspector->sizeHint().height(); m_splitter->addWidget(inspector); + m_splitter->setSizes({m_splitter->height() - height, height}); } void WebTab::toggleWebInspector()