diff options
author | Pedro Pinto Silva <pedro.silva@collabora.com> | 2022-07-19 17:02:43 +0200 |
---|---|---|
committer | pedropintosilva <65948705+pedropintosilva@users.noreply.github.com> | 2022-08-08 14:15:12 +0200 |
commit | 83f0bf853a958fdb97159c6170ecbfdca81a10c0 (patch) | |
tree | ffd3ec74336f9e3b02e2301e1a3b952ccb0bcd82 | |
parent | Remove unnecessary separator from view menu entries (type: text) (diff) | |
download | online-83f0bf853a958fdb97159c6170ecbfdca81a10c0.tar.gz online-83f0bf853a958fdb97159c6170ecbfdca81a10c0.zip |
Make view menu entries behave similar across types
- Follow the same order, for generic menu entries:
- Toggle UI Mode; Show Ruler; Show Status Bar; Sidebar
- Make sure Reset Zoom and all UI toggles are present in all apps
(doc type) when using tablet
Note:
This commit does not change the following because I do agree with
remarks stated in 70f4f8b92e44d361c78dd323e147d23abba8b308
- Zoom in and Zoom out entries are not needed in tablet
- Zoom also misbehaves, so better to have it out when on a tablet
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I06f1c025dba27ae65229c38406d646da75a59aa6
-rw-r--r-- | browser/src/control/Control.Menubar.js | 103 |
1 files changed, 57 insertions, 46 deletions
diff --git a/browser/src/control/Control.Menubar.js b/browser/src/control/Control.Menubar.js index ba3ba6767a..6064ec1df5 100644 --- a/browser/src/control/Control.Menubar.js +++ b/browser/src/control/Control.Menubar.js @@ -350,24 +350,28 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {uno: '.uno:SearchDialog'} ]}, - {name: _UNO('.uno:ViewMenu', 'presentation'), id: 'view', type: 'menu', menu: [ - {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action'}, - {type: 'separator'}, - {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, - {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {type: 'separator'}, - {name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'}, - {uno: '.uno:SlideMasterPage'}, - {type: 'separator'}, - {uno: '.uno:ModifyPage'}, - {uno: '.uno:SlideChangeWindow'}, - {uno: '.uno:CustomAnimation'}, - {uno: '.uno:MasterSlidesPanel'}, - {type: 'separator'}, - {uno: '.uno:Sidebar'}, - {name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'}] - }, + {name: _UNO('.uno:ViewMenu', 'presentation'), id: 'view', type: 'menu', + menu: (window.mode.isTablet() ? [ + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + ] : [ + {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action'}, + {type: 'separator'}, + {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, + {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + ]).concat([ + {type: 'separator'}, + {name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'}, + {name: _('Show Ruler'), id: 'showruler', type: 'action'}, + {name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'}, + {uno: '.uno:Sidebar'}, + {type: 'separator'}, + {uno: '.uno:SlideMasterPage'}, + {uno: '.uno:ModifyPage'}, + {uno: '.uno:SlideChangeWindow'}, + {uno: '.uno:CustomAnimation'}, + {uno: '.uno:MasterSlidesPanel'}, + ])}, {name: _UNO('.uno:InsertMenu', 'presentation'), id: 'insert', type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, {name: _UNO('.uno:InsertGraphic', 'presentation'), id: 'insertgraphicremote', type: 'action'}, @@ -481,17 +485,21 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {uno: '.uno:SearchDialog'} ]}, - {name: _UNO('.uno:ViewMenu', 'presentation'), id: 'view', type: 'menu', menu: [ - {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action'}, - {type: 'separator'}, - {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, - {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {type: 'separator'}, - {name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'}, - {uno: '.uno:Sidebar'}, - {name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'} - ]}, + {name: _UNO('.uno:ViewMenu', 'presentation'), id: 'view', type: 'menu', + menu: (window.mode.isTablet() ? [ + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + ] : [ + {name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action'}, + {type: 'separator'}, + {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, + {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + ]).concat([ + {type: 'separator'}, + {name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'}, + {uno: '.uno:Sidebar'}, + {name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'} + ])}, {name: _UNO('.uno:InsertMenu', 'presentation'), id: 'insert', type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, {name: _UNO('.uno:InsertGraphic', 'presentation'), id: 'insertgraphicremote', type: 'action'}, @@ -595,23 +603,26 @@ L.Control.Menubar = L.Control.extend({ {type: 'separator'}, {uno: '.uno:SearchDialog'} ]}, - {name: _UNO('.uno:ViewMenu', 'spreadsheet'), id: 'view', type: 'menu', menu: [ - {name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'}, - {type: 'separator'}, - {name: _UNO('.uno:ZoomPlus', 'text'), id: 'zoomin', type: 'action'}, - {name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action',}, - {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {type: 'separator'}, - {name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'}, - {name: _UNO('.uno:FreezePanes', 'spreadsheet', true), id: 'FreezePanes', type: 'action', uno: '.uno:FreezePanes'}, - {name: _UNO('.uno:FreezeCellsMenu', 'spreadsheet', true), id: 'FreezeCellsMenu', type: 'menu', uno: '.uno:FreezeCellsMenu', menu: [ - {name: _UNO('.uno:FreezePanesColumn', 'spreadsheet', true), id: 'FreezePanesColumn', type: 'action', uno: '.uno:FreezePanesColumn'}, - {name: _UNO('.uno:FreezePanesRow', 'spreadsheet', true), id: 'FreezePanesRow', type: 'action', uno: '.uno:FreezePanesRow'} - ]}, - {type: 'separator'}, - {uno: '.uno:Sidebar'}, - {name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'} - ]}, + {name: _UNO('.uno:ViewMenu', 'spreadsheet'), id: 'view', type: 'menu', + menu: (window.mode.isTablet() ? [ + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + ] : [ + {name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'}, + {type: 'separator'}, + {name: _UNO('.uno:ZoomPlus', 'text'), id: 'zoomin', type: 'action'}, + {name: _UNO('.uno:ZoomMinus', 'text'), id: 'zoomout', type: 'action',}, + {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, + ]).concat([ + {type: 'separator'}, + {name: _('Toggle UI Mode'), id: 'toggleuimode', type: 'action'}, + {name: _('Show Status Bar'), id: 'showstatusbar', type: 'action'}, + {uno: '.uno:Sidebar'}, + {name: _UNO('.uno:FreezePanes', 'spreadsheet', true), id: 'FreezePanes', type: 'action', uno: '.uno:FreezePanes'}, + {name: _UNO('.uno:FreezeCellsMenu', 'spreadsheet', true), id: 'FreezeCellsMenu', type: 'menu', uno: '.uno:FreezeCellsMenu', menu: [ + {name: _UNO('.uno:FreezePanesColumn', 'spreadsheet', true), id: 'FreezePanesColumn', type: 'action', uno: '.uno:FreezePanesColumn'}, + {name: _UNO('.uno:FreezePanesRow', 'spreadsheet', true), id: 'FreezePanesRow', type: 'action', uno: '.uno:FreezePanesRow'} + ]}, + ])}, {name: _UNO('.uno:InsertMenu', 'spreadsheet'), id: 'insert', type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, {name: _UNO('.uno:InsertGraphic', 'spreadsheet'), id: 'insertgraphicremote', type: 'action'}, |