File: 070_cursor_a11y.patch

package info (click to toggle)
newt 0.52.2-10%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 836 kB
  • ctags: 27
  • sloc: makefile: 186; sh: 5
file content (23 lines) | stat: -rw-r--r-- 888 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -ruN newt-0.52.2-old/button.c newt-0.52.2/button.c
--- newt-0.52.2-old/button.c	2006-01-19 21:48:07.000000000 +0000
+++ newt-0.52.2/button.c	2006-01-19 21:51:53.000000000 +0000
@@ -112,7 +112,9 @@
 	SLsmg_write_char('<');
 	write_string_int(bu->text, NULL);
 	SLsmg_write_char('>');
-    } else {
+        /* put cursor at beginning of text for better accessibility */
+        newtGotorc(co->top+ pushed, co->left + 1 + pushed + 1);
+} else {
 	if (pushed) {
 	    SLsmg_set_color(NEWT_COLORSET_BUTTON);
 	    newtDrawBox(co->left + 1, co->top + 1, co->width - 1, 3, 0);
@@ -142,6 +144,8 @@
     SLsmg_write_char(' ');
     write_string_int(bu->text, NULL);
     SLsmg_write_char(' ');
+    /* put cursor at beginning of text for better accessibility */
+    newtGotorc(co->top + 1 + pushed, co->left + 1 + pushed + 1);
 }
 
 static struct eventResult buttonEvent(newtComponent co,