Skip to content

Commit

Permalink
UI rearrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
rpearl committed Feb 19, 2017
1 parent 7dc03cc commit 434111f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions catchup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,16 @@ def __init__(self):
self.add_empty()
self.ctl_unsuspend_query = self.add_labeled_widget("Unsuspend filter", QLineEdit())
self.ctl_numdays = self.add_labeled_widget("Number of days to unsuspend", QSpinBox(), small=True)
self.add_empty()
self.ctl_show_stats = self.add_labeled_widget('Show stats', QCheckBox())

settings_apply = QDialogButtonBox(QDialogButtonBox.Save | QDialogButtonBox.Cancel)
self.add_widget(settings_apply, left=False)
settings_apply.accepted.connect(self.on_accept)
settings_apply.rejected.connect(self.on_reject)
self.ctl_save = self.add_widget(QPushButton("Save settings"), small=True)
self.ctl_cancel = self.add_widget(QPushButton("Undo"), small=True)

self.ctl_save.clicked.connect(self.on_accept)
self.ctl_cancel.clicked.connect(self.on_reject)

self.add_rule()
self.stats_label = self.add_label("Stats")
self.ctl_show_stats = self.add_labeled_widget('Show stats', QCheckBox())

self.days_behind_label = QLabel("Days behind")
self.cards_behind_label = QLabel("Cards behind")
Expand All @@ -255,14 +255,17 @@ def __init__(self):
self.add_label("Actions")
self.ctl_suspend = self.add_widget(QPushButton("Suspend overdue cards"), small=True)
self.ctl_unsuspend = self.add_widget(QPushButton("Unsuspend earliest cards"), small=True)
self.ctl_unsuspend_new = self.add_widget(QPushButton("Unsuspend new/learning cards"), small=True)
self.ctl_unsuspend_new = self.add_widget(QPushButton("Unsuspend new/learn cards"), small=True)

self.ctl_suspend.clicked.connect(self.do_suspend)
self.ctl_unsuspend.clicked.connect(self.do_unsuspend)
self.ctl_unsuspend_new.clicked.connect(self.do_unsuspend_new)

self.add_rule()
self.add_widget(QLabel('Check the README for instructions and examples'))
self.ctl_close = self.add_widget(QPushButton("Close"), small=True)
self.ctl_close.clicked.connect(self.close)
self.ctl_close.setDefault(True)


layout_main = QVBoxLayout()
Expand Down

0 comments on commit 434111f

Please sign in to comment.