[gtk+] textview: set text direction information on text handles
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] textview: set text direction information on text handles
- Date: Thu, 11 Jun 2015 15:56:57 +0000 (UTC)
commit 8d56346f9bdb8a82c16fe56708148e9392d9025f
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 10 20:53:12 2015 +0200
textview: set text direction information on text handles
This makes them point to the correct place, given the theme supports
this.
gtk/gtktextview.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 2badc83..7edb925 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4732,6 +4732,9 @@ gtk_text_view_set_handle_position (GtkTextView *text_view,
}
else
{
+ GtkTextDirection dir = GTK_TEXT_DIR_LTR;
+ GtkTextAttributes attributes = { 0 };
+
_gtk_text_handle_set_visible (priv->text_handle, pos, TRUE);
rect.x = CLAMP (x, 0, SCREEN_WIDTH (text_view));
@@ -4739,6 +4742,11 @@ gtk_text_view_set_handle_position (GtkTextView *text_view,
_text_window_to_widget_coords (text_view, &rect.x, &rect.y);
_gtk_text_handle_set_position (priv->text_handle, pos, &rect);
+
+ if (gtk_text_iter_get_attributes (iter, &attributes))
+ dir = attributes.direction;
+
+ _gtk_text_handle_set_direction (priv->text_handle, pos, dir);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]