mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
WebTab: Fix size of web inspector in splitter
BUG: 397596 FIXED-IN: 3.1.0
This commit is contained in:
parent
47f2a1697c
commit
cba7f32666
|
@ -34,6 +34,8 @@ public:
|
||||||
void setView(WebView *view);
|
void setView(WebView *view);
|
||||||
void inspectElement();
|
void inspectElement();
|
||||||
|
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
static bool isEnabled();
|
static bool isEnabled();
|
||||||
static void pushView(QWebEngineView *view);
|
static void pushView(QWebEngineView *view);
|
||||||
static void registerView(QWebEngineView *view);
|
static void registerView(QWebEngineView *view);
|
||||||
|
@ -43,7 +45,6 @@ private Q_SLOTS:
|
||||||
void loadFinished();
|
void loadFinished();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSize sizeHint() const override;
|
|
||||||
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
|
void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
|
||||||
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
|
void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,9 @@ void WebTab::showWebInspector(bool inspectElement)
|
||||||
if (inspectElement)
|
if (inspectElement)
|
||||||
inspector->inspectElement();
|
inspector->inspectElement();
|
||||||
|
|
||||||
|
const int height = inspector->sizeHint().height();
|
||||||
m_splitter->addWidget(inspector);
|
m_splitter->addWidget(inspector);
|
||||||
|
m_splitter->setSizes({m_splitter->height() - height, height});
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebTab::toggleWebInspector()
|
void WebTab::toggleWebInspector()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user