loleaflet/css/mobilewizard.css                   |   10 +++++-----
 loleaflet/src/control/Control.JSDialogBuilder.js |   17 +++++++++++++++++
 2 files changed, 22 insertions(+), 5 deletions(-)

New commits:
commit 10ebf1b737918508358cd1eee9cffdce1189566a
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Fri May 8 09:31:47 2020 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Fri May 8 09:52:35 2020 +0200

    notebookbar: improve disabled items styling
    
    Change-Id: I8010300422c96affb132ad952a284af6c64b2fdc
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93701
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css
index d62cf279b..0d9ef8a62 100644
--- a/loleaflet/css/mobilewizard.css
+++ b/loleaflet/css/mobilewizard.css
@@ -348,13 +348,13 @@ p.mobile-wizard.ui-combobox-text.selected {
        background-color: #e6e6e640;
 }
 
-.unotoolbutton.disabled {
-       color: #707070;
+.unotoolbutton.disabled, .mobile-wizard-widebutton.disabled {
+       color: silver;
 }
 
-.unotoolbutton.disabled img {
-       -webkit-filter: grayscale(90%);
-       filter: grayscale(90%);
+.unotoolbutton.disabled img, .mobile-wizard-widebutton.disabled img {
+       -webkit-filter: grayscale(90%) brightness(120%);
+       filter: grayscale(90%) brightness(120%);
 }
 
 #mobile-wizard-content .ui-content > table > tr > td > table > table > 
tr:first-child > td > img{
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 28c0e7544..ef0b4646e 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1747,6 +1747,23 @@ L.Control.JSDialogBuilder = L.Control.extend({
                        titleClass = 'menu-entry-with-icon';
                }
 
+               var updateFunction = function() {
+                       var items = builder.map['stateChangeHandler'];
+                       var state = items.getItemValue(data.command);
+
+                       if (state && state === 'disabled')
+                               $(sectionTitle).addClass('disabled');
+                       else
+                               $(sectionTitle).removeClass('disabled');
+               };
+
+               updateFunction();
+
+               builder.map.on('commandstatechanged', function(e) {
+                       if (e.commandName === data.command)
+                               updateFunction();
+               }, this);
+
                if (builder.options.noLabelsForUnoButtons !== true) {
                        var titleSpan = L.DomUtil.create('span', titleClass, 
leftDiv);
                        titleSpan.innerHTML =  
builder._cleanText(_UNO(data.command));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to