neutrino: port rounded corner code from tuxbox CVS

This allows to set all four corners separately. The default is
now to have all four corners rounded if radius is > 0 in paintBoxRel.
It also places hard coded integer numbers for CORNER_TOP and
CORNER_BOTTOM with the respective #defines.
This should make it much easier to port over code parts from tuxbox.org.
However, there are probably bugs and oversights in that I did not find
yet. Reports are welcome.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@45 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: b0b471210f
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2009-12-13 (Sun, 13 Dec 2009)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2009-12-13 22:23:23 +00:00
parent 46de288705
commit 587dbdaa78
31 changed files with 126 additions and 114 deletions

View File

@@ -596,7 +596,7 @@ void EventList::paintItem(unsigned int pos, t_channel_id channel_id)
bgcolor = COL_MENUCONTENT_PLUS_0;
}
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, color == COL_MENUCONTENTSELECTED ? ROUND_RADIUS : 0, 3);
frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, color == COL_MENUCONTENTSELECTED ? ROUND_RADIUS : 0);
if(liststart+pos<evtlist.size())
{
@@ -668,7 +668,7 @@ void EventList::paintHead(t_channel_id channel_id)
{
bool logo_ok = false;
frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);
frameBuffer->paintBoxRel(x,y, width,theight+0, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);
#ifndef FB_USE_PALETTE
logo_ok = g_PicViewer->DisplayLogo(channel_id, x+10, y+(theight-PIC_H)/2, PIC_W, PIC_H);
#endif
@@ -682,7 +682,7 @@ void EventList::paint(t_channel_id channel_id)
if (evtlist[0].eventID != 0)
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x+ width- 30, y+ 5 );
frameBuffer->paintBoxRel(x, y+theight, width, height-theight-iheight, COL_MENUCONTENT_PLUS_0, 0, 1);
frameBuffer->paintBoxRel(x, y+theight, width, height-theight-iheight, COL_MENUCONTENT_PLUS_0, 0, CORNER_TOP);
for(unsigned int count=0;count<listmaxshow;count++)
{
paintItem(count, channel_id);
@@ -722,7 +722,7 @@ void EventList::showFunctionBar (bool show)
// -- frameBuffer->paintBoxRel(x,y,w,h, COL_INFOBAR_SHADOW_PLUS_1);
//frameBuffer->paintBoxRel(bx,by,bw,bh, COL_MENUHEAD_PLUS_0);
frameBuffer->paintBoxRel(bx,by,bw,bh, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2);
frameBuffer->paintBoxRel(bx,by,bw,bh, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);
// -- Button: Timer Record & Channelswitch