From 4e66786513d57b4c44f588391c915627b5eb8ae7 Mon Sep 17 00:00:00 2001 From: mlichvar Date: Thu, 12 Oct 2006 14:18:38 +0000 Subject: [PATCH] - put cursor at beginning of text for better accessibility (patch from debian) --- button.c | 2 ++ scale.c | 2 ++ textbox.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/button.c b/button.c index 74f33f4..bbf0612 100644 --- 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 2667af0..07cebd5 100644 --- 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); } diff --git a/textbox.c b/textbox.c index d860da4..b2593c1 100644 --- 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, -- 2.47.2