Use the size hint for initial size

This commit is contained in:
Kovid Goyal 2020-10-26 14:01:39 +05:30
parent 0c6baca2d1
commit c7a81cd379
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ class WebView(QWebEngineView): # {{{
self.setUrl(QUrl.fromLocalFile(path)) self.setUrl(QUrl.fromLocalFile(path))
def sizeHint(self): def sizeHint(self):
return QSize(1500, 300) return QSize(300, 300)
def contextMenuEvent(self, ev): def contextMenuEvent(self, ev):
pass pass

View File

@ -1023,7 +1023,7 @@ class TOCEditor(QDialog): # {{{
self.explode_done.connect(self.read_toc, type=Qt.QueuedConnection) self.explode_done.connect(self.read_toc, type=Qt.QueuedConnection)
self.writing_done.connect(self.really_accept, type=Qt.QueuedConnection) self.writing_done.connect(self.really_accept, type=Qt.QueuedConnection)
self.resize(950, 630) self.resize(self.sizeHint())
geom = self.prefs.get('toc_editor_window_geom', None) geom = self.prefs.get('toc_editor_window_geom', None)
if geom is not None: if geom is not None:
QApplication.instance().safe_restore_geometry(self, bytes(geom)) QApplication.instance().safe_restore_geometry(self, bytes(geom))