mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 22:57:11 -05:00
use a new header key on qt5 to fix drawing bug
This commit is contained in:
parent
93414007b8
commit
e063123218
1 changed files with 7 additions and 2 deletions
|
|
@ -373,6 +373,11 @@ class Browser(QMainWindow):
|
|||
self.onSearch()
|
||||
self.show()
|
||||
|
||||
def _headerKey(self):
|
||||
if qtmajor >= 5:
|
||||
return "editor2"
|
||||
return "editor"
|
||||
|
||||
def setupToolbar(self):
|
||||
self.toolbarWeb = AnkiWebView()
|
||||
self.toolbarWeb.setFixedHeight(32 + self.mw.fontHeightDelta)
|
||||
|
|
@ -458,7 +463,7 @@ class Browser(QMainWindow):
|
|||
self.editor.setNote(None)
|
||||
saveGeom(self, "editor")
|
||||
saveState(self, "editor")
|
||||
saveHeader(self.form.tableView.horizontalHeader(), "editor")
|
||||
saveHeader(self.form.tableView.horizontalHeader(), self._headerKey())
|
||||
self.col.conf['activeCols'] = self.model.activeCols
|
||||
self.col.setMod()
|
||||
self.hide()
|
||||
|
|
@ -623,7 +628,7 @@ class Browser(QMainWindow):
|
|||
if not isWin:
|
||||
vh.hide()
|
||||
hh.show()
|
||||
restoreHeader(hh, "editor")
|
||||
restoreHeader(hh, self._headerKey())
|
||||
hh.setHighlightSections(False)
|
||||
hh.setMinimumSectionSize(50)
|
||||
hh.setMovable(True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue