[gtk+/wip/baedert/drawing: 15/241] widget: Draw focus outline
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 15/241] widget: Draw focus outline
- Date: Thu, 15 Jun 2017 10:48:52 +0000 (UTC)
commit f7d4b36ea6ae6f6f1b73b7f97c53dc65e5390999
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 2e5203f..39c5498 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]