Set tab width to 4 spaces

setTabStopWidth is deprecated, and setTabStopDistance is preferred
It's not entirely accurate however, which you can see
when you compare 10 tabs and 40 spaces
This commit is contained in:
BlueGreenMagick 2020-04-29 10:13:16 +09:00
parent 00cf4fc585
commit be6a5e2f13

View file

@ -307,9 +307,10 @@ Please create a new card type first."""
self.tform.front.setAcceptRichText(False)
self.tform.css.setAcceptRichText(False)
self.tform.back.setAcceptRichText(False)
self.tform.front.setTabStopWidth(30)
self.tform.css.setTabStopWidth(30)
self.tform.back.setTabStopWidth(30)
tab_width = self.fontMetrics().width(" " * 4)
self.tform.front.setTabStopDistance(tab_width)
self.tform.css.setTabStopDistance(tab_width)
self.tform.back.setTabStopDistance(tab_width)
self.redrawing = False
def saveCard(self):