[gtk+/wip/baedert/drawing: 40/262] widget: Draw focus outline
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 40/262] widget: Draw focus outline
- Date: Tue, 6 Jun 2017 09:23:04 +0000 (UTC)
commit 71cc2b19e21c306a3aa61259a74b865b363a7294
Author: Timm Bäder <mail baedert org>
Date: Wed May 3 10:24:32 2017 +0200
widget: Draw focus outline
gtk/gtkwidget.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index eae3d08..2b40a41 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15415,6 +15415,16 @@ gtk_widget_snapshot (GtkWidget *widget,
gtk_snapshot_pop (snapshot);
}
+ 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_css_filter_value_pop_snapshot (filter_value, snapshot);
if (GTK_DEBUG_CHECK (SNAPSHOT))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]