diff --git a/src/pc/djui/djui_font.c b/src/pc/djui/djui_font.c index 389e54546..00efe9793 100644 --- a/src/pc/djui/djui_font.c +++ b/src/pc/djui/djui_font.c @@ -19,7 +19,7 @@ static void djui_font_normal_render_char(char* c) { } static f32 djui_font_normal_char_width(char* c) { - if (*c == ' ') { return 0.30f; } + if (*c == ' ') { return 0.20f; } extern const f32 font_normal_widths[]; return djui_unicode_get_sprite_width(c, font_normal_widths); } diff --git a/src/pc/djui/djui_inputbox.c b/src/pc/djui/djui_inputbox.c index a4ad148ff..272de89c0 100644 --- a/src/pc/djui/djui_inputbox.c +++ b/src/pc/djui/djui_inputbox.c @@ -476,6 +476,10 @@ static bool djui_inputbox_render(struct DjuiBase* base) { const struct DjuiFont* font = gDjuiFonts[0]; djui_rect_render(base); + // Shift the text away from the left side a tad + comp->x += 2; + comp->width -= 2; + // shift the viewing window to keep the selection in view djui_inputbox_keep_selection_in_view(inputbox); @@ -483,7 +487,7 @@ static bool djui_inputbox_render(struct DjuiBase* base) { f32 translatedX = comp->x + inputbox->viewX; f32 translatedY = comp->y + DJUI_INPUTBOX_YOFF; djui_gfx_position_translate(&translatedX, &translatedY); - create_dl_translation_matrix(DJUI_MTX_PUSH, (int)translatedX, (int)translatedY, 0); + create_dl_translation_matrix(DJUI_MTX_PUSH, translatedX, translatedY, 0); // compute font size f32 translatedFontSize = font->defaultFontScale;