Draw strings vertically aligned on some windows.
This commit is contained in:
@@ -786,11 +786,12 @@ void QueryString::DrawEditBox(const Window *w, int wid) const
|
||||
/* If we have a marked area, draw a background highlight. */
|
||||
if (tb->marklength != 0) GfxFillRect(delta + tb->markxoffs, 0, delta + tb->markxoffs + tb->marklength - 1, bottom - top, PC_GREY);
|
||||
|
||||
DrawString(delta, tb->pixels, 0, tb->buf, TC_YELLOW);
|
||||
DrawString(delta, tb->pixels, Center(0, bottom - top), tb->buf, TC_YELLOW);
|
||||
|
||||
bool focussed = w->IsWidgetGloballyFocused(wid) || IsOSKOpenedFor(w, wid);
|
||||
if (focussed && tb->caret) {
|
||||
int caret_width = GetStringBoundingBox("_").width;
|
||||
DrawString(tb->caretxoffs + delta, tb->caretxoffs + delta + caret_width, 0, "_", TC_WHITE);
|
||||
DrawString(tb->caretxoffs + delta, tb->caretxoffs + delta + caret_width, Center(0, bottom - top), "_", TC_WHITE);
|
||||
}
|
||||
|
||||
_cur_dpi = old_dpi;
|
||||
|
||||
Reference in New Issue
Block a user