More fixes for shortcuts, move Rekey button to bottom of settings
This commit is contained in:
parent
b71e7ea1e3
commit
329e016f8d
4 changed files with 16 additions and 10 deletions
|
|
@ -210,14 +210,14 @@ class MainWindow(QMainWindow):
|
||||||
# Navigate menu with next/previous/today
|
# Navigate menu with next/previous/today
|
||||||
nav_menu = mb.addMenu("&Navigate")
|
nav_menu = mb.addMenu("&Navigate")
|
||||||
act_prev = QAction("Previous Day", self)
|
act_prev = QAction("Previous Day", self)
|
||||||
act_prev.setShortcut("Ctrl+<")
|
act_prev.setShortcut("Ctrl+P")
|
||||||
act_prev.setShortcutContext(Qt.ApplicationShortcut)
|
act_prev.setShortcutContext(Qt.ApplicationShortcut)
|
||||||
act_prev.triggered.connect(lambda: self._adjust_day(-1))
|
act_prev.triggered.connect(lambda: self._adjust_day(-1))
|
||||||
nav_menu.addAction(act_prev)
|
nav_menu.addAction(act_prev)
|
||||||
self.addAction(act_prev)
|
self.addAction(act_prev)
|
||||||
|
|
||||||
act_next = QAction("Next Day", self)
|
act_next = QAction("Next Day", self)
|
||||||
act_next.setShortcut("Ctrl+>")
|
act_next.setShortcut("Ctrl+N")
|
||||||
act_next.setShortcutContext(Qt.ApplicationShortcut)
|
act_next.setShortcutContext(Qt.ApplicationShortcut)
|
||||||
act_next.triggered.connect(lambda: self._adjust_day(1))
|
act_next.triggered.connect(lambda: self._adjust_day(1))
|
||||||
nav_menu.addAction(act_next)
|
nav_menu.addAction(act_next)
|
||||||
|
|
|
||||||
|
|
@ -93,12 +93,6 @@ class SettingsDialog(QDialog):
|
||||||
line.setFrameShadow(QFrame.Sunken)
|
line.setFrameShadow(QFrame.Sunken)
|
||||||
enc.addWidget(line)
|
enc.addWidget(line)
|
||||||
|
|
||||||
# Change key button
|
|
||||||
self.rekey_btn = QPushButton("Change key")
|
|
||||||
self.rekey_btn.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
|
|
||||||
self.rekey_btn.clicked.connect(self._change_key)
|
|
||||||
enc.addWidget(self.rekey_btn, 0, Qt.AlignLeft)
|
|
||||||
|
|
||||||
self.idle_spin = QSpinBox()
|
self.idle_spin = QSpinBox()
|
||||||
self.idle_spin.setRange(0, 240)
|
self.idle_spin.setRange(0, 240)
|
||||||
self.idle_spin.setSingleStep(1)
|
self.idle_spin.setSingleStep(1)
|
||||||
|
|
@ -124,6 +118,18 @@ class SettingsDialog(QDialog):
|
||||||
spin_row.addWidget(self.idle_spin_label)
|
spin_row.addWidget(self.idle_spin_label)
|
||||||
enc.addLayout(spin_row)
|
enc.addLayout(spin_row)
|
||||||
|
|
||||||
|
line2 = QFrame()
|
||||||
|
line2.setFrameShape(QFrame.HLine)
|
||||||
|
line2.setFrameShadow(QFrame.Sunken)
|
||||||
|
enc.addWidget(line2)
|
||||||
|
|
||||||
|
# Change key button
|
||||||
|
self.rekey_btn = QPushButton("Change encryption key")
|
||||||
|
self.rekey_btn.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
|
||||||
|
self.rekey_btn.clicked.connect(self._change_key)
|
||||||
|
|
||||||
|
enc.addWidget(self.rekey_btn, 0, Qt.AlignLeft)
|
||||||
|
|
||||||
# Put the group into the form so it spans the full width nicely
|
# Put the group into the form so it spans the full width nicely
|
||||||
form.addRow(enc_group)
|
form.addRow(enc_group)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class ToolBar(QToolBar):
|
||||||
self.actH1.setShortcut("Ctrl+1")
|
self.actH1.setShortcut("Ctrl+1")
|
||||||
self.actH2.setShortcut("Ctrl+2")
|
self.actH2.setShortcut("Ctrl+2")
|
||||||
self.actH3.setShortcut("Ctrl+3")
|
self.actH3.setShortcut("Ctrl+3")
|
||||||
self.actNormal.setShortcut("Ctrl+N")
|
self.actNormal.setShortcut("Ctrl+O")
|
||||||
self.actH1.triggered.connect(lambda: self.headingRequested.emit(24))
|
self.actH1.triggered.connect(lambda: self.headingRequested.emit(24))
|
||||||
self.actH2.triggered.connect(lambda: self.headingRequested.emit(18))
|
self.actH2.triggered.connect(lambda: self.headingRequested.emit(18))
|
||||||
self.actH3.triggered.connect(lambda: self.headingRequested.emit(14))
|
self.actH3.triggered.connect(lambda: self.headingRequested.emit(14))
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "bouquin"
|
name = "bouquin"
|
||||||
version = "0.1.6"
|
version = "0.1.7"
|
||||||
description = "Bouquin is a simple, opinionated notebook application written in Python, PyQt and SQLCipher."
|
description = "Bouquin is a simple, opinionated notebook application written in Python, PyQt and SQLCipher."
|
||||||
authors = ["Miguel Jacq <mig@mig5.net>"]
|
authors = ["Miguel Jacq <mig@mig5.net>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue