From 1455c26b793be67f5c47a7f7dbf06c9c263d8e2a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 17 Jun 2021 07:09:20 +0300 Subject: Cleanup --- src/ui/inputwidget.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/ui') diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 9571a97e..b108ee17 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c @@ -1365,13 +1365,7 @@ static void draw_InputWidget_(const iInputWidget *d) { } iPaint p; init_Paint(&p); - /* `lines` is already up to date and ready for drawing. */ - /* TODO: If empty, draw the hint. */ -// iString *text = visText_InputWidget_(d); -// if (isWhite_(text) && !isEmpty_String(&d->hint)) { -// set_String(text, &d->hint); -// isHint = iTrue; -// } + /* `lines` is already up to date and ready for drawing. */ fillRect_Paint( &p, bounds, isFocused ? uiInputBackgroundFocused_ColorId : uiInputBackground_ColorId); drawRectThickness_Paint(&p, @@ -1382,7 +1376,6 @@ static void draw_InputWidget_(const iInputWidget *d) { setClip_Paint(&p, adjusted_Rect(bounds, init_I2(d->leftPadding, 0), init_I2(-d->rightPadding, w->flags & extraPadding_WidgetFlag ? -gap_UI / 2 : 0))); const iRect contentBounds = contentBounds_InputWidget_(d); -// const iInt2 textOrigin = textOrigin_InputWidget_(d); //, cstr_String(text)); iInt2 drawPos = topLeft_Rect(contentBounds); const int fg = isHint ? uiAnnotation_ColorId : isFocused && !isEmpty_Array(&d->text) ? uiInputTextFocused_ColorId @@ -1426,19 +1419,6 @@ static void draw_InputWidget_(const iInputWidget *d) { drawPos.y += lineHeight_Text(d->font); } } -// if (d->buffered && !isFocused && !isHint) { -// /* Most input widgets will use this, since only one is focused at a time. */ -// draw_TextBuf(d->buffered, textOrigin, white_ColorId); -// } -// else { -// draw_Text(d->font, -// textOrigin, -// isHint ? uiAnnotation_ColorId -// : isFocused && !isEmpty_Array(&d->text) ? uiInputTextFocused_ColorId -// : uiInputText_ColorId, -// "%s", -// cstr_String(text)); -// } unsetClip_Paint(&p); /* Cursor blinking. */ if (isFocused && d->cursorVis) { @@ -1482,7 +1462,6 @@ static void draw_InputWidget_(const iInputWidget *d) { deinit_String(&cur); } } -// delete_String(text); drawChildren_Widget(w); } -- cgit v1.2.3