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

@@ -551,7 +551,7 @@ void CPictureViewerGui::paintItem(int pos)
bgcolor = COL_MENUCONTENTSELECTED_PLUS_0;
}
frameBuffer->paintBoxRel(x,ypos, width-15, fheight, bgcolor, liststart+pos == selected ? ROUND_RADIUS : 0, 3);
frameBuffer->paintBoxRel(x, ypos, width-15, fheight, bgcolor, liststart+pos == selected ? ROUND_RADIUS : 0);
if(liststart+pos<playlist.size())
{
std::string tmp = playlist[liststart+pos].Name;
@@ -574,7 +574,7 @@ void CPictureViewerGui::paintHead()
{
// printf("paintHead{\n");
std::string strCaption = g_Locale->getText(LOCALE_PICTUREVIEWER_HEAD);
frameBuffer->paintBoxRel(x,y, width,theight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1);
frameBuffer->paintBoxRel(x, y, width, theight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP);
frameBuffer->paintIcon("mp3.raw",x+7,y+10);
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+35,y+theight+0, width- 45, strCaption, COL_MENUHEAD, 0, true); // UTF-8
int ypos=y+0;
@@ -599,7 +599,7 @@ void CPictureViewerGui::paintFoot()
// printf("paintFoot{\n");
int ButtonWidth = (width-20) / 4;
int ButtonWidth2 = (width-50) / 2;
frameBuffer->paintBoxRel(x,y+(height-2*buttonHeight), width,2*buttonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 2);
frameBuffer->paintBoxRel(x, y+(height-2*buttonHeight), width, 2*buttonHeight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);
frameBuffer->paintHLine(x, x+width, y+(height-2*buttonHeight), COL_INFOBAR_SHADOW_PLUS_0);
if (!playlist.empty())