From f1b1a1ae3a825687d57eb77b562ed2a5fc6b999f Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 1 Dec 2009 13:26:31 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : librerie Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@19694 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/applicat.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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