From f1f06b0a19c633b23bd4cf1fceb451ca256a683f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 26 May 2014 12:00:45 +0200 Subject: [PATCH] Use a splitter for the webinspector --- qutebrowser/widgets/mainwindow.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/qutebrowser/widgets/mainwindow.py b/qutebrowser/widgets/mainwindow.py index 3e0c1c5d6..8e2c2822b 100644 --- a/qutebrowser/widgets/mainwindow.py +++ b/qutebrowser/widgets/mainwindow.py @@ -20,8 +20,8 @@ import binascii from base64 import b64decode -from PyQt5.QtCore import pyqtSlot, QRect, QPoint, QCoreApplication -from PyQt5.QtWidgets import QWidget, QVBoxLayout +from PyQt5.QtCore import pyqtSlot, QRect, QPoint, QCoreApplication, Qt +from PyQt5.QtWidgets import QWidget, QVBoxLayout, QSplitter from PyQt5.QtWebKitWidgets import QWebInspector import qutebrowser.commands.utils as cmdutils @@ -68,13 +68,18 @@ class MainWindow(QWidget): self._vbox.setContentsMargins(0, 0, 0, 0) self._vbox.setSpacing(0) + self._splitter = QSplitter(self, orientation=Qt.Vertical) + self.tabs = TabbedBrowser() - self._vbox.addWidget(self.tabs) + self._splitter.addWidget(self.tabs) self.completion = CompletionView(self) self.inspector = QWebInspector() self.inspector.hide() - self._vbox.addWidget(self.inspector) + self._splitter.addWidget(self.inspector) + self._splitter.setStretchFactor(0, 50) + + self._vbox.addWidget(self._splitter) self.status = StatusBar() self._vbox.addWidget(self.status)