dev/null                                 |binary
 loleaflet/dist/images/submenu.svg        |   76 +++++++++++++++++++++++++++++++
 loleaflet/dist/loleaflet.css             |   52 +++++++--------------
 loleaflet/src/layer/marker/Annotation.js |   27 ++++++-----
 4 files changed, 111 insertions(+), 44 deletions(-)

New commits:
commit ec8c13571815b19e4691aec7ea61b37a87548015
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Wed Apr 12 16:57:37 2017 +0200

    Align the Accept / Reject buttons with the kebab menu.
    
    And few other improvemnts inluding:
    
    * use svg instead of png for the menu
    * add title (caption) for the Accept / Reject change.
    
    Change-Id: Ic7e781d7e93d319f766b387a8eddfa70c1920760
    Reviewed-on: https://gerrit.libreoffice.org/36484
    Reviewed-by: pranavk <pran...@collabora.co.uk>
    Tested-by: pranavk <pran...@collabora.co.uk>

diff --git a/loleaflet/dist/images/submenu.png 
b/loleaflet/dist/images/submenu.png
deleted file mode 100644
index 5159693f..00000000
Binary files a/loleaflet/dist/images/submenu.png and /dev/null differ
diff --git a/loleaflet/dist/images/submenu.svg 
b/loleaflet/dist/images/submenu.svg
new file mode 100644
index 00000000..59401d65
--- /dev/null
+++ b/loleaflet/dist/images/submenu.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   height="24"
+   viewBox="0 0 24 24"
+   width="24"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   sodipodi:docname="submenu.svg">
+  <metadata
+     id="metadata14">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs12" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1346"
+     inkscape:window-height="953"
+     id="namedview10"
+     showgrid="true"
+     inkscape:zoom="27.035003"
+     inkscape:cx="13.008086"
+     inkscape:cy="11.596952"
+     inkscape:window-x="57"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3010" />
+  </sodipodi:namedview>
+  <rect
+     
style="fill:#4d4d4d;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:12,
 12;stroke-dashoffset:0"
+     id="rect3111"
+     width="3"
+     height="3"
+     x="10"
+     y="5" />
+  <rect
+     style="fill:#4d4d4d;fill-opacity:1;stroke:none"
+     id="rect3111-1"
+     width="3"
+     height="3"
+     x="10"
+     y="10" />
+  <rect
+     style="fill:#4d4d4d;fill-opacity:1;stroke:none"
+     id="rect3111-7"
+     width="3"
+     height="3"
+     x="10"
+     y="15" />
+</svg>
diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index 20563cac..d7522f87 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -204,27 +204,35 @@ body {
 
 .loleaflet-annotation-author {
        padding-left: 10px;
+       padding-right: 10px;
        vertical-align: top;
        display: table-cell;
 }
 
-.loleaflet-redline-accept-button, .loleaflet-redline-reject-button {
+.loleaflet-annotation-menu, .loleaflet-annotation-menu-redline, 
.loleaflet-redline-accept-button, .loleaflet-redline-reject-button {
+       margin: 0;
         padding: 0;
-        border: 0;
-        height: 25px;
-        width: 21px;
+        width: 24px;
+        height: 24px;
+       vertical-align: top;
+       border: 1px solid transparent;
+       display: inline-block;
 }
 
 .loleaflet-redline-accept-button {
-        background: url('../images/lc_accepttrackedchanges.svg');
+        background: url('../images/lc_accepttrackedchanges.svg') no-repeat 
center !important;
 }
 
 .loleaflet-redline-reject-button {
-        background: url('../images/lc_rejecttrackedchange.svg');
+        background: url('../images/lc_rejecttrackedchange.svg') no-repeat 
center !important;
 }
 
-.loleaflet-redline-accept-button:hover, .loleaflet-redline-reject-button:hover 
{
-        background-color: #dcdcdc;
+.loleaflet-annotation-menu, .loleaflet-annotation-menu-redline {
+       background: url(../images/submenu.svg) no-repeat center !important;
+}
+
+.loleaflet-annotation-menu:hover, .loleaflet-annotation-menu-redline:hover, 
.loleaflet-redline-accept-button:hover, .loleaflet-redline-reject-button:hover {
+       border: 1px solid darkgrey;
 }
 
 .loleaflet-annotation-date {
@@ -237,34 +245,10 @@ body {
        height: 6px;
 }
 
-.loleaflet-annotation-menu {
-       background: url(../images/submenu.png) no-repeat;
-       margin: 0;
-       padding: 0;
-       min-width: 15px;
-       height: 21px;
-       text-align: right;
-       border: 1px solid transparent;
-       display: inline-block;
-}
-
-.loleaflet-annotation-menu:hover {
-       border: 1px solid darkgrey;
-}
-
-.loleaflet-annotation-menu-redline {
-       background: url(../images/submenu.png) no-repeat;
+.loleaflet-annotation-menubar {
        margin: 0;
        padding: 0;
-       min-width: 15px;
-       height: 21px;
-       text-align: right;
-       border: 1px solid transparent;
-       display: inline-block;
-}
-
-.loleaflet-annotation-menu-redline:hover {
-       border: 1px solid darkgrey;
+       vertical-align: top;
 }
 
 .loleaflet-annotation-caption {
diff --git a/loleaflet/src/layer/marker/Annotation.js 
b/loleaflet/src/layer/marker/Annotation.js
index a1f22f60..11cd7046 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -139,27 +139,34 @@ L.Annotation = L.Layer.extend({
                var tr = L.DomUtil.create('tr', empty, tbody);
                var tdImg = L.DomUtil.create(tagTd, 'loleaflet-annotation-img', 
tr);
                var tdAuthor = L.DomUtil.create(tagTd, 
'loleaflet-annotation-author', tr);
+               var imgAuthor = L.DomUtil.create('img', empty, tdImg);
+               imgAuthor.setAttribute('src', L.Icon.Default.imagePath + 
'/user.png');
+               imgAuthor.setAttribute('width', this.options.imgSize.x);
+               imgAuthor.setAttribute('height', this.options.imgSize.y);
+               L.DomUtil.create(tagDiv, 'loleaflet-annotation-userline', 
tdImg);
+               this._contentAuthor = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-content-author', tdAuthor);
+               this._contentDate = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-date', tdAuthor);
+
                if (this._data.trackchange) {
-                       var tdAccept = L.DomUtil.create(tagTd, '', tr);
+                       var tdAccept = L.DomUtil.create(tagTd, 
'loleaflet-annotation-menubar', tr);
                        var acceptButton = L.DomUtil.create('button', 
'loleaflet-redline-accept-button', tdAccept);
-                       var tdReject = L.DomUtil.create(tagTd, '', tr);
+                       var tdReject = L.DomUtil.create(tagTd, 
'loleaflet-annotation-menubar', tr);
                        var rejectButton = L.DomUtil.create('button', 
'loleaflet-redline-reject-button', tdReject);
+
+                       acceptButton.title = _('Accept change');
                        L.DomEvent.on(acceptButton, click, function() {
                                this._map.fire('RedlineAccept', {id: 
this._data.id});
                        }, this);
+
+                       rejectButton.title = _('Reject change');
                        L.DomEvent.on(rejectButton, click, function() {
                                this._map.fire('RedlineReject', {id: 
this._data.id});
                        }, this);
                }
-               var tdMenu = L.DomUtil.create(tagTd, empty, tr);
-               var imgAuthor = L.DomUtil.create('img', empty, tdImg);
-               imgAuthor.setAttribute('src', L.Icon.Default.imagePath + 
'/user.png');
-               imgAuthor.setAttribute('width', this.options.imgSize.x);
-               imgAuthor.setAttribute('height', this.options.imgSize.y);
-               L.DomUtil.create(tagDiv, 'loleaflet-annotation-userline', 
tdImg);
-               this._contentAuthor = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-content-author', tdAuthor);
-               this._contentDate = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-date', tdAuthor);
+
+               var tdMenu = L.DomUtil.create(tagTd, 
'loleaflet-annotation-menubar', tr);
                var divMenu = L.DomUtil.create(tagDiv, this._data.trackchange ? 
'loleaflet-annotation-menu-redline' : 'loleaflet-annotation-menu', tdMenu);
+               divMenu.title = _('Open menu');
                divMenu.annotation = this;
                if (this._data.trackchange) {
                        this._captionNode = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-caption', wrapper);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to