# HG changeset patch # User Andrey Skvortsov # Date 1530711662 -10800 # Node ID 492c1c046c82269a23b345ec8de673baaebb5706 # Parent e762e234181d7603316b549a7cee4dd97d7b443d Add full screen mode (menu and title are hidden) It's can be switched by pressing Shift-F12 or by clicking button on the toolbar diff -r e762e234181d -r 492c1c046c82 IDEFrame.py --- a/IDEFrame.py Tue Jul 03 17:09:11 2018 +0300 +++ b/IDEFrame.py Wed Jul 04 16:41:02 2018 +0300 @@ -72,7 +72,8 @@ [ ID_PLCOPENEDITORDISPLAYMENURESETPERSPECTIVE, ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE, -] = [wx.NewId() for _init_coll_DisplayMenu_Items in range(2)] + ID_PLCOPENEDITORDISPLAYMENUFULLSCREEN, +] = [wx.NewId() for _init_coll_DisplayMenu_Items in range(3)] # ------------------------------------------------------------------------------- # EditorToolBar definitions @@ -427,7 +428,8 @@ (wx.ID_COPY, "copy", _(u'Copy'), None), (wx.ID_PASTE, "paste", _(u'Paste'), None), None, - (ID_PLCOPENEDITOREDITMENUSEARCHINPROJECT, "find", _(u'Search in Project'), None)]) + (ID_PLCOPENEDITOREDITMENUSEARCHINPROJECT, "find", _(u'Search in Project'), None), + (ID_PLCOPENEDITORDISPLAYMENUFULLSCREEN, "fullscreen", _(u'Toggle fullscreen mode'), None)]) def _init_coll_DisplayMenu_Items(self, parent): AppendMenu(parent, help='', id=wx.ID_REFRESH, @@ -447,7 +449,11 @@ parent.AppendSeparator() AppendMenu(parent, help='', id=ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE, kind=wx.ITEM_NORMAL, text=_(u'Switch perspective') + '\tF12') - self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE) + self.Bind(wx.EVT_MENU, self.SwitchPerspective, id=ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE) + + AppendMenu(parent, help='', id=ID_PLCOPENEDITORDISPLAYMENUFULLSCREEN, + kind=wx.ITEM_NORMAL, text=_(u'Full screen') + '\tShift-F12') + self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=ID_PLCOPENEDITORDISPLAYMENUFULLSCREEN) AppendMenu(parent, help='', id=ID_PLCOPENEDITORDISPLAYMENURESETPERSPECTIVE, kind=wx.ITEM_NORMAL, text=_(u'Reset Perspective')) @@ -1484,11 +1490,11 @@ def OnTabsOpenedDClick(event): pos = event.GetPosition() if tabctrl.TabHitTest(pos.x, pos.y, None): - self.SwitchFullScrMode(event) + self.SwitchPerspective(event) event.Skip() return OnTabsOpenedDClick - def SwitchFullScrMode(self, evt): + def SwitchPerspective(self, evt): pane = self.AUIManager.GetPane(self.TabsOpened) if pane.IsMaximized(): self.AUIManager.RestorePane(pane) @@ -1496,6 +1502,10 @@ self.AUIManager.MaximizePane(pane) self.AUIManager.Update() + def SwitchFullScrMode(self, evt): + show = not self.IsFullScreen() + self.ShowFullScreen(show) + # ------------------------------------------------------------------------------- # Types Tree Management Functions # ------------------------------------------------------------------------------- diff -r e762e234181d -r 492c1c046c82 images/fullscreen.png Binary file images/fullscreen.png has changed diff -r e762e234181d -r 492c1c046c82 images/icons.svg --- a/images/icons.svg Tue Jul 03 17:09:11 2018 +0300 +++ b/images/icons.svg Wed Jul 04 16:41:02 2018 +0300 @@ -43,15 +43,17 @@ pagecolor="#ffffff" id="base" showgrid="false" - inkscape:zoom="3.7617187" - inkscape:cx="555.19855" - inkscape:cy="478.48693" + inkscape:zoom="2.5873931" + inkscape:cx="986.14665" + inkscape:cy="698.07857" inkscape:window-x="0" inkscape:window-y="27" inkscape:current-layer="svg2" showguides="true" inkscape:guide-bbox="true" - inkscape:window-maximized="1"> + inkscape:window-maximized="1" + inkscape:measure-start="904.956,703.964" + inkscape:measure-end="930.144,704.058"> + + + + + + + + + + + + - + - + - + - + spreadMethod="pad" /> - + - + spreadMethod="pad" /> - + - + - + - + - + spreadMethod="pad" /> - + - + - + - + - + - + spreadMethod="pad" /> - + - + spreadMethod="pad" /> - + - + - + - + - + spreadMethod="pad" /> - + - + - + - + - + - + spreadMethod="pad" /> - + - + spreadMethod="pad" /> - + spreadMethod="pad" /> - + - + - + - + - + - + spreadMethod="pad" /> - + - + spreadMethod="pad" /> - + - + - + - + - + spreadMethod="pad" /> - + - + - + - + + + + + + + + + + + + + + + + + + + + + Free Software for Automation + + + + + + + + + + + + + + + + + + + %% fullscreen %%