Darshan-Upadhyay 2024-05-20 11:43:49 +00:00 committed by GitHub
commit d9e8ebd3fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 15 deletions

View File

@ -397,10 +397,12 @@ L.Control.NotebookbarDraw = L.Control.NotebookbarImpress.extend({
'type': 'toolbox',
'children': [
{
'id': 'collapsenotebookbar',
'id': 'showruler',
'class': 'unoshowruler',
'type': 'menubartoolitem',
'text': _('Collapse Tabs'),
'accessibility': { focusBack: true, combination: 'CN', de: null }
'text': _('Ruler'),
'command': _('Show Ruler'),
'accessibility': { focusBack: true, combination: 'R', de: 'L' }
}
]
},
@ -413,13 +415,20 @@ L.Control.NotebookbarDraw = L.Control.NotebookbarImpress.extend({
'type': 'menubartoolitem',
'text': _('Status Bar'),
'command': _('Show Status Bar'),
'accessibility': { focusBack: true, combination: 'SS', de: null }
'accessibility': { focusBack: true, combination: 'SB', de: null }
}
]
}
],
'vertical': 'true'
},
{
'id': 'collapsenotebookbar',
'class': 'unocollapsenotebookbar',
'type': 'bigmenubartoolitem',
'text': _('Collapse Tabs'),
'accessibility': { focusBack: true, combination: 'CU', de: null }
},
{
'id':'toggledarktheme',
'type': 'bigmenubartoolitem',

View File

@ -414,11 +414,12 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
'type': 'toolbox',
'children': [
{
'id': 'collapsenotebookbar',
'class': 'unocollapsenotebookbar',
'id': 'showruler',
'class': 'unoshowruler',
'type': 'menubartoolitem',
'text': _('Collapse Tabs'),
'accessibility': { focusBack: true, combination: 'CU', de: null }
'text': _('Ruler'),
'command': _('Show Ruler'),
'accessibility': { focusBack: true, combination: 'R', de: 'L' }
}
]
},
@ -438,6 +439,13 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
],
'vertical': 'true'
},
{
'id': 'collapsenotebookbar',
'class': 'unocollapsenotebookbar',
'type': 'bigmenubartoolitem',
'text': _('Collapse Tabs'),
'accessibility': { focusBack: true, combination: 'CU', de: null }
},
{
'id': 'view-master-view',
'type': 'bigtoolitem',

View File

@ -322,6 +322,7 @@ L.Control.UIManager = L.Control.extend({
// remove unused elements
L.DomUtil.remove(L.DomUtil.get('spreadsheet-toolbar'));
$('#presentation-controls-wrapper').show();
this.initializeRuler();
}
if (docType === 'text') {
@ -330,13 +331,7 @@ L.Control.UIManager = L.Control.extend({
L.DomUtil.remove(L.DomUtil.get('presentation-controls-wrapper'));
document.getElementById('selectbackground').parentNode.removeChild(document.getElementById('selectbackground'));
if ((window.mode.isTablet() || window.mode.isDesktop()) && !app.isReadOnly()) {
var showRuler = this.getSavedStateOrDefault('ShowRuler');
var interactiveRuler = this.map.isEditMode();
var isRTL = document.documentElement.dir === 'rtl';
L.control.ruler({position: (isRTL ? 'topright' : 'topleft'), interactive:interactiveRuler, showruler: showRuler}).addTo(this.map);
this.map.fire('rulerchanged');
}
this.initializeRuler();
var showResolved = this.getSavedStateOrDefault('ShowResolved');
if (showResolved === false || showResolved === 'false')
@ -407,6 +402,17 @@ L.Control.UIManager = L.Control.extend({
}
},
// Initialize ruler
initializeRuler: function() {
if ((window.mode.isTablet() || window.mode.isDesktop()) && !app.isReadOnly()) {
var showRuler = this.getSavedStateOrDefault('ShowRuler');
var interactiveRuler = this.map.isEditMode();
var isRTL = document.documentElement.dir === 'rtl';
L.control.ruler({position: (isRTL ? 'topright' : 'topleft'), interactive:interactiveRuler, showruler: showRuler}).addTo(this.map);
this.map.fire('rulerchanged');
}
},
removeClassicUI: function() {
if (this.map.menubar)
{