mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
remove setupFonts(), disable syncing
This commit is contained in:
parent
1d75cff5e7
commit
a4cab1d8f2
2 changed files with 5 additions and 18 deletions
|
@ -77,8 +77,8 @@ class DataModel(QAbstractTableModel):
|
||||||
row = index.row()
|
row = index.row()
|
||||||
c = self.getCard(index)
|
c = self.getCard(index)
|
||||||
t = c.template()
|
t = c.template()
|
||||||
f.setFamily(t.get("bfont", self.browser.mw.fontFamily))
|
f.setFamily(t.get("bfont", "arial"))
|
||||||
f.setPixelSize(t.get("bsize", self.browser.mw.fontHeight))
|
f.setPixelSize(t.get("bsize", 12))
|
||||||
return f
|
return f
|
||||||
elif role == Qt.TextAlignmentRole:
|
elif role == Qt.TextAlignmentRole:
|
||||||
align = Qt.AlignVCenter
|
align = Qt.AlignVCenter
|
||||||
|
|
19
aqt/main.py
19
aqt/main.py
|
@ -66,7 +66,6 @@ class AnkiQt(QMainWindow):
|
||||||
self.setupAppMsg()
|
self.setupAppMsg()
|
||||||
self.setupKeys()
|
self.setupKeys()
|
||||||
self.setupThreads()
|
self.setupThreads()
|
||||||
self.setupFonts()
|
|
||||||
self.setupMainWindow()
|
self.setupMainWindow()
|
||||||
self.setupSystemSpecific()
|
self.setupSystemSpecific()
|
||||||
self.setupStyle()
|
self.setupStyle()
|
||||||
|
@ -575,6 +574,9 @@ title="%s" %s>%s</button>''' % (
|
||||||
if not auto or (self.pm.profile['syncKey'] and
|
if not auto or (self.pm.profile['syncKey'] and
|
||||||
self.pm.profile['autoSync'] and
|
self.pm.profile['autoSync'] and
|
||||||
not self.safeMode):
|
not self.safeMode):
|
||||||
|
tooltip("Syncing not yet implemented")
|
||||||
|
return
|
||||||
|
|
||||||
from aqt.sync import SyncManager
|
from aqt.sync import SyncManager
|
||||||
if not self.unloadCollection():
|
if not self.unloadCollection():
|
||||||
return
|
return
|
||||||
|
@ -1068,21 +1070,6 @@ will be lost. Continue?"""))
|
||||||
# System specific code
|
# System specific code
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
def setupFonts(self):
|
|
||||||
print("fixme: setupFonts()")
|
|
||||||
self.fontHeight = 12
|
|
||||||
self.fontFamily = "arial"
|
|
||||||
self.fontHeightDelta = 0
|
|
||||||
|
|
||||||
return
|
|
||||||
f = QFontInfo(self.font())
|
|
||||||
ws = QWebSettings.globalSettings()
|
|
||||||
self.fontHeight = f.pixelSize()
|
|
||||||
self.fontFamily = f.family()
|
|
||||||
self.fontHeightDelta = max(0, self.fontHeight - 13)
|
|
||||||
ws.setFontFamily(QWebSettings.StandardFont, self.fontFamily)
|
|
||||||
ws.setFontSize(QWebSettings.DefaultFontSize, self.fontHeight)
|
|
||||||
|
|
||||||
def setupSystemSpecific(self):
|
def setupSystemSpecific(self):
|
||||||
self.hideMenuAccels = False
|
self.hideMenuAccels = False
|
||||||
if isMac:
|
if isMac:
|
||||||
|
|
Loading…
Reference in a new issue