loleaflet/src/control/Control.JSDialogBuilder.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 481e536f7451f67c8691010c146c98b7e3290a82
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Mon Feb 17 17:35:58 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Tue Feb 18 11:29:06 2020 +0100

    mobile: Make line width spinbutton readonly.
    
    Entering a value directly into the spinbutton does not work.
    It must be because we support only some predefined values
    for line width on the sidebar. So don't allow to enter
    a value directly, user can use the plus / minus instead.
    
    Change-Id: I65f8b172308244a13761330370acc1ef4d5381a0
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88875
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 2f2e6a9dc..93297e126 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -951,6 +951,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
                if (data.enabled == 'false')
                        $(spinfield).attr('disabled', 'disabled');
 
+               if (data.readOnly === true)
+                       $(spinfield).attr('readOnly', 'true');
+
                var updateFunction = function() {
                        var value = builder._getUnoStateForItemId(data.id, 
builder);
 
@@ -1398,7 +1401,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
                var currentWidth = 
parseInt(builder.map['stateChangeHandler'].getItemValue('.uno:LineWidth'));
                var currentWidthText = currentWidth ? 
String(parseFloat(currentWidth)/100.0) : '0.5';
 
-               var lineData = { min: 0.5, max: 5, id: 'linewidth', text: 
currentWidthText };
+               var lineData = { min: 0.5, max: 5, id: 'linewidth', text: 
currentWidthText, readOnly: true };
 
                var callbackFunction = function(objectType, eventType, object) {
                        var newValue = 0;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to