Writer, Impress Home tab: Promote insert annotation to bigtoolitem

- Promote to big button
  - Use the same from the previous position to make the whole tab more
  - compact by changing the insert image to a simple toolitem
- Change location in the home tab so it's easier to reach and it's
more consistent between writer and impress
- Use the same accesskey (accessibility, aka shortcut) between both apps

Cypress top_toolbar_spec.js needed to be updated to make sure scroll
indicator do not cover when attempting to access it

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0b3f3b83772317263c9d5d3d0e7f35d831eaa1ed
pull/8831/head
Pedro Pinto Silva 2024-04-19 10:54:15 +02:00 committed by pedropintosilva
parent 914e3575d1
commit 0bc4daa15c
3 changed files with 31 additions and 22 deletions

View File

@ -695,6 +695,13 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
],
'vertical': 'true'
},
{
'id': 'home-insert-annotation',
'type': 'bigtoolitem',
'text': _UNO('.uno:InsertAnnotation'),
'command': '.uno:InsertAnnotation',
'accessibility': { focusBack: false, combination: 'ZC', de: 'ZC' }
},
{
'type': 'container',
'children': [
@ -947,6 +954,14 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
{
'type': 'toolbox',
'children': [
{
'id': 'home-insert-table:InsertTableMenu',
'type': 'menubutton',
'noLabel': true,
'text': _UNO('.uno:InsertTable', 'presentation'),
'command': '.uno:InsertTable',
'accessibility': { focusBack: true, combination: 'IT', de: null }
},
{
'id': 'home-insert-graphic:InsertImageMenu',
'type': 'menubutton',
@ -980,14 +995,6 @@ L.Control.NotebookbarImpress = L.Control.NotebookbarWriter.extend({
'text': _UNO('.uno:InsertObjectChart'),
'command': '.uno:InsertObjectChart',
'accessibility': { focusBack: true, combination: 'IC', de: null }
},
{
'id': 'home-insert-table:InsertTableMenu',
'type': 'menubutton',
'noLabel': true,
'text': _UNO('.uno:InsertTable', 'presentation'),
'command': '.uno:InsertTable',
'accessibility': { focusBack: true, combination: 'IT', de: null }
}
]
}

View File

@ -641,6 +641,13 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
],
'vertical': 'true'
},
{
'id': 'home-insert-annotation',
'type': 'bigtoolitem',
'text': _UNO('.uno:InsertAnnotation'),
'command': '.uno:InsertAnnotation',
'accessibility': { focusBack: false, combination: 'ZC', de: 'ZC' }
},
{
'type': 'container',
'children': [
@ -782,12 +789,7 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
'text': _UNO('.uno:InsertTable', 'text'),
'command': '.uno:InsertTable',
'accessibility': { focusBack: false, combination: 'IT', de: null }
}
]
},
{
'type': 'toolbox',
'children': [
},
{
'id': 'home-insert-graphic:InsertImageMenu',
'type': 'menubutton',
@ -795,7 +797,12 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
'text': _UNO('.uno:InsertGraphic'),
'command': '.uno:InsertGraphic',
'accessibility': { focusBack: true, combination: 'IG', de: null }
},
}
]
},
{
'type': 'toolbox',
'children': [
{
'id': 'home-insert-page-break',
'type': 'toolitem',
@ -810,13 +817,6 @@ L.Control.NotebookbarWriter = L.Control.Notebookbar.extend({
'text': _UNO('.uno:CharmapControl'),
'command': 'charmapcontrol',
'accessibility': { focusBack: false, combination: 'IS', de: null }
},
{
'id': 'home-insert-annotation',
'type': 'toolitem',
'text': _UNO('.uno:InsertAnnotation'),
'command': '.uno:InsertAnnotation',
'accessibility': { focusBack: false, combination: 'ZC', de: 'ZC' }
}
]
}

View File

@ -227,6 +227,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#toolbar-up .w2ui-scroll-right').click();
cy.cGet('#Home-container .unoInsertTable button').click();
cy.cGet('.inserttable-grid > .row > .col').eq(3).click();
helper.typeIntoDocument('{ctrl}a');
@ -320,6 +321,7 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('#copy-paste-container p i').should('exist');
//Undo
cy.cGet('#toolbar-up .w2ui-scroll-left').click();
cy.cGet('#Home-container .unoUndo').should('not.be.disabled').click();
helper.copy();
cy.wait(500); // wait for new clipboard