[vte/wip/egmont/bidi: 12/16] widget, bidi: Denote the direction in the I-beam cursor
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/egmont/bidi: 12/16] widget, bidi: Denote the direction in the I-beam cursor
- Date: Sun, 30 Jun 2019 13:12:36 +0000 (UTC)
commit 315be818ba304da0349c074c52266dc06e17f5e1
Author: Egmont Koblinger <egmont gmail com>
Date: Sat Jun 1 15:55:58 2019 +0200
widget,bidi: Denote the direction in the I-beam cursor
Show the direction of the character underneath if the paragraph contains
a character of foreign direction. Currently for I-beam cursor shape only.
src/vte.cc | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/vte.cc b/src/vte.cc
index ebce50e6..d5534b9c 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9541,6 +9541,16 @@ Terminal::paint_cursor()
_vte_draw_fill_rectangle(m_draw,
x, y + m_char_padding.top, stem_width, m_char_ascent +
m_char_descent,
&bg, VTE_DRAW_OPAQUE);
+
+ /* Show the direction of the current character if the paragraph contains a mixture
+ * of directions.
+ * FIXME Do this for the other cursor shapes, too. Need to find a good visual
design. */
+ if (focus && bidirow->has_foreign())
+ _vte_draw_fill_rectangle(m_draw,
+ bidirow->vis_is_rtl(vcol) ? x - stem_width : x +
stem_width,
+ y + m_char_padding.top,
+ stem_width, stem_width,
+ &bg, VTE_DRAW_OPAQUE);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]