mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +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
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include <zapit/zapit.h>
|
||||
|
||||
#if HAVE_COOL_HARDWARE
|
||||
#include <gui/widget/progressbar.h>
|
||||
#include <gui/components/cc_item_progressbar.h>
|
||||
#endif
|
||||
|
||||
extern CRemoteControl * g_RemoteControl;
|
||||
@@ -111,7 +111,7 @@ void CVolume::Init()
|
||||
}
|
||||
if (volscale)
|
||||
delete volscale;
|
||||
volscale = new CProgressBar(true, progress_w, progress_h, 50, 100, 80, true);
|
||||
volscale = new CProgressBar(progress_x, progress_y, progress_w, progress_h, colFrame, colBar, colShadow, COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1, true);
|
||||
|
||||
// mute icon
|
||||
mute_icon_dx = 0;
|
||||
@@ -250,8 +250,6 @@ void CVolume::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowa
|
||||
frameBuffer->paintBoxRel(x+ShadowOffset , y+ShadowOffset , (paintDigits) ? vbar_w - vbar_h : vbar_w + 1, vbar_h, colShadow, ROUNDED, (paintDigits) ? CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT : CORNER_ALL);
|
||||
// volumebar
|
||||
frameBuffer->paintBoxRel(x , y , (paintDigits) ? vbar_w - vbar_h : vbar_w + 1, vbar_h, colBar, ROUNDED, (paintDigits) ? CORNER_TOP_LEFT | CORNER_BOTTOM_LEFT : CORNER_ALL);
|
||||
// frame for progress
|
||||
frameBuffer->paintBoxRel(progress_x-pB, progress_y-pB, progress_w+pB*2, progress_h+pB*2, colFrame);
|
||||
// volume icon
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_VOLUME, icon_x, icon_y, 0, colBar);
|
||||
|
||||
@@ -343,8 +341,6 @@ void CVolume::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool nowa
|
||||
|
||||
void CVolume::refreshVolumebar(int current_volume)
|
||||
{
|
||||
// progressbar
|
||||
volscale->paintProgressBar2(progress_x, progress_y, current_volume);
|
||||
if (paintDigits) {
|
||||
// shadow for erase digits
|
||||
if (paintShadow)
|
||||
@@ -356,6 +352,9 @@ void CVolume::refreshVolumebar(int current_volume)
|
||||
snprintf(buff, 4, "%3d", current_volume);
|
||||
g_Font[VolumeFont]->RenderString(digit_x, digit_y, digit_w, buff, colContent);
|
||||
}
|
||||
// progressbar
|
||||
volscale->setValues(current_volume, 100);
|
||||
volscale->paint();
|
||||
}
|
||||
|
||||
bool CVolume::changeNotify(const neutrino_locale_t OptionName, void * data)
|
||||
|
Reference in New Issue
Block a user