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,
|