[Libreoffice-commits] online.git: loleaflet/css loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 4 10:25:00 UTC 2019
loleaflet/css/toolbar.css | 8 +++++++-
loleaflet/src/control/Control.JSDialogBuilder.js | 10 ++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit e62a054e3494b4cbe075cabfb895d1307ade351b
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Oct 4 12:20:44 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Oct 4 12:24:43 2019 +0200
jsdialogs: use svg icons from online
Change-Id: Id90482b3afab722aaa5354e2359e201ac97e2d5d
Reviewed-on: https://gerrit.libreoffice.org/80201
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 4249e3932..24306a278 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -805,5 +805,11 @@ tr.useritem > td > img {
}
.ui-header.mobile-wizard:active {
- background-color: #eee;
+ background-color: #eee;
+}
+
+.ui-content .unobutton {
+ min-width: 32px;
+ min-height: 32px;
+ margin-right: 5px;
}
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 1d073d8e2..85d76931f 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -312,12 +312,18 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
+ _createIconPathFronUnoCommand: function(command) {
+ var commandName = command.substring('.uno:'.length);
+ return 'images/lc_' + commandName.toLowerCase() + '.svg';
+ },
+
_unoToolButton: function(parentContainer, data, builder) {
var button = null;
- if (data.image) {
+ if (data.command) {
+ var icon = builder._createIconPathFronUnoCommand(data.command);
button = L.DomUtil.create('img', 'ui-content unobutton', parentContainer);
- button.src = data.image;
+ $(button).css('background', 'url(' + icon + ')');
} else {
button = L.DomUtil.create('button', '', parentContainer);
button.innerHTML = builder._cleanText(data.text);
More information about the Libreoffice-commits
mailing list