ui: on mobile, move the right toolbar to the bottom and make the top toolbar scrollable

Before this change there was always a single toolbar on the top, with both
Colibris and the legacy skin. When the screen size was reduced:

- the legacy skin would compact the icons in the toolbar (this was fine,
  indeed);
- Colibris would hide some formatting icons. This would hamper the functionality
  for mobile users.

After this change both the skins work in the same way, which is the following:
- when the screen gets smaller the right toolbar (the one with "export",
  "timeslider", and other buttons) goes to the bottom of the screen;
- when there are many icons, the toolbar keeps all of them, and to see them the
  user must drag the toolbar.

This behaviour will probably be changed before release, opting instead to show
a "+" button when there is an overflow, since this appears to be more
discoverable (see the discusison in #3697).

Do not tested with custom toolbar elements (toolbar.left and toolbar.right
configuration items in settings.json).

Fixes #3697.
This commit is contained in:
Sebastian Castro 2020-03-12 18:47:12 +01:00
parent 6323f59c3a
commit 0d61d6bb13
3 changed files with 12 additions and 14 deletions

View file

@ -1063,9 +1063,6 @@ input[type=checkbox] {
right:100px;
}
.toolbar ul.menu_right {
right:0px;
}
.popup {
width:100%;
max-width:300px;
@ -1074,7 +1071,7 @@ input[type=checkbox] {
}
/* Mobile devices */
@media only screen and (min-device-width: 320px) and (max-device-width: 720px) {
@media only screen and (max-width: 720px) {
#users {
top: auto;
right:0px !important;
@ -1108,9 +1105,11 @@ input[type=checkbox] {
}
.toolbar ul.menu_left {
right:0px;
position: fixed;
position: relative;
display: flex;
top: 0;
padding-top: 4px;
overflow-x: auto;
padding: 4px 0 0 0;
border-bottom: 1px solid #ccc;
z-index: 10;
}

View file

@ -67,7 +67,7 @@
}
.toolbar ul.menu_left {
left: 8px;
padding-left: 8px;
}
.toolbar ul.menu_right {
@ -97,23 +97,21 @@
}
@media (max-width: 720px) {
.toolbar ul {
.toolbar ul {
height: 39px;
background: none;
background-color: transparent;
border: none !important;
padding: 0 !important;
overflow-x: visible;
}
.toolbar ul.menu_left {
padding-top: 2px !important;
padding: 2px 0 0 0;
}
.toolbar ul.menu_right {
left: 0;
padding-left: 8px !important;
padding-top: 8px !important;
padding-left: 8px;
padding-top: 8px;
height: 35px !important;
border-top: 1px solid #d2d2d2 !important;
border-top: 1px solid #d2d2d2;
background-color: white;
}
.toolbar ul li a {

View file

@ -32,6 +32,7 @@
#outerdocbody.plugin-ep_author_neat { padding-left: 0; }
#options-linenoscheck { display:none; }
#options-linenoscheck ~ label { display:none; }
#outerdocbody { padding-left: 0; } /* side div is hidden now */
}
#outerdocbody.sidediv-hidden {