improve the progressbar code

* disable "round corners" for the progressbars for now, does not look good
* if the progressbar is less than 5 pixels high, disable the border, this
 helps for the tiny bars in the infobar

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


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

Origin message was:
------------------
improve the progressbar code

* disable "round corners" for the progressbars for now, does not look good
* if the progressbar is less than 5 pixels high, disable the border, this
 helps for the tiny bars in the infobar

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


------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2009-12-14 19:12:23 +00:00
parent 84d4c005d9
commit 4ee8d6966b

View File

@@ -58,7 +58,14 @@ void CProgressBar::paintProgressBar ( const int pos_x,
fb_pixel_t active_col = activebar_col != 0 ? activebar_col : COL_INFOBAR_PLUS_7;
fb_pixel_t passive_col = passivebar_col != 0 ? passivebar_col : COL_INFOBAR_PLUS_3;
int c_rad = RADIUS_SMALL;
/* radius is 0 for now, since the rounded corner code is sufficiently
different from tuxbox.org's so that everything else looks 'strange' */
const int c_rad = 0;
/* if the bar is too small, do not draw the borders around it */
if (pb_height / 2 <= frame_widht)
frame_widht = 0;
// get icon size
int icon_w = 0, icon_h = 0;
icon_w = iconfile != NULL ? frameBuffer->getIconWidth(iconfile) : 0;