]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
- put cursor at beginning of text for better accessibility (patch from debian)
authormlichvar <mlichvar>
Thu, 12 Oct 2006 14:18:38 +0000 (14:18 +0000)
committermlichvar <mlichvar>
Thu, 12 Oct 2006 14:18:38 +0000 (14:18 +0000)
button.c
scale.c
textbox.c

index 74f33f47de48d4b70bda038bcb96b92ff1ec9a05..bbf0612ec07e01a9d85e03fe9e113b85a91c1ac0 100644 (file)
--- a/button.c
+++ b/button.c
@@ -126,6 +126,8 @@ static void buttonDrawIt(newtComponent co, int active, int pushed) {
 
        buttonDrawText(co, active, pushed);
     }
+    /* put cursor at beginning of text for better accessibility */
+    newtGotorc(co->top + (bu->compact ? 0 : 1) + pushed, co->left + 1 + pushed + 1);
 }
 
 static void buttonDrawText(newtComponent co, int active, int pushed) {
diff --git a/scale.c b/scale.c
index 2667af0c3be069a60061e94997cb5e7fa0773625..07cebd5a558aca1f9cbda1a74cf37c7c21e7d12b 100644 (file)
--- a/scale.c
+++ b/scale.c
@@ -88,4 +88,6 @@ static void scaleDraw(newtComponent co) {
         else
             SLsmg_write_char(' ');
     }
+    /* put cursor at beginning of text for better accessibility */
+    newtGotorc(co->top, co->left + xlabel);
 }
index d860da43090e47abbc031cf87c127454728be095..b2593c185885fcea6dfe1f9b712a10bd5a1158af 100644 (file)
--- a/textbox.c
+++ b/textbox.c
@@ -368,6 +368,8 @@ static void textboxDraw(newtComponent c) {
        newtGotorc(c->top + i, c->left);
        SLsmg_write_string(tb->lines[i + tb->topLine]);
     }
+    /* put cursor at beginning of text for better accessibility */
+    newtGotorc(c->top, c->left);
 }
 
 static struct eventResult textboxEvent(newtComponent co,