mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
don't set fixed width if stats not available
This commit is contained in:
parent
49178bd6ae
commit
09e8fe8e33
1 changed files with 5 additions and 2 deletions
|
@ -1402,8 +1402,10 @@ day = :d""", d=yesterday)
|
||||||
<tr><td>%(ntot_header)s</td><td align=right>%(newof)s</td></tr>
|
<tr><td>%(ntot_header)s</td><td align=right>%(newof)s</td></tr>
|
||||||
</table>""") % h
|
</table>""") % h
|
||||||
if (not dyest and not dtoday) or not self.config['showStudyStats']:
|
if (not dyest and not dtoday) or not self.config['showStudyStats']:
|
||||||
|
self.haveYesterday = False
|
||||||
stats1 = ""
|
stats1 = ""
|
||||||
else:
|
else:
|
||||||
|
self.haveYesterday = True
|
||||||
stats1 = (
|
stats1 = (
|
||||||
"<td>%s</td><td> </td>" % stats1)
|
"<td>%s</td><td> </td>" % stats1)
|
||||||
self.mainWin.optionsLabel.setText(top + """\
|
self.mainWin.optionsLabel.setText(top + """\
|
||||||
|
@ -1448,8 +1450,9 @@ learnt today")
|
||||||
self.mainWin.startReviewingButton.setFocus()
|
self.mainWin.startReviewingButton.setFocus()
|
||||||
self.setupStudyOptions()
|
self.setupStudyOptions()
|
||||||
self.mainWin.studyOptionsFrame.show()
|
self.mainWin.studyOptionsFrame.show()
|
||||||
self.mainWin.studyOptionsFrame.setFixedWidth(
|
if self.haveYesterday:
|
||||||
self.mainWin.optionsLabel.sizeHint().width() + 50)
|
size = self.mainWin.optionsLabel.sizeHint().width() + 50
|
||||||
|
self.mainWin.studyOptionsFrame.setFixedWidth(size)
|
||||||
|
|
||||||
def setupStudyOptions(self):
|
def setupStudyOptions(self):
|
||||||
self.mainWin.newPerDay.setText(str(self.deck.newCardsPerDay))
|
self.mainWin.newPerDay.setText(str(self.deck.newCardsPerDay))
|
||||||
|
|
Loading…
Reference in a new issue