diff --git a/beeref/actions/actions.py b/beeref/actions/actions.py
index 3064427..f03e015 100644
--- a/beeref/actions/actions.py
+++ b/beeref/actions/actions.py
@@ -175,4 +175,10 @@ actions = [
'shortcuts': ['Ctrl+Shift+A'],
'callback': 'on_action_deselect_all',
},
+ {
+ 'id': 'help',
+ 'text': '&Help',
+ 'shortcuts': ['Ctrl+H'],
+ 'callback': 'on_action_help',
+ },
]
diff --git a/beeref/actions/menu_structure.py b/beeref/actions/menu_structure.py
index 77b0c09..5a7019d 100644
--- a/beeref/actions/menu_structure.py
+++ b/beeref/actions/menu_structure.py
@@ -69,4 +69,10 @@ menu_structure = [
'normalize_size',
],
},
+ {
+ 'menu': '&Help',
+ 'items': [
+ 'help',
+ ],
+ },
]
diff --git a/beeref/documentation/controls.html b/beeref/documentation/controls.html
new file mode 100644
index 0000000..823db86
--- /dev/null
+++ b/beeref/documentation/controls.html
@@ -0,0 +1,26 @@
+
Pan Canvas
+
+
+ Middle Click + Drag
+ Left Click + Alt + Drag
+
+
+Zoom Canvas
+
+
+ Mouse wheel up/down
+
+
+Select Items
+
+Single Item: Left Click
+Multiple Items: Ctrl + Left Click
+Rubberband Selection: Left Click + Drag
+
+Move Selection
+
+Left Click + Drag
+
+Snap Rotation
+
+Shift or Ctrl while rotating
\ No newline at end of file
diff --git a/beeref/gui.py b/beeref/gui.py
index f24e90d..85c710f 100644
--- a/beeref/gui.py
+++ b/beeref/gui.py
@@ -14,6 +14,7 @@
# along with BeeRef. If not, see .
import logging
+import os.path
from PyQt6 import QtWidgets
from PyQt6.QtCore import Qt
@@ -61,3 +62,23 @@ class BeeProgressDialog(QtWidgets.QProgressDialog):
def on_finished(self, filename, errors):
self.close()
+
+
+class HelpDialog(QtWidgets.QDialog):
+ def __init__(self, parent):
+ super().__init__(parent)
+ self.setWindowTitle('BeeRef Help')
+ docdir = os.path.join(os.path.dirname(__file__),
+ 'documentation')
+ tabs = QtWidgets.QTabWidget()
+
+ # Controls
+ with open(os.path.join(docdir, 'controls.html')) as f:
+ controls_txt = f.read()
+ controls = QtWidgets.QLabel(controls_txt)
+ tabs.addTab(controls, '&Controls')
+
+ layout = QtWidgets.QVBoxLayout()
+ self.setLayout(layout)
+ layout.addWidget(tabs)
+ self.show()
diff --git a/beeref/selection.py b/beeref/selection.py
index 51fc9d2..1797102 100644
--- a/beeref/selection.py
+++ b/beeref/selection.py
@@ -112,7 +112,7 @@ class SelectableMixin(BaseItemMixin):
SELECT_LINE_WIDTH = 4 # line width for the selection box
SELECT_HANDLE_SIZE = 15 # size of selection handles for scaling
SELECT_RESIZE_SIZE = 20 # size of hover area for scaling
- SELECT_ROTATE_SIZE = 15 # size of hover area for rotating
+ SELECT_ROTATE_SIZE = 10 # size of hover area for rotating
def init_selectable(self):
self.setAcceptHoverEvents(True)
diff --git a/beeref/view.py b/beeref/view.py
index be9e75b..6987da4 100644
--- a/beeref/view.py
+++ b/beeref/view.py
@@ -22,7 +22,7 @@ from beeref.actions import ActionsMixin
from beeref import commands
from beeref.config import CommandlineArgs
from beeref import fileio
-from beeref.gui import BeeProgressDialog, WelcomeOverlay
+from beeref.gui import BeeProgressDialog, WelcomeOverlay, HelpDialog
from beeref.items import BeePixmapItem
from beeref.scene import BeeGraphicsScene
@@ -270,6 +270,9 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin):
logger.info('User quit. Exiting...')
self.app.quit()
+ def on_action_help(self):
+ HelpDialog(self)
+
def on_insert_images_finished(self, filename, errors):
if errors:
errornames = [