Adding show_pen_on_lift setting (addressing #18)

This commit is contained in:
Emanuele 2020-11-08 17:33:26 +01:00
parent 8e19e8279c
commit a8046e1aa9
2 changed files with 3 additions and 1 deletions

View file

@ -71,6 +71,7 @@ All the settings are optional.
| `pen_trail` | persistence of trail in ms | `200` |
| `background_color` | color of window | `"white"` |
| `hide_pen_on_press` | if true, the pointer is hidden while writing | `true` |
| `show_pen_on_lift` | if true, the pointer is shown when lifting the pen | `true` |
Connection parameters are provided as a dictionary with the following keys (all optional):

View file

@ -186,7 +186,8 @@ class rMViewApp(QApplication):
self.pen.hide()
self.pen.setZValue(100)
self.penworker.signals.onPenMove.connect(self.movePen)
self.penworker.signals.onPenLift.connect(self.showPen)
if self.config.get("show_pen_on_lift", True):
self.penworker.signals.onPenLift.connect(self.showPen)
if self.config.get("hide_pen_on_press", True):
self.penworker.signals.onPenPress.connect(self.hidePen)
self.penworker.signals.onPenNear.connect(self.showPen)