diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2020-01-13 17:57:22 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-01-13 20:01:37 +0100 |
commit | 1cf5bde981941f2ac2920819e93fb55a7ca3bac1 (patch) | |
tree | a4bcb7475cfcef995034cd80f83a79a6dc80f071 | |
parent | f5d159b80bcda4493cd1086b879df83851e5f751 (diff) |
Toolbar color buttons should track transparent state as well as colors.
Change-Id: I727ff4f942b7059da4f17216fe523dd1bbb04cd2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86710
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | loleaflet/src/control/Control.Toolbar.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js index 0d1daef7b..0074e9585 100644 --- a/loleaflet/src/control/Control.Toolbar.js +++ b/loleaflet/src/control/Control.Toolbar.js @@ -1818,13 +1818,13 @@ function onCommandStateChanged(e) { color = 'transparent'; } else { - color = color.toString(16); color = '#' + Array(7 - color.length).join('0') + color; - $('#tb_editbar_item_fontcolor .w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + color); - $('#tb_editbar_item_fontcolor .w2ui-tb-down').css('display', 'none'); - $('#tb_editbar_item_fontcolor .w2ui-tb-caption').css('display', 'none'); } + $('#tb_editbar_item_fontcolor .w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + color); + $('#tb_editbar_item_fontcolor .w2ui-tb-down').css('display', 'none'); + $('#tb_editbar_item_fontcolor .w2ui-tb-caption').css('display', 'none'); + div = L.DomUtil.get('fontcolorindicator'); if (div) { L.DomUtil.setStyle(div, 'background', color); @@ -1839,15 +1839,16 @@ function onCommandStateChanged(e) { else { color = color.toString(16); color = '#' + Array(7 - color.length).join('0') + color; - //writer - $('#tb_editbar_item_backcolor .w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + color); - $('#tb_editbar_item_backcolor .w2ui-tb-down').css('display', 'none'); - $('#tb_editbar_item_backcolor .w2ui-tb-caption').css('display', 'none'); - //calc? - $('#tb_editbar_item_backgroundcolor .w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + color); - $('#tb_editbar_item_backgroundcolor .w2ui-tb-down').css('display', 'none'); - $('#tb_editbar_item_backgroundcolor .w2ui-tb-caption').css('display', 'none'); } + //writer + $('#tb_editbar_item_backcolor .w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + color); + $('#tb_editbar_item_backcolor .w2ui-tb-down').css('display', 'none'); + $('#tb_editbar_item_backcolor .w2ui-tb-caption').css('display', 'none'); + //calc? + $('#tb_editbar_item_backgroundcolor .w2ui-tb-image').css('box-shadow', 'inset 0 -2px #ffffff, inset 0px -6px ' + color); + $('#tb_editbar_item_backgroundcolor .w2ui-tb-down').css('display', 'none'); + $('#tb_editbar_item_backgroundcolor .w2ui-tb-caption').css('display', 'none'); + div = L.DomUtil.get('backcolorindicator'); if (div) { L.DomUtil.setStyle(div, 'background', color); |