Add triangle and hyphen bullets
This commit is contained in:
@@ -289,6 +289,8 @@ class nwUnicode:
|
||||
U_CHECK = "\u2714" # Heavy check mark
|
||||
U_CROSS = "\u2715" # Heavy cross mark
|
||||
U_BULL = "\u2022" # List bullet
|
||||
U_TRBULL = "\u2023" # Triangle bullet
|
||||
U_HYBULL = "\u2043" # Hyphen bullet
|
||||
U_FLOWER = "\u2055" # Flower punctuation mark
|
||||
U_PERMIL = "\u2030" # Per mille sign
|
||||
U_DEGREE = "\u00b0" # Degree symbol
|
||||
@@ -349,6 +351,8 @@ class nwUnicode:
|
||||
H_CHECK = "✔"
|
||||
H_MULT = "✕"
|
||||
H_BULL = "•"
|
||||
H_TRBULL = "‣"
|
||||
H_HYBULL = "⁃"
|
||||
H_FLOWER = "⁕"
|
||||
H_PERMIL = "‰"
|
||||
H_DEGREE = "°"
|
||||
|
||||
@@ -639,6 +639,20 @@ class GuiMainMenu(QMenuBar):
|
||||
self.aInsBullet.triggered.connect(lambda: self._docInsert(nwUnicode.U_BULL))
|
||||
self.mInsSymbol.addAction(self.aInsBullet)
|
||||
|
||||
# Insert > Triangle Bullet
|
||||
self.aInsTriBull = QAction("Triangle Bullet", self)
|
||||
self.aInsTriBull.setStatusTip("Insert a triangle bullet (alternative bullet)")
|
||||
self.aInsTriBull.setShortcut("Ctrl+K, Ctrl+T")
|
||||
self.aInsTriBull.triggered.connect(lambda: self._docInsert(nwUnicode.U_TRBULL))
|
||||
self.mInsSymbol.addAction(self.aInsTriBull)
|
||||
|
||||
# Insert > Hyphen Bullet
|
||||
self.aInsHyBull = QAction("Hyphen Bullet", self)
|
||||
self.aInsHyBull.setStatusTip("Insert a hyphen bullet (alternative bullet)")
|
||||
self.aInsHyBull.setShortcut("Ctrl+K, Ctrl+-")
|
||||
self.aInsHyBull.triggered.connect(lambda: self._docInsert(nwUnicode.U_HYBULL))
|
||||
self.mInsSymbol.addAction(self.aInsHyBull)
|
||||
|
||||
# Insert > Flower Mark
|
||||
self.aInsFlower = QAction("Flower Mark", self)
|
||||
self.aInsFlower.setStatusTip("Insert a flower mark (alternative bullet)")
|
||||
|
||||
@@ -1254,6 +1254,8 @@ class GuiMain(QMainWindow):
|
||||
self.addAction(self.mainMenu.aInsThinSpace)
|
||||
self.addAction(self.mainMenu.aInsThinNBSpace)
|
||||
self.addAction(self.mainMenu.aInsBullet)
|
||||
self.addAction(self.mainMenu.aInsTriBull)
|
||||
self.addAction(self.mainMenu.aInsHyBull)
|
||||
self.addAction(self.mainMenu.aInsFlower)
|
||||
self.addAction(self.mainMenu.aInsPerMille)
|
||||
self.addAction(self.mainMenu.aInsDegree)
|
||||
|
||||
@@ -432,6 +432,14 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncDir, fncProj):
|
||||
assert nwGUI.docEditor.getText() == nwUnicode.U_BULL
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsTriBull.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwUnicode.U_TRBULL
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsHyBull.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwUnicode.U_HYBULL
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
nwGUI.mainMenu.aInsFlower.activate(QAction.Trigger)
|
||||
assert nwGUI.docEditor.getText() == nwUnicode.U_FLOWER
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
Reference in New Issue
Block a user