mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
timerlist: using CComponentsHeader to paint header
* move info icon to buttonbar
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2cc07765c7
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-05-26 (Sun, 26 May 2013)
Origin message was:
------------------
- timerlist: using CComponentsHeader to paint header
* move info icon to buttonbar
------------------
This commit was generated by Migit
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
#include <gui/filebrowser.h>
|
#include <gui/filebrowser.h>
|
||||||
#include <gui/infoviewer.h>
|
#include <gui/infoviewer.h>
|
||||||
|
|
||||||
|
#include <gui/components/cc.h>
|
||||||
#include <gui/widget/buttons.h>
|
#include <gui/widget/buttons.h>
|
||||||
#include <gui/widget/hintbox.h>
|
#include <gui/widget/hintbox.h>
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
@@ -856,39 +857,25 @@ void CTimerList::paintItem(int pos)
|
|||||||
|
|
||||||
void CTimerList::paintHead()
|
void CTimerList::paintHead()
|
||||||
{
|
{
|
||||||
int icol_w, icol_h;
|
CComponentsHeader *header = new CComponentsHeader(x, y, width, theight, LOCALE_TIMERLIST_NAME, NEUTRINO_ICON_TIMER);
|
||||||
|
header->paint();
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_TIMER, &icol_w, &icol_h);
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_TIMER, x+5, y, theight);
|
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+icol_w+15, y+theight+0, width - 45,
|
|
||||||
g_Locale->getText(LOCALE_TIMERLIST_NAME), COL_MENUHEAD, 0, true); // UTF-8
|
|
||||||
|
|
||||||
//don't show info button on empty timerlist
|
|
||||||
if (!timerlist.empty())
|
|
||||||
{
|
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_INFO, &icol_w, &icol_h);
|
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, x + width - icol_w - 10, y, theight);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct button_label TimerListButtons[4] =
|
const struct button_label TimerListButtons[5] =
|
||||||
{
|
{
|
||||||
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERLIST_DELETE },
|
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERLIST_DELETE },
|
||||||
{ NEUTRINO_ICON_BUTTON_GREEN , LOCALE_TIMERLIST_NEW },
|
{ NEUTRINO_ICON_BUTTON_GREEN , LOCALE_TIMERLIST_NEW },
|
||||||
{ NEUTRINO_ICON_BUTTON_YELLOW , LOCALE_TIMERLIST_RELOAD },
|
{ NEUTRINO_ICON_BUTTON_YELLOW , LOCALE_TIMERLIST_RELOAD },
|
||||||
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY }
|
{ NEUTRINO_ICON_BUTTON_OKAY , LOCALE_TIMERLIST_MODIFY },
|
||||||
|
{ NEUTRINO_ICON_BUTTON_INFO_SMALL, NONEXISTANT_LOCALE }
|
||||||
};
|
};
|
||||||
|
|
||||||
void CTimerList::paintFoot()
|
void CTimerList::paintFoot()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (timerlist.empty())
|
if (timerlist.empty())
|
||||||
::paintButtons(x, y + height, width, 2, &(TimerListButtons[1]), width);
|
::paintButtons(x, y + height, width, 2, &(TimerListButtons[1]), width);
|
||||||
else
|
else
|
||||||
::paintButtons(x, y + height, width, 4, TimerListButtons, width);
|
::paintButtons(x, y + height, width, 5, TimerListButtons, width);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTimerList::paint()
|
void CTimerList::paint()
|
||||||
|
Reference in New Issue
Block a user