leaflet: Add sidebar commands in toolbar and menu

Reviewed-on: https://gerrit.libreoffice.org/71840
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 212290a35dc4e87439e5d4d41b16224281c8d27d)

Change-Id: Icac459849196a70b62ac0e2a558882d8cc199e6c
This commit is contained in:
Ashod Nakashian 2019-05-04 15:30:11 -04:00
parent 3d4f148a56
commit 7edfa725c1
5 changed files with 13 additions and 5 deletions

View file

@ -617,6 +617,7 @@ button.leaflet-control-search-next
.w2ui-icon.fullscreen{ background: url('images/lc_fullscreen.svg') no-repeat center !important; }
.w2ui-icon.closemobile{ background: url('images/lc_closedocmobile.svg') no-repeat center !important; }
.w2ui-icon.closetoolbar{ background: url('images/close_toolbar.svg') no-repeat center !important; }
.w2ui-icon.sidebar_modify_page{ background: url('images/lc_formproperties.svg') no-repeat center !important; }
.w2ui-icon.vereign{ background: url('images/vereign.png') no-repeat center !important; }

View file

@ -0,0 +1 @@
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m3 6h18v15h-18z" fill="#fff"/><path d="m3 2c-.554 0-1 .446-1 1v18c0 .554.446 1 1 1h18c.554 0 1-.446 1-1v-18c0-.554-.446-1-1-1zm0 4h18v15h-18z" fill="#808080"/><rect fill="#808080" height="1" ry=".5" width="12" x="6" y="11"/><rect fill="#4d82b8" height="1" ry=".5" width="4" x="6" y="15"/><path d="m10.5 14a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5zm0 1a.5.5 0 0 1 .5.5.5.5 0 0 1 -.5.5.5.5 0 0 1 -.5-.5.5.5 0 0 1 .5-.5z" fill="#4d82b8"/><path d="m13.5 10c-.828427 0-1.5.671573-1.5 1.5s.671573 1.5 1.5 1.5 1.5-.671573 1.5-1.5-.671573-1.5-1.5-1.5z" fill="#808080"/><rect fill="#4d82b8" height="1" ry=".491011" width="7" x="11" y="15"/><g fill="#808080"><rect height="1" ry=".5" width="4" x="6" y="15"/><path d="m10.5 14a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5zm0 1a.5.5 0 0 1 .5.5.5.5 0 0 1 -.5.5.5.5 0 0 1 -.5-.5.5.5 0 0 1 .5-.5z"/><rect height="1" ry=".491011" width="7" x="11" y="15"/></g></svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -66,7 +66,9 @@ L.Control.Menubar = L.Control.extend({
{type: 'separator'},
{uno: '.uno:ControlCodes'},
{type: 'separator'},
{name: _UNO('.uno:ShowResolvedAnnotations', 'text'), id: 'showresolved', type: 'action'}
{name: _UNO('.uno:ShowResolvedAnnotations', 'text'), id: 'showresolved', type: 'action'},
{type: 'separator'},
{uno: '.uno:Sidebar'}
]
},
{name: _UNO('.uno:InsertMenu', 'text'), type: 'menu', menu: [
@ -357,7 +359,9 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:SearchDialog'}
]},
{name: _UNO('.uno:ViewMenu', 'spreadsheet'), id: 'view', type: 'menu', mobileapp: false, menu: [
{name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'}
{name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action'},
{type: 'separator'},
{uno: '.uno:Sidebar'}
]},
{name: _UNO('.uno:InsertMenu', 'spreadsheet'), type: 'menu', menu: [
{name: _('Local Image...'), id: 'insertgraphic', type: 'action'},

View file

@ -824,6 +824,8 @@ function initNormalToolbar() {
{type: 'button', id: 'insertsymbol', img: 'insertsymbol', hint: _UNO('.uno:InsertSymbol', '', true), uno: 'InsertSymbol'},
{type: 'spacer'},
{type: 'button', id: 'edit', img: 'edit'},
{type: 'button', id: 'sidebar', img: 'sidebar_modify_page', hint: _UNO('.uno:Sidebar', '', true), uno: '.uno:Sidebar', hidden: true},
{type: 'break', id: 'breaksidebar', hidden: true},
{type: 'button', id: 'fold', img: 'fold', desktop: true, mobile: false, hidden: true},
{type: 'button', id: 'hamburger-tablet', img: 'hamburger', desktop: false, mobile: false, tablet: true, iosapptablet: false, hidden: true}
];
@ -1350,7 +1352,7 @@ function onDocLayerInit() {
toolbarUp.show('textalign', 'wraptext', 'breakspacing', 'insertannotation', 'conditionalformaticonset',
'numberformatcurrency', 'numberformatpercent',
'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'togglemergecells', 'breakmergecells',
'setborderstyle', 'sortascending', 'sortdescending', 'breaksorting', 'backgroundcolor');
'setborderstyle', 'sortascending', 'sortdescending', 'breaksorting', 'backgroundcolor', 'breaksidebar', 'sidebar');
toolbarUp.remove('styles');
statusbar.remove('prev', 'next', 'prevnextbreak');
@ -1416,7 +1418,7 @@ function onDocLayerInit() {
case 'text':
toolbarUp.show('leftpara', 'centerpara', 'rightpara', 'justifypara', 'breakpara', 'linespacing',
'breakspacing', 'defaultbullet', 'defaultnumbering', 'breakbullet', 'incrementindent', 'decrementindent',
'breakindent', 'inserttable', 'insertannotation', 'backcolor');
'breakindent', 'inserttable', 'insertannotation', 'backcolor', 'breaksidebar', 'sidebar');
if (!_inMobileMode()) {
statusbar.insert('left', [

View file

@ -264,7 +264,7 @@ L.Map = L.Evented.extend({
// This triggers all sidebar decks, so they would
// be loaded and show rather quickly on first use.
// Also, triggers sidebar window creation in the client.
map._socket.sendMessage('uno .uno:ViewSidebarStyles');
map._socket.sendMessage('uno .uno:Sidebar');
map._socket.sendMessage('uno .uno:Sidebar');
}, 200);
}