mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
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
This commit is contained in:
@@ -487,7 +487,7 @@ void CMenuWidget::paint()
|
||||
sb_width=0;
|
||||
|
||||
//frameBuffer->paintBoxRel(x,y, width+sb_width,hheight, COL_MENUHEAD_PLUS_0);
|
||||
frameBuffer->paintBoxRel(x, y, width+sb_width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, 1); //FIXME rounded
|
||||
frameBuffer->paintBoxRel(x, y, width+sb_width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); //FIXME rounded
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+hheight+1, width-40, l_name, COL_MENUHEAD, 0, true); // UTF-8
|
||||
frameBuffer->paintIcon(iconfile, x + 8, y + 5);
|
||||
@@ -514,12 +514,12 @@ void CMenuWidget::paintItems()
|
||||
{
|
||||
int sbh= ((item_height-4) / total_pages);
|
||||
// items box
|
||||
frameBuffer->paintBoxRel(x,item_start_y, width+15,item_height+10, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);
|
||||
frameBuffer->paintBoxRel(x, item_start_y, width+15, item_height+10, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);
|
||||
// scrollbar
|
||||
frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_MENUCONTENT_PLUS_1);
|
||||
frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page* sbh, 11, sbh, COL_MENUCONTENT_PLUS_3);
|
||||
} else
|
||||
frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, 2);//FIXME round
|
||||
frameBuffer->paintBoxRel(x, item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//FIXME round
|
||||
|
||||
int ypos=item_start_y;
|
||||
for (unsigned int count = 0; count < items.size(); count++) {
|
||||
@@ -600,9 +600,9 @@ int CMenuOptionNumberChooser::paint(bool selected, bool last)
|
||||
}
|
||||
|
||||
if(selected)
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
|
||||
else if(last)
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
|
||||
else
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
|
||||
|
||||
@@ -754,9 +754,9 @@ int CMenuOptionChooser::paint( bool selected , bool last)
|
||||
}
|
||||
|
||||
if(selected)
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
|
||||
else if(last)
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
|
||||
else
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
|
||||
|
||||
@@ -915,9 +915,9 @@ int CMenuOptionStringChooser::paint( bool selected, bool last )
|
||||
}
|
||||
|
||||
if(selected)
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
|
||||
else if(last)
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
|
||||
else
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor);
|
||||
|
||||
@@ -1013,9 +1013,9 @@ int CMenuOptionLanguageChooser::paint( bool selected, bool last )
|
||||
}
|
||||
|
||||
if(selected)
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
|
||||
else if(last)
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
|
||||
else
|
||||
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor);
|
||||
|
||||
@@ -1147,9 +1147,9 @@ int CMenuForwarder::paint(bool selected, bool last)
|
||||
}
|
||||
|
||||
if(selected)
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 3); //FIXME
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
|
||||
else if(last)
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, 2); //FIXME
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
|
||||
else
|
||||
frameBuffer->paintBoxRel(x, y, dx, height, bgcolor);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposX, y+ height, dx- (stringstartposX - x), l_text, color, 0, true); // UTF-8
|
||||
|
Reference in New Issue
Block a user