loleaflet/js/toolbar.js |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 192677b34f8ce92aa8bd3bf62c7da42764ee2b0a
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Nov 27 18:39:38 2018 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Nov 27 18:48:59 2018 +0200

    Don't hide the font and font size widgets in a mobile app
    
    Once the Format>Character... dialog works better in a mobile app we
    might revert this. But for now the font selection feature in that
    dialog is sadly practically unusable.
    
    Change-Id: I60ae6469a588b50b5e2acb5a6a04a04271b1ca47

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 0b293580b..2fac097ff 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -26,7 +26,8 @@ function _mobilify() {
        var statusbar = w2ui['toolbar-down'];
 
        toolbarUp.items.forEach(function(item) {
-               if (item.mobile === false && !item.hidden) {
+               if ((item.mobile === false ||
+                    (!window.ThisIsAMobileApp && item.mobilebrowser === 
false)) && !item.hidden) {
                        toolbarUp.hide(item.id);
                }
        });
@@ -616,6 +617,9 @@ var stylesSelectValue;
 var fontsSelectValue;
 var fontsizesSelectValue;
 
+// mobile:false means hide it both for normal Online used from a mobile 
browser, and in a mobile app
+// mobilebrowser:false means hide it for normal Online used from a mobile 
browser, but don't hide it in a mobile app
+
 function createToolbar() {
        var toolItems = [
                {type: 'menu', id: 'menu-wrap', caption: _('Textwrap'), mobile: 
false, items: [
@@ -634,8 +638,8 @@ function createToolbar() {
                {type: 'button',  id: 'repair', img: 'repair', hint: 
_('Document repair'), disabled: true, mobile: false},
                {type: 'break', mobile: false},
                {type: 'html',   id: 'styles', html: '<select 
class="styles-select"></select>', mobile: false},
-               {type: 'html',   id: 'fonts', html: '<select 
class="fonts-select"></select>', mobile: false},
-               {type: 'html',   id: 'fontsizes', html: '<select 
class="fontsizes-select"></select>', mobile: false},
+               {type: 'html',   id: 'fonts', html: '<select 
class="fonts-select"></select>', mobilebrowser: false},
+               {type: 'html',   id: 'fontsizes', html: '<select 
class="fontsizes-select"></select>', mobilebrowser: false},
                {type: 'break', mobile: false},
                {type: 'button',  id: 'bold',  img: 'bold', hint: 
_UNO('.uno:Bold'), uno: 'Bold', disabled: true},
                {type: 'button',  id: 'italic', img: 'italic', hint: 
_UNO('.uno:Italic'), uno: 'Italic', disabled: true},
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to