[Libreoffice-commits] core.git: libreofficekit/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Jul 25 08:41:38 UTC 2016


 libreofficekit/source/gtk/lokdocview.cxx |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 57c8915376dbb580760486071cac6533e05427bf
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jul 25 08:52:40 2016 +0200

    lokdocview: draw a lock inside the lock indicator
    
    Hopefully less confusing, the crossed out rectangle is also used inside
    the tiles for deleted comments, and the two are independent.
    
    Change-Id: Id06fbf6ec1b21dfbab1c126c3c432f91cf51430c
    Reviewed-on: https://gerrit.libreoffice.org/27503
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index f604b58..3201ad3 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1789,19 +1789,19 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
         cairo_set_line_width(pCairo, 2.0);
         cairo_stroke(pCairo);
 
-        // Cross it.
-        cairo_move_to(pCairo,
-                      twipToPixel(rRectangle.m_aRectangle.x, priv->m_fZoom),
-                      twipToPixel(rRectangle.m_aRectangle.y, priv->m_fZoom));
-        cairo_line_to(pCairo,
-                      twipToPixel(rRectangle.m_aRectangle.x + rRectangle.m_aRectangle.width, priv->m_fZoom),
-                      twipToPixel(rRectangle.m_aRectangle.y + rRectangle.m_aRectangle.height, priv->m_fZoom));
-        cairo_move_to(pCairo,
-                      twipToPixel(rRectangle.m_aRectangle.x, priv->m_fZoom),
-                      twipToPixel(rRectangle.m_aRectangle.y + rRectangle.m_aRectangle.height, priv->m_fZoom));
-        cairo_line_to(pCairo,
-                      twipToPixel(rRectangle.m_aRectangle.x + rRectangle.m_aRectangle.width, priv->m_fZoom),
-                      twipToPixel(rRectangle.m_aRectangle.y, priv->m_fZoom));
+        // And a lock.
+        cairo_rectangle(pCairo,
+                        twipToPixel(rRectangle.m_aRectangle.x + rRectangle.m_aRectangle.width, priv->m_fZoom) - 25,
+                        twipToPixel(rRectangle.m_aRectangle.y + rRectangle.m_aRectangle.height, priv->m_fZoom) - 15,
+                        20,
+                        10);
+        cairo_fill(pCairo);
+        cairo_arc(pCairo,
+                  twipToPixel(rRectangle.m_aRectangle.x + rRectangle.m_aRectangle.width, priv->m_fZoom) - 15,
+                  twipToPixel(rRectangle.m_aRectangle.y + rRectangle.m_aRectangle.height, priv->m_fZoom) - 15,
+                  5,
+                  180.0 * (M_PI/180.0),
+                  360.0 * (M_PI/180.0));
         cairo_stroke(pCairo);
     }
 


More information about the Libreoffice-commits mailing list