[gtk+/wip/matthiasc/visible-focus: 3/3] Always draw outline



commit 100f4990c81d9f1375a2d98923184ef6f996ee78
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Aug 28 22:27:07 2017 -0400

    Always draw outline
    
    We can now control with CSS where there the outline
    is drawn.

 gtk/gtkwidget.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b2e13df..a56bbcd 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15197,15 +15197,12 @@ gtk_widget_snapshot (GtkWidget   *widget,
           cairo_destroy (cr);
         }
 
-      if (gtk_widget_has_visible_focus (widget))
-        {
-          gtk_snapshot_offset (snapshot, margin.left, margin.top);
-          gtk_css_style_snapshot_outline (style,
-                                          snapshot,
-                                          allocation.width - margin.left - margin.right,
-                                          allocation.height - margin.top - margin.bottom);
-          gtk_snapshot_offset (snapshot, - margin.left, - margin.top);
-        }
+      gtk_snapshot_offset (snapshot, margin.left, margin.top);
+      gtk_css_style_snapshot_outline (style,
+                                      snapshot,
+                                      allocation.width - margin.left - margin.right,
+                                      allocation.height - margin.top - margin.bottom);
+      gtk_snapshot_offset (snapshot, - margin.left, - margin.top);
 
       if (opacity < 1.0)
         gtk_snapshot_pop (snapshot);


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