[gtk+/wip/baedert/drawing: 26/156] widget: Draw focus outline
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 26/156] widget: Draw focus outline
- Date: Tue, 9 May 2017 11:04:17 +0000 (UTC)
commit 602d8517ea3b6faac9e63642a3ee69ec431c7cc6
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 6e22405..339c7f5 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15636,6 +15636,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]