diff --git a/include/applicat.cpp b/include/applicat.cpp index 3a1435ddb..6a31365de 100755 --- a/include/applicat.cpp +++ b/include/applicat.cpp @@ -54,11 +54,18 @@ HIDDEN void paint_background(WINDOW win) else xvt_dwin_clear(win, MASK_DARK_COLOR); - const int BIGY = 3*ROWY/2; + int BIGY = 3*ROWY/2; xvtil_set_font(win, XVT_FFN_TIMES, XVT_FS_BOLD | XVT_FS_ITALIC, BIGY); const char* t = main_app().title(); int w = xvt_dwin_get_text_width(win, t, -1); + if (w > r.right) + { + BIGY = BIGY*r.right/w; + xvtil_set_font(win, XVT_FFN_TIMES, XVT_FS_BOLD | XVT_FS_ITALIC, BIGY); + w = xvt_dwin_get_text_width(win, t, -1); + } + int x = (r.right-w)/2, y = r.top+BIGY+ROWY; if (ADVANCED_GRAPHICS) { // Disegna ombra