Make inspector detachable.
This commit is contained in:
parent
8eed5a02d4
commit
ee241c3f6c
3
TODO
3
TODO
@ -64,8 +64,6 @@ Improvements / minor features
|
|||||||
- Display metavars for commands in input bar.
|
- Display metavars for commands in input bar.
|
||||||
- count support for special keys
|
- count support for special keys
|
||||||
- set-as-default argument/command
|
- set-as-default argument/command
|
||||||
- Make inspector height resizable
|
|
||||||
- Make inspector detachable (own window)
|
|
||||||
- Enable disk caching
|
- Enable disk caching
|
||||||
QNetworkManager.setCache() and use a QNetworkDiskCache probably
|
QNetworkManager.setCache() and use a QNetworkDiskCache probably
|
||||||
- clear cookies command
|
- clear cookies command
|
||||||
@ -80,7 +78,6 @@ Improvements / minor features
|
|||||||
elem = frame.findFirstElement('*:focus')
|
elem = frame.findFirstElement('*:focus')
|
||||||
- somehow unfocus elements (hide blinking cursor) when insert mode is left?
|
- somehow unfocus elements (hide blinking cursor) when insert mode is left?
|
||||||
- tabs: some more padding?
|
- tabs: some more padding?
|
||||||
- Make it possible to open inspector in a new window.
|
|
||||||
- Copy link location on crash mail should not copy mailto:
|
- Copy link location on crash mail should not copy mailto:
|
||||||
- Drag&Drop of tabs to other windows
|
- Drag&Drop of tabs to other windows
|
||||||
- Use QNetworkAccessManager per QWebPage again so we can set proxy per tab.
|
- Use QNetworkAccessManager per QWebPage again so we can set proxy per tab.
|
||||||
|
@ -214,6 +214,10 @@ DATA = OrderedDict([
|
|||||||
('message-timeout',
|
('message-timeout',
|
||||||
SettingValue(types.Int(), '2000'),
|
SettingValue(types.Int(), '2000'),
|
||||||
"Time (in ms) to show messages in the statusbar for."),
|
"Time (in ms) to show messages in the statusbar for."),
|
||||||
|
|
||||||
|
('detach-inspector',
|
||||||
|
SettingValue(types.Bool(), 'false'),
|
||||||
|
"Whether to show the webinspector as own window."),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
('network', sect.KeyValue(
|
('network', sect.KeyValue(
|
||||||
|
@ -76,8 +76,10 @@ class MainWindow(QWidget):
|
|||||||
self.completion = CompletionView(self)
|
self.completion = CompletionView(self)
|
||||||
self.inspector = QWebInspector()
|
self.inspector = QWebInspector()
|
||||||
self.inspector.hide()
|
self.inspector.hide()
|
||||||
self._splitter.addWidget(self.inspector)
|
|
||||||
self._splitter.setStretchFactor(0, 50)
|
if not config.get('ui', 'detach-inspector'):
|
||||||
|
self._splitter.addWidget(self.inspector)
|
||||||
|
self._splitter.setStretchFactor(0, 50)
|
||||||
|
|
||||||
self._vbox.addWidget(self._splitter)
|
self._vbox.addWidget(self._splitter)
|
||||||
|
|
||||||
@ -97,6 +99,16 @@ class MainWindow(QWidget):
|
|||||||
"""Resize completion if config changed."""
|
"""Resize completion if config changed."""
|
||||||
if section == 'completion' and option == 'height':
|
if section == 'completion' and option == 'height':
|
||||||
self.resize_completion()
|
self.resize_completion()
|
||||||
|
if section == 'ui' and option == 'detach-inspector':
|
||||||
|
detach = config.get('ui', 'detach-inspector')
|
||||||
|
if detach and self.inspector.parent() is not None:
|
||||||
|
shown = self.inspector.isVisible()
|
||||||
|
self.inspector.setParent(None)
|
||||||
|
if shown:
|
||||||
|
self.inspector.show()
|
||||||
|
elif not detach and self.inspector.parent() is None:
|
||||||
|
self._splitter.addWidget(self.inspector)
|
||||||
|
self._splitter.setStretchFactor(0, 50)
|
||||||
|
|
||||||
def resize_completion(self):
|
def resize_completion(self):
|
||||||
"""Adjust completion according to config."""
|
"""Adjust completion according to config."""
|
||||||
|
Loading…
Reference in New Issue
Block a user