[gtk+/gtk-3-22] TextView: :border-width broke window→widget coords
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] TextView: :border-width broke window→widget coords
- Date: Tue, 29 Aug 2017 18:09:00 +0000 (UTC)
commit afd624bf4ba02d021b156bf478311fa875f7dcce
Author: Daniel Boles <dboles src gnome org>
Date: Tue Aug 29 19:00:03 2017 +0100
TextView: :border-width broke window→widget coords
Do the converse of commit bd7c87c762c75bbb8dfb5fed23964651188ef206 so
that a TextView with Container:border-width > 0 does not get its handles
and magnified region shifted up/left from where they should be.
https://bugzilla.gnome.org/show_bug.cgi?id=786986
gtk/gtktextview.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index f267c6c..61e6f63 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5070,6 +5070,10 @@ _text_window_to_widget_coords (GtkTextView *text_view,
gint *y)
{
GtkTextViewPrivate *priv = text_view->priv;
+ gint border_width = gtk_container_get_border_width (GTK_CONTAINER (text_view));
+
+ *x += border_width;
+ *y += border_width;
if (priv->top_window)
(*y) += priv->top_window->requisition.height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]