##// END OF EJS Templates
add fullscreen support for QtConsole throught shortcut...
Matthias BUSSONNIER -
Show More
@@ -416,6 +416,7 b' The keybindings themselves are:'
416 - ``C-.``: force a kernel restart (a confirmation dialog appears).
416 - ``C-.``: force a kernel restart (a confirmation dialog appears).
417 - ``C-+``: increase font size.
417 - ``C-+``: increase font size.
418 - ``C--``: decrease font size.
418 - ``C--``: decrease font size.
419 - ``C-M-Space``: toggle full screen. (Command-Control-Space on Mac OS X)
419
420
420 The IPython pager
421 The IPython pager
421 =================
422 =================
@@ -98,7 +98,7 b' class MainWindow(QtGui.QMainWindow):'
98 self._frontend.exit_requested.connect(self.close)
98 self._frontend.exit_requested.connect(self.close)
99 self._confirm_exit = confirm_exit
99 self._confirm_exit = confirm_exit
100 self.setCentralWidget(frontend)
100 self.setCentralWidget(frontend)
101
101
102 #---------------------------------------------------------------------------
102 #---------------------------------------------------------------------------
103 # QWidget interface
103 # QWidget interface
104 #---------------------------------------------------------------------------
104 #---------------------------------------------------------------------------
@@ -461,6 +461,19 b' class IPythonQtConsoleApp(BaseIPythonApplication):'
461 self.init_kernel_manager()
461 self.init_kernel_manager()
462 self.init_qt_elements()
462 self.init_qt_elements()
463 self.init_colors()
463 self.init_colors()
464 self.init_window_shortcut()
465
466 def init_window_shortcut(self):
467 fullScreenAction = QtGui.QAction('Toggle Full Screen', self.window)
468 fullScreenAction.setShortcut('Ctrl+Meta+Space')
469 fullScreenAction.triggered.connect(self.toggleFullScreen)
470 self.window.addAction(fullScreenAction)
471
472 def toggleFullScreen(self):
473 if not self.window.isFullScreen():
474 self.window.showFullScreen()
475 else:
476 self.window.showNormal()
464
477
465 def start(self):
478 def start(self):
466
479
General Comments 0
You need to be logged in to leave comments. Login now