mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CComponents: add progressbar class to cc-items
CProgressbar moved into components sub directory and adapt includes.
Progressbar objects are now usable as cc-item
TODO:
-some color and size corrections
-found some dub codes for sig and snr-bars, needs rework
Origin commit data
------------------
Commit: 860be9a412
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-01 (Mon, 01 Apr 2013)
This commit is contained in:
@@ -120,8 +120,10 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
#define BAR_WIDTH 150
|
||||
#define BAR_HEIGHT 12
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
sigscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||
sigscale = new CProgressBar(/*true, BAR_WIDTH, BAR_HEIGHT*/);
|
||||
sigscale->setBlink();
|
||||
snrscale = new CProgressBar(/*true, BAR_WIDTH, BAR_HEIGHT*/);
|
||||
snrscale->setBlink();
|
||||
lastsnr = lastsig = -1;
|
||||
|
||||
neutrino_msg_t msg;
|
||||
@@ -910,7 +912,8 @@ void CStreamInfo2::showSNR ()
|
||||
posy = yypos + (mheight/2)-5;
|
||||
posx = x + 10;
|
||||
sprintf(percent, "%d%%", sig);
|
||||
sigscale->paintProgressBar2(posx - 1, posy, sig);
|
||||
sigscale->setProgress(posx - 1, posy, BAR_WIDTH, BAR_HEIGHT, sig, 100);
|
||||
sigscale->paint();
|
||||
|
||||
posx = posx + barwidth + 3;
|
||||
frameBuffer->paintBoxRel(posx, posy -1, sw, mheight-8, COL_MENUHEAD_PLUS_0);
|
||||
@@ -922,7 +925,9 @@ void CStreamInfo2::showSNR ()
|
||||
posy = yypos + mheight + 5;
|
||||
posx = x + 10;
|
||||
sprintf(percent, "%d%% SNR", snr);
|
||||
snrscale->paintProgressBar2(posx - 1, posy+2, snr);
|
||||
snrscale->setProgress(posx - 1, posy+2, BAR_WIDTH, BAR_HEIGHT, snr, 100);
|
||||
snrscale->paint();
|
||||
// snrscale->paintProgressBar2(posx - 1, posy+2, snr);
|
||||
|
||||
posx = posx + barwidth + 3;
|
||||
frameBuffer->paintBoxRel(posx, posy - 1, sw, mheight-8, COL_MENUHEAD_PLUS_0, 0, true);
|
||||
|
Reference in New Issue
Block a user