mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Action for toggling fullscreen mode
This commit is contained in:
parent
87609944a5
commit
0d85eb3473
3 changed files with 15 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ actions = [
|
|||
{
|
||||
'id': 'help',
|
||||
'text': '&Help',
|
||||
'shortcuts': ['Ctrl+H'],
|
||||
'shortcuts': ['F1', 'Ctrl+H'],
|
||||
'callback': 'on_action_help',
|
||||
},
|
||||
{
|
||||
|
|
@ -187,4 +187,11 @@ actions = [
|
|||
'checkable': True,
|
||||
'callback': 'on_action_show_scrollbars',
|
||||
},
|
||||
{
|
||||
'id': 'fullscreen',
|
||||
'text': '&Fullscreen',
|
||||
'shortcuts': ['F11'],
|
||||
'checkable': True,
|
||||
'callback': 'on_action_fullscreen',
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ menu_structure = [
|
|||
'fit_scene',
|
||||
'fit_selection',
|
||||
MENU_SEPARATOR,
|
||||
'fullscreen',
|
||||
'show_scrollbars',
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -142,6 +142,12 @@ class BeeGraphicsView(QtWidgets.QGraphicsView, ActionsMixin):
|
|||
def on_action_fit_selection(self):
|
||||
self.fit_rect(self.scene.itemsBoundingRect(selection_only=True))
|
||||
|
||||
def on_action_fullscreen(self, checked):
|
||||
if checked:
|
||||
self.parent().showFullScreen()
|
||||
else:
|
||||
self.parent().showNormal()
|
||||
|
||||
def on_action_show_scrollbars(self, checked):
|
||||
if checked:
|
||||
self.setHorizontalScrollBarPolicy(
|
||||
|
|
|
|||
Loading…
Reference in a new issue