Przeglądaj źródła

wxGUI: added fullscreen mode on F11

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60971 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 lat temu
rodzic
commit
fb18f58638
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      gui/wxpython/gui_core/mapdisp.py

+ 10 - 0
gui/wxpython/gui_core/mapdisp.py

@@ -101,6 +101,8 @@ class MapFrameBase(wx.Frame):
         self._toolSwitcher = ToolSwitcher()
         self._toolSwitcher.toggleToolChanged.connect(self._onToggleTool)
 
+        self.Bind(wx.EVT_KEY_UP, self.OnFullScreen)
+
     def _initMap(self, Map):
         """Initialize map display, set dimensions and map region
         """
@@ -124,6 +126,14 @@ class MapFrameBase(wx.Frame):
         # update statusbar
         self.StatusbarUpdate()
 
+    def OnFullScreen(self, event):
+        if event.GetKeyCode() == wx.WXK_F11:
+            for toolbar in self.toolbars.keys():
+                self._mgr.GetPane(self.toolbars[toolbar]).Show(self.IsFullScreen())
+            self._mgr.Update()
+            self.ShowFullScreen(not self.IsFullScreen())
+        event.Skip()
+
     def GetToolSwitcher(self):
         return self._toolSwitcher