mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
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:
@@ -28,6 +28,7 @@
|
||||
/* include <config.h> before <gui/filebrowser.h> to enable 64 bit file offsets */
|
||||
#include <gui/filebrowser.h>
|
||||
|
||||
#include <gui/components/cc_frm.h>
|
||||
#include <gui/widget/buttons.h>
|
||||
#include <gui/widget/icons.h>
|
||||
#include <gui/widget/messagebox.h>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user