filebrowser: using CComponentsHeader to paint header

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1830ccd8ab
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-05-28 (Tue, 28 May 2013)

Origin message was:
------------------
- filebrowser: using CComponentsHeader to paint header

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2013-05-28 01:51:18 +02:00
parent 81ce87bca8
commit a6840e6188

View File

@@ -28,6 +28,7 @@
/* include <config.h> before <gui/filebrowser.h> to enable 64 bit file offsets */ /* include <config.h> before <gui/filebrowser.h> to enable 64 bit file offsets */
#include <gui/filebrowser.h> #include <gui/filebrowser.h>
#include <gui/components/cc_frm.h>
#include <gui/widget/buttons.h> #include <gui/widget/buttons.h>
#include <gui/widget/icons.h> #include <gui/widget/icons.h>
#include <gui/widget/messagebox.h> #include <gui/widget/messagebox.h>
@@ -1375,7 +1376,6 @@ void CFileBrowser::paintHead()
char *l_name; char *l_name;
int i = 0; int i = 0;
int l; int l;
frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP);
#ifdef ENABLE_INTERNETRADIO #ifdef ENABLE_INTERNETRADIO
if(m_Mode == ModeSC) 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()); 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'; l_name[--l] = '\0';
/* still too long? the last part is probably more interesting than the first part... */ /* still too long? the last part is probably more interesting than the first part... */
while ((fnt_title->getRenderWidth(&l_name[i]) > width - 11) while ((fnt_title->getRenderWidth(&l_name[i]) > width - 20) && (i < l))
&& (i < l))
i++; 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); free(l_name);
} }