[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - 2 commits - loleaflet/css loleaflet/src
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 2 08:43:02 UTC 2020
loleaflet/css/spreadsheet.css | 19 ++++++++++++-------
loleaflet/src/control/Control.PartsPreview.js | 8 ++++++++
loleaflet/src/control/Control.TopToolbar.js | 7 +++++++
loleaflet/src/map/Map.js | 4 ++--
4 files changed, 29 insertions(+), 9 deletions(-)
New commits:
commit 02a13a6789a6c967e5c274012e99569c86385c30
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jul 21 19:51:14 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Sep 2 10:42:58 2020 +0200
calc-tablet-readonly: fix document-container/headers position
This change "hides" the toolbar and the formula bar in readonly mode for
tablets like the mobile(small-screen + touch) case, by positioning the
document-container and the header-container "over" the toolbar-wrapper
by using .tablet, and .tablet.readonly css style overrides.
Change-Id: I3a0d8468c2b2f5b62a238592ab64d85e1f8be62e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99356
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
(cherry picked from commit 7a17f0aa528e12d751281fb8254c576e730919c9)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101362
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/css/spreadsheet.css b/loleaflet/css/spreadsheet.css
index 8aede8c33..ecae9be00 100644
--- a/loleaflet/css/spreadsheet.css
+++ b/loleaflet/css/spreadsheet.css
@@ -9,11 +9,8 @@
top: 56px;
}
-#document-container.spreadsheet-document.tablet {
- border-top: 1px solid #B6B6B6;
- top: 100px;
- left: 50px;
- bottom: 78px;
+#document-container.spreadsheet-document.tablet.readonly {
+ top: 52px;
}
.spreadsheet-tabs-container {
@@ -79,8 +76,8 @@
bottom: 0px;
}
-#spreadsheet-row-column-frame.tablet {
- top: 80px;
+#spreadsheet-row-column-frame.tablet.readonly {
+ top: 32px;
}
#spreadsheet-header-corner-container {
@@ -231,3 +228,11 @@
background-size: 100% 100%;
background-repeat: no-repeat;
}
+
+#toolbar-wrapper.spreadsheet.tablet {
+ z-index: auto;
+}
+
+#toolbar-wrapper.spreadsheet.tablet.readonly {
+ z-index: -1;
+}
diff --git a/loleaflet/src/control/Control.TopToolbar.js b/loleaflet/src/control/Control.TopToolbar.js
index a0d665664..34450e934 100644
--- a/loleaflet/src/control/Control.TopToolbar.js
+++ b/loleaflet/src/control/Control.TopToolbar.js
@@ -280,6 +280,13 @@ L.Control.TopToolbar = L.Control.extend({
toolbarUp.remove('styles');
}
+ $('#toolbar-wrapper').addClass('spreadsheet');
+ if (window.mode.isTablet()) {
+ $(this.map.options.documentContainer).addClass('tablet');
+ $('#spreadsheet-row-column-frame').addClass('tablet');
+ $('#toolbar-wrapper').addClass('tablet');
+ }
+
break;
case 'text':
if (toolbarUp)
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index d6ce7741a..1d941f5de 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -172,7 +172,7 @@ L.Map = L.Evented.extend({
if (e.perm === 'readonly') {
L.DomUtil.addClass(this._container.parentElement, 'readonly');
- if (window.mode.isDesktop()) {
+ if (window.mode.isDesktop() || window.mode.isTablet()) {
L.DomUtil.addClass(L.DomUtil.get('toolbar-wrapper'), 'readonly');
}
L.DomUtil.addClass(L.DomUtil.get('main-menu'), 'readonly');
@@ -180,7 +180,7 @@ L.Map = L.Evented.extend({
L.DomUtil.addClass(L.DomUtil.get('spreadsheet-row-column-frame'), 'readonly');
} else {
L.DomUtil.removeClass(this._container.parentElement, 'readonly');
- if (window.mode.isDesktop()) {
+ if (window.mode.isDesktop() || window.mode.isTablet()) {
L.DomUtil.removeClass(L.DomUtil.get('toolbar-wrapper'), 'readonly');
}
L.DomUtil.removeClass(L.DomUtil.get('main-menu'), 'readonly');
commit 2714da3d33b9efd137fa46de51f292bc67374955
Author: gokaysatir <gokaysatir at collabora.com>
AuthorDate: Sat Aug 29 15:25:19 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Sep 2 10:42:43 2020 +0200
loleaflet: Hide portrait view previews on layout view.
When user switches to layout view on mobile. Viewing a page's properties opens 2 preview sliders. Portrait view's slider is hidden with this patch.
Change-Id: Iebbdd9c6c94f19a39df271106b75f2e9f55a7b35
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101867
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js
index 6d7b6c3da..dfc37beaf 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -184,6 +184,14 @@ L.Control.PartsPreview = L.Control.extend({
$(this._partsPreviewCont).mCustomScrollbar('destroy');
this.createScrollbar();
}
+
+ // Hide portrait view's previews when layout view is used.
+ if (this._direction === 'x' && window.mode.isMobile()) {
+ document.getElementById('mobile-slide-sorter').style.display = 'block';
+ }
+ else if (this._direction === 'y' && window.mode.isMobile()) {
+ document.getElementById('mobile-slide-sorter').style.display = 'none';
+ }
}
},
More information about the Libreoffice-commits
mailing list