[gtk/gtk-3-24: 1/2] Make dashed border-style work correctly



commit 0feebcf1456abbb722128aedbcbbd5d9e68cadf0
Author: Arnaud B <arnaud bonatti gmail com>
Date:   Fri Sep 21 12:25:23 2018 +0000

    Make dashed border-style work correctly
    
    There’s a short-path done for focus rectangles, but it can be taken in other conditions, and then fail 
occasionally to render a dashed line if the border-width is too big.

 gtk/gtkrenderborder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c
index f755f9f005..6ecf0cf005 100644
--- a/gtk/gtkrenderborder.c
+++ b/gtk/gtkrenderborder.c
@@ -447,8 +447,8 @@ set_stroke_style (cairo_t        *cr,
        */
       if (n == nearbyint (n))
         {
-          segments[0] = 1;
-          segments[1] = 2;
+          segments[0] = line_width;
+          segments[1] = 2 * line_width;
         }
       else
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]