From 4ee8d6966b425368d4ad5739047a6f93dafe03ea Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 14 Dec 2009 19:12:23 +0000 Subject: [PATCH] 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: https://github.com/neutrino-images/ni-neutrino/commit/f48a82fa519a6c033830bf024802d4034ec23606 Author: Stefan Seyfried 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 --- src/gui/widget/progressbar.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/progressbar.cpp b/src/gui/widget/progressbar.cpp index 0bcad24d4..d699bb591 100644 --- a/src/gui/widget/progressbar.cpp +++ b/src/gui/widget/progressbar.cpp @@ -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;