diff options
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index a1fb8cb5..bd9b63b5 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -2343,10 +2343,29 @@ static void draw_InputWidget_(const iInputWidget *d) { | |||
2343 | /* If buffered, just draw the buffered copy. */ | 2343 | /* If buffered, just draw the buffered copy. */ |
2344 | if (d->buffered && !isFocused) { | 2344 | if (d->buffered && !isFocused) { |
2345 | /* Most input widgets will use this, since only one is focused at a time. */ | 2345 | /* Most input widgets will use this, since only one is focused at a time. */ |
2346 | draw_TextBuf(d->buffered, addY_I2(drawPos, visLineOffsetY), white_ColorId); | 2346 | if (flags_Widget(w) & alignRight_WidgetFlag) { |
2347 | draw_TextBuf( | ||
2348 | d->buffered, | ||
2349 | addY_I2(init_I2(right_Rect(contentBounds) - d->buffered->size.x, drawPos.y), | ||
2350 | visLineOffsetY), | ||
2351 | white_ColorId); | ||
2352 | } | ||
2353 | else { | ||
2354 | draw_TextBuf(d->buffered, addY_I2(drawPos, visLineOffsetY), white_ColorId); | ||
2355 | } | ||
2347 | } | 2356 | } |
2348 | else if (isHint) { | 2357 | else if (isHint) { |
2349 | drawRange_Text(d->font, drawPos, uiAnnotation_ColorId, range_String(&d->hint)); | 2358 | if (flags_Widget(w) & alignRight_WidgetFlag) { |
2359 | drawAlign_Text(d->font, | ||
2360 | init_I2(right_Rect(contentBounds), drawPos.y), | ||
2361 | uiAnnotation_ColorId, | ||
2362 | right_Alignment, | ||
2363 | "%s", | ||
2364 | cstr_String(&d->hint)); | ||
2365 | } | ||
2366 | else { | ||
2367 | drawRange_Text(d->font, drawPos, uiAnnotation_ColorId, range_String(&d->hint)); | ||
2368 | } | ||
2350 | } | 2369 | } |
2351 | else { | 2370 | else { |
2352 | iAssert(~d->inFlags & isSensitive_InputWidgetFlag || size_Range(&visLines) == 1); | 2371 | iAssert(~d->inFlags & isSensitive_InputWidgetFlag || size_Range(&visLines) == 1); |