diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 329210d56..0336e73e2 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -28,6 +28,7 @@ /* include before to enable 64 bit file offsets */ #include +#include #include #include #include @@ -1375,7 +1376,6 @@ void CFileBrowser::paintHead() char *l_name; int i = 0; int l; - frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP); #ifdef ENABLE_INTERNETRADIO if(m_Mode == ModeSC) l = asprintf(&l_name, "%s %s", g_Locale->getText(LOCALE_AUDIOPLAYER_ADD_SC), FILESYSTEM_ENCODING_TO_UTF8_STRING(name).c_str()); @@ -1397,11 +1397,12 @@ void CFileBrowser::paintHead() l_name[--l] = '\0'; /* still too long? the last part is probably more interesting than the first part... */ - while ((fnt_title->getRenderWidth(&l_name[i]) > width - 11) - && (i < l)) + while ((fnt_title->getRenderWidth(&l_name[i]) > width - 20) && (i < l)) i++; - fnt_title->RenderString(x+10,y+theight+1, width-11, &l_name[i], COL_MENUHEAD, 0, true); + CComponentsHeader header(x, y, width, theight, &l_name[i], NULL /*no header icon*/); + header.paint(); + free(l_name); }