mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -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.onSearch()
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
|
def _headerKey(self):
|
||||||
|
if qtmajor >= 5:
|
||||||
|
return "editor2"
|
||||||
|
return "editor"
|
||||||
|
|
||||||
def setupToolbar(self):
|
def setupToolbar(self):
|
||||||
self.toolbarWeb = AnkiWebView()
|
self.toolbarWeb = AnkiWebView()
|
||||||
self.toolbarWeb.setFixedHeight(32 + self.mw.fontHeightDelta)
|
self.toolbarWeb.setFixedHeight(32 + self.mw.fontHeightDelta)
|
||||||
|
|
@ -458,7 +463,7 @@ class Browser(QMainWindow):
|
||||||
self.editor.setNote(None)
|
self.editor.setNote(None)
|
||||||
saveGeom(self, "editor")
|
saveGeom(self, "editor")
|
||||||
saveState(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.conf['activeCols'] = self.model.activeCols
|
||||||
self.col.setMod()
|
self.col.setMod()
|
||||||
self.hide()
|
self.hide()
|
||||||
|
|
@ -623,7 +628,7 @@ class Browser(QMainWindow):
|
||||||
if not isWin:
|
if not isWin:
|
||||||
vh.hide()
|
vh.hide()
|
||||||
hh.show()
|
hh.show()
|
||||||
restoreHeader(hh, "editor")
|
restoreHeader(hh, self._headerKey())
|
||||||
hh.setHighlightSections(False)
|
hh.setHighlightSections(False)
|
||||||
hh.setMinimumSectionSize(50)
|
hh.setMinimumSectionSize(50)
|
||||||
hh.setMovable(True)
|
hh.setMovable(True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue