diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 184545f21..6626f4747 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1065,9 +1065,14 @@ menu.hint_power_leds Konfiguriert das Verhalten der LEDs an der Power-Taste menu.hint_pref_lang Wählen Sie ihre bevorzugte Tonspur und EPG-Sprache,\ndie Einstellung 'none' deaktiviert diese Option menu.hint_pref_subs Wählen Sie ihre bevorzugte Untertitel-Sprache,\ndie Einstellung 'none' deaktiviert diese Option menu.hint_progressbar Wählen Sie die Optionen für die Fortschrittsbalken-Anzeige -menu.hint_progressbar_color Bei aktivierter Option werden alle Fortschrittsbalken in Farbe und nicht im klassischen Weiß angezeigt -menu.hint_progressbar_design Stellen Sie das Design des Fortschrittsbalkens ein +menu.hint_progressbar_color Erscheinungsbild der Fortschrittsbalken auswählen +menu.hint_progressbar_gradient Fügt dem Fortschrittsbalken einen vertikalen Helligkeitsverlauf hinzu. menu.hint_progressbar_infobar_position Wählt die Optionen des Fortschrittsbalkens in der Infobar +menu.hint_progressbar_preview Mit der OK-Taste können Sie den Stand des Fortschrittsbalkens ändern +menu.hint_progressbar_timescale_green Hier können Sie den grünen Farbanteil bunter Fortschrittsbalken anpassen +menu.hint_progressbar_timescale_invert Wählen Sie den Farbverlauf +menu.hint_progressbar_timescale_red Hier können Sie den roten Farbanteil bunter Fortschrittsbalken anpassen +menu.hint_progressbar_timescale_yellow Hier können Sie den gelben Farbanteil bunter Fortschrittsbalken anpassen menu.hint_protection Schützen Sie Inhalte per PIN-Code\nStandard-PIN ist 0000 menu.hint_radiomode Schaltet zum Radio-Modus menu.hint_reboot Startet die Box neu\nDer Neustart erfolgt ohne Bestätigung! @@ -1320,11 +1325,22 @@ miscsettings.progressbar_design_0 Punkte miscsettings.progressbar_design_1 vertikale Balken miscsettings.progressbar_design_2 horizontale Balken miscsettings.progressbar_design_3 Farbverlauf +miscsettings.progressbar_design_4 monochrom +miscsettings.progressbar_design_long Design +miscsettings.progressbar_gradient 3D-Effekt miscsettings.progressbar_infobar_position Position miscsettings.progressbar_infobar_position_0 Standard miscsettings.progressbar_infobar_position_1 unterhalb Kanalname miscsettings.progressbar_infobar_position_2 unterhalb Kanalname (schmal) miscsettings.progressbar_infobar_position_3 zwischen EPG-Events (schmal) +miscsettings.progressbar_preview Vorschau +miscsettings.progressbar_timescale Zeitskala +miscsettings.progressbar_timescale_green Grün +miscsettings.progressbar_timescale_green_red von Grün nach Rot +miscsettings.progressbar_timescale_invert Farbverlauf +miscsettings.progressbar_timescale_red Rot +miscsettings.progressbar_timescale_red_green von Rot nach Grün +miscsettings.progressbar_timescale_yellow Gelb miscsettings.radiotext Radiotext miscsettings.shutdown_count Komplett ausschalten nach miscsettings.shutdown_count_hint1 Zeit (in Minuten), nach der vom Standby in @@ -1623,6 +1639,7 @@ opkg.title Paketverwaltung opkg.upgrade Installierte Pakete aktualisieren options.default Voreinstellungen benutzen options.fb framebuffer +options.hint_default Setzen Sie die Werte auf die Voreinstellung zurück. options.ntp_off DVB options.ntp_on NTP options.null null diff --git a/data/locale/english.locale b/data/locale/english.locale index e295cb317..6c7d5e749 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1065,9 +1065,14 @@ menu.hint_power_leds Configure power-button LEDs behavior menu.hint_pref_lang Select preferred audio and EPG language\nselect 'none' to disable menu.hint_pref_subs Select preferred subtitle language\nselect 'none' to disable menu.hint_progressbar Select the options for the progressbar -menu.hint_progressbar_color Show colored progressbar -menu.hint_progressbar_design Here you can choose the design of progressbar with active color option +menu.hint_progressbar_color Change appearance of progress bars +menu.hint_progressbar_gradient Add a vertical brightness gradient to progress bars menu.hint_progressbar_infobar_position Selects the options of progressbar in the infobar +menu.hint_progressbar_preview Use OK to change the current progressbar state +menu.hint_progressbar_timescale_green Choose the green portion of colored progressbars +menu.hint_progressbar_timescale_invert Select your preferred color gradient +menu.hint_progressbar_timescale_red Choose the red portion of colored progressbars +menu.hint_progressbar_timescale_yellow Choose the yellow portion of colored progressbars menu.hint_protection Protect content by PIN code\nDefault PIN 0000 menu.hint_radiomode Switch box to radio mode menu.hint_reboot Reboot box\nNo confirmation @@ -1316,15 +1321,26 @@ miscsettings.infoclock Clock miscsettings.progressbar Progressbar miscsettings.progressbar_color Color miscsettings.progressbar_design Design -miscsettings.progressbar_design_0 points -miscsettings.progressbar_design_1 vertical bars -miscsettings.progressbar_design_2 horizontal bars -miscsettings.progressbar_design_3 colored +miscsettings.progressbar_design_0 colored points +miscsettings.progressbar_design_1 colored vertical lines +miscsettings.progressbar_design_2 colored horizontal lines +miscsettings.progressbar_design_3 colored bar +miscsettings.progressbar_design_4 monochrome +miscsettings.progressbar_design_long Design +miscsettings.progressbar_gradient 3D effect miscsettings.progressbar_infobar_position Position miscsettings.progressbar_infobar_position_0 standard miscsettings.progressbar_infobar_position_1 below channel name miscsettings.progressbar_infobar_position_2 small below channel name miscsettings.progressbar_infobar_position_3 narrow between EPG-Events +miscsettings.progressbar_preview Preview +miscsettings.progressbar_timescale Time scale +miscsettings.progressbar_timescale_green green +miscsettings.progressbar_timescale_green_red from green to red +miscsettings.progressbar_timescale_invert Color gradient +miscsettings.progressbar_timescale_red red +miscsettings.progressbar_timescale_red_green from red to green +miscsettings.progressbar_timescale_yellow yellow miscsettings.radiotext Radiotext miscsettings.shutdown_count In standby, switch off after miscsettings.shutdown_count_hint1 time (in minutes) to switch from standby @@ -1623,6 +1639,7 @@ opkg.title Package Management opkg.upgrade Upgrade installed packages options.default Reset to defaults options.fb framebuffer +options.hint_default Reset the values to their defaults options.ntp_off DVB options.ntp_on NTP options.null null diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 15c6b1251..fa918d333 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1942,7 +1942,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) fb_pixel_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE_TEXT; int xtheight=fheight-2; int rec_mode; - if(g_settings.channellist_extended) + if(g_settings.channellist_progressbar_design != CProgressBar::PB_OFF) { prg_offset = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00:00"); title_offset=6; @@ -2037,23 +2037,13 @@ void CChannelList::paintItem(int pos, const bool firstpaint) else l = snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->getName().c_str()); - int pb_space = prg_offset - title_offset; - bool pb_colored = ((g_settings.channellist_extended == 2) && g_settings.progressbar_color); - int pb_frame = pb_colored ? 0 : 1; - CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4, pb_space, fheight/2, - color, bgcolor, COL_MENUCONTENTDARK_PLUS_0, color, COL_MENUCONTENT_PLUS_1, - pb_colored, 0, 100, 70); - pb.setCornerType(0); - pb.setFrameThickness(pb_frame); - - int pb_max = pb_space - (2*pb_frame); if (!(p_event->description.empty())) { snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l,g_settings.channellist_epgtext_align_right ? " ":" - "); unsigned int ch_name_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(nameAndDescription); unsigned int ch_desc_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(p_event->description); int max_desc_len = width - numwidth - prg_offset - ch_name_len - 15 - 20; // 15 = scrollbar, 20 = spaces - if (chan->scrambled || (g_settings.channellist_extended ||g_settings.channellist_epgtext_align_right)) + if (chan->scrambled || g_settings.channellist_epgtext_align_right) max_desc_len -= icon_space+g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getWidth(); /* do we need space for the lock/rec icon? */ if (max_desc_len < 0) @@ -2061,7 +2051,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) if ((int) ch_desc_len > max_desc_len) ch_desc_len = max_desc_len; - if(g_settings.channellist_extended) { + if(g_settings.channellist_progressbar_design != CProgressBar::PB_OFF) { if(displayNext) { struct tm *pStartZeit = localtime(&p_event->startTime); @@ -2074,6 +2064,15 @@ void CChannelList::paintItem(int pos, const bool firstpaint) { time_t jetzt=time(NULL); int runningPercent = 0; + int pb_space = prg_offset - title_offset; + CProgressBar pb(x+5+numwidth + title_offset, ypos + fheight/4 + 2, pb_space + 2, fheight/2 - 4, + 0, COL_MENUCONTENT_PLUS_0, COL_MENUCONTENTDARK_PLUS_0, COL_INFOBAR_PLUS_7, COL_INFOBAR_PLUS_3); + pb.setType(CProgressBar::PB_TIMESCALE); + pb.setDesign(g_settings.channellist_progressbar_design); + pb.setCornerType(0); + pb.setFrameThickness(0); // no frame + pb.doPaintBg(false); // no background + int pb_max = pb_space - 4; if (((jetzt - p_event->startTime + 30) / 60) < 0 ) { @@ -2086,10 +2085,24 @@ void CChannelList::paintItem(int pos, const bool firstpaint) runningPercent = pb_max; // later on which can be fatal... } - if (liststart + pos != selected) - pb.setPassiveColor(COL_MENUCONTENT_PLUS_3); - else - pb.setPassiveColor(COL_MENUCONTENTSELECTED_PLUS_2); + if (g_settings.progressbar_design != CProgressBar::PB_MONO) { + if (liststart + pos != selected) { + fb_pixel_t pbgcol = COL_MENUCONTENT_PLUS_1; + if (pbgcol == bgcolor) + pbgcol = COL_MENUCONTENT_PLUS_0; + pb.setStatusColors(COL_MENUCONTENT_PLUS_3, pbgcol); + } else { + fb_pixel_t pbgcol = COL_MENUCONTENTSELECTED_PLUS_0; + if (pbgcol == bgcolor) + pbgcol = COL_MENUCONTENT_PLUS_0; + pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, pbgcol); + } + } else { + if (liststart + pos != selected) + pb.setStatusColors(COL_MENUCONTENT_PLUS_3, COL_MENUCONTENT_PLUS_1); + else + pb.setStatusColors(COL_MENUCONTENTSELECTED_PLUS_2, COL_MENUCONTENTSELECTED_PLUS_0); + } pb.setValues(runningPercent, pb_max); pb.paint(); } @@ -2106,15 +2119,6 @@ void CChannelList::paintItem(int pos, const bool firstpaint) } } else { - if(g_settings.channellist_extended) { - if (liststart + pos != selected) - pb.setPassiveColor(COL_MENUCONTENT_PLUS_1); - else - pb.setPassiveColor(COL_MENUCONTENTSELECTED_PLUS_2); - pb.setValues(0, pb_max); - pb.setZeroLine(); - pb.paint(); - } //name g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10+prg_offset, ypos+ fheight, width- numwidth- 40- 15-prg_offset, nameAndDescription, color); } diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index 7b44dee5b..8af1782a0 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -123,11 +123,8 @@ void CSignalBar::initVarSigBar() void CSignalBar::initSBarScale() { //create scale object if required - if (sb_scale == NULL){ + if (sb_scale == NULL) sb_scale = new CProgressBar(); - //we want colored scale! - sb_scale->setBlink(); - } //move and set dimensions int scale_y = (sb_item_height/2 - sb_scale_height/2); diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp index 3aefc7363..0b948b783 100644 --- a/src/gui/components/cc_item_progressbar.cpp +++ b/src/gui/components/cc_item_progressbar.cpp @@ -27,6 +27,7 @@ #include #endif +#include #include #include @@ -42,9 +43,7 @@ CProgressBar::CProgressBar( const int x_pos, const int y_pos, const int w, const int h, fb_pixel_t color_frame, fb_pixel_t color_body, fb_pixel_t color_shadow, const fb_pixel_t active_col, const fb_pixel_t passive_col, - const bool blinkenlights, const int r, const int g, const int b, - const bool inv, CComponentsForm *parent) { //CComponentsItem @@ -60,19 +59,19 @@ CProgressBar::CProgressBar( const int x_pos, const int y_pos, const int w, const col_body = color_body; col_shadow = color_shadow; - pb_blink = blinkenlights; - pb_invert = inv; pb_red = r; pb_green = g; pb_yellow = b; pb_active_col = active_col; pb_passive_col = passive_col; - pb_bl_changed = g_settings.progressbar_color; + pb_design = &g_settings.progressbar_design; + pb_gradient = &g_settings.progressbar_gradient; + pb_type = PB_REDLEFT; + pb_last_width = -1; pb_value = 0; pb_max_value = 0; - pb_paint_zero = false; // init start positions x/y active bar pb_x = x + fr_thickness; @@ -119,143 +118,301 @@ void CProgressBar::initDimensions() col_frame = pb_active_col; } -void CProgressBar::paintShapes(int &shx, int ­, int &shw, int &shh, fb_pixel_t &col) -{ - CComponentsShapeSquare shape(shx, shy, shw, shh, NULL, false); - shape.setColorBody(col); - shape.allowPaint(cc_allow_paint); - shape.paint(false); -} +class CProgressBarCache; +static std::vector pbCache; - -void CProgressBar::paintSimple() +class CProgressBarCache { - // progress value - if (pb_active_width != pb_last_width){ - if (pb_active_width) - paintShapes(pb_x, pb_y, pb_active_width, pb_height, pb_active_col); // active bar - paintShapes(pb_start_x_passive, pb_y, pb_passive_width, pb_height, pb_passive_col); // passive bar - } - - if (pb_paint_zero && pb_value == 0) //TODO: use shape cc-item, not available for lines yet - frameBuffer->paintLine(pb_x , pb_y, pb_x+width-3, pb_y+height-3, pb_active_col); // zero line -} + private: + // keys to lookup: + int pb_height, pb_width; + int pb_active_col, pb_passive_col; + int design; + bool pb_invert, gradient; + int pb_red, pb_yellow, pb_green; -void CProgressBar::paintAdvanced() -{ - int itemw = ITEMW, itemh = ITEMW, pointx = POINT, pointy = POINT; - if(g_settings.progressbar_color){ - switch ((pb_color_t)g_settings.progressbar_design){ - default: - case PB_MATRIX: // ::::: matrix - break; - case PB_LINES_V: // ||||| vert. lines - itemh = pb_height; - pointy = pb_height; - break; - case PB_LINES_H: // ===== horiz. lines - itemw = POINT; - break; - case PB_COLOR: // filled color - itemw = POINT; - itemh = pb_height; - pointy = pb_height; - break; + int yoff; + + fb_pixel_t *active, *passive; + + static inline unsigned int make16color(__u32 rgb){return 0xFF000000 | rgb;}; + void paintBoxRel(fb_pixel_t *b, int x, int y, int dx, int dy, fb_pixel_t col); + void applyGradient(fb_pixel_t *buf); + void createBitmaps(); + + CProgressBarCache(int _height, int _width, int _pb_active_col, int _pb_passive_col, int _design, bool _invert, bool _gradient, int _red, int _yellow, int _green) + : pb_height(_height), pb_width(_width), pb_active_col(_pb_active_col), pb_passive_col(_pb_passive_col), design(_design), pb_invert(_invert), gradient(_gradient), + pb_red(_red), pb_yellow(_yellow), pb_green(_green), yoff(0) + { + if (pbCache.size() > 10) + clear(); + createBitmaps(); } + void clear(); + public: + void paint(int x, int y, int pb_active_width, int pb_passive_width); + static CProgressBarCache *lookup(int _height, int _width, int _pb_active_col, int _pb_passive_col, int _design, bool _invert, bool _gradient, int _red, int _yellow, int _green); +}; + +void CProgressBarCache::clear() +{ + for (std::vector::iterator it = pbCache.begin(); it != pbCache.end(); ++it) { + if ((*it)->active) + free((*it)->active); + if ((*it)->passive) + free((*it)->passive); } - + pbCache.clear(); +} + +CProgressBarCache *CProgressBarCache::lookup(int _height, int _width, int _pb_active_col, int _pb_passive_col, int _design, bool _invert, bool _gradient, int _red, int _yellow, int _green) +{ + // sanitize + if (_design == CProgressBar::PB_MONO) + _red = _yellow = _green = 0; + + // lookup + std::vector::iterator it = pbCache.begin(); + for (; it != pbCache.end() && ((*it)->pb_height != _height || (*it)->pb_width != _width || + (*it)->pb_active_col != _pb_active_col || (*it)->pb_passive_col != _pb_passive_col || + (*it)->design != _design || (*it)->pb_invert != _invert || (*it)->gradient != _gradient || + (*it)->pb_red != _red || (*it)->pb_yellow != _yellow || (*it)->pb_green != _green); ++it); + if (it != pbCache.end()) + return *it; + + CProgressBarCache *pbc = new CProgressBarCache(_height, _width, _pb_active_col, _pb_passive_col, _design, _invert, _gradient, _red, _yellow, _green); + pbCache.push_back(pbc); + return pbc; +} + +void CProgressBarCache::paint(int x, int y, int pb_active_width, int pb_passive_width) +{ + y += yoff; + static CFrameBuffer *frameBuffer = CFrameBuffer::getInstance(); + unsigned int stride = frameBuffer->getStride() / sizeof(fb_pixel_t); + fb_pixel_t *p = frameBuffer->getFrameBufferPointer() + y * stride + x; + int off = stride - pb_width; + if (pb_active_width > pb_width) + pb_active_width = pb_width; + if (pb_active_width + pb_passive_width != pb_width) + pb_passive_width = pb_width - pb_active_width; + fb_pixel_t *ap = active; + fb_pixel_t *pp = passive; + for (int h = 0; h < pb_height; h++) { + int w = 0; + for (; w < pb_active_width; w++, p++, ap++) + if (*ap) + *p = *ap; + pp += pb_active_width; + for (; w < pb_width; w++, p++, pp++) + if (*pp) + *p = *pp; + ap += pb_passive_width; + p += off; + } +} + +void CProgressBarCache::paintBoxRel(fb_pixel_t *b, int x, int y, int dx, int dy, fb_pixel_t col) +{ + if (x < 0) { + dx -= x; + x = 0; + } + if (y < 0) { + dy -= y; + y = 0; + } + if (x + dx > pb_width) + dx = pb_width - x; + if (y + dy > pb_height) + dy = pb_height - y; + if (dx < 1 || dy < 1) + return; + b += pb_width * y + x; + fb_pixel_t *e = b + pb_width * (dy - 1) + dx; + int off = pb_width - dx; + while (b < e) { + fb_pixel_t *ex = b + dx; + while (b < ex) + *b++ = col; + b += off; + } +} + +void CProgressBarCache::createBitmaps() +{ + active = (fb_pixel_t *) calloc(1, pb_width * pb_height * sizeof(fb_pixel_t)); + if (!active) + return; + passive = (fb_pixel_t *) calloc(1, pb_width * pb_height * sizeof(fb_pixel_t)); + if (!passive) { + free(active); + return; + } + + int itemw = ITEMW, itemh = ITEMW, pointx = POINT, pointy = POINT; + switch (design){ + default: + case CProgressBar::PB_MONO: // monochrome + paintBoxRel(active, 0, 0, pb_width, pb_height, pb_active_col ); + paintBoxRel(passive, 0, 0, pb_width, pb_height, pb_passive_col); + if (gradient) { + applyGradient(active); + applyGradient(passive); + } + return; + case CProgressBar::PB_MATRIX: // ::::: matrix + break; + case CProgressBar::PB_LINES_V: // ||||| vert. lines + itemh = pb_height; + pointy = pb_height; + break; + case CProgressBar::PB_LINES_H: // ===== horiz. lines + itemw = POINT; + break; + case CProgressBar::PB_COLOR: // filled color + itemw = 1; + itemh = pb_height; + pointy = pb_height; + break; + } + const int spc = itemh - pointy; /* space between horizontal lines / points */ int hcnt = (pb_height + spc) / itemh; /* how many POINTs is the bar high */ - int yoff = (pb_height + spc - itemh * hcnt) / 2; - - //printf("height: %d itemh: %d hcnt: %d yoff: %d spc: %d\n", height, itemh, hcnt, yoff, spc); + yoff = (pb_height + spc - itemh * hcnt) / 2; + + int i = 0; + + int sh_x = 0; /* red, yellow, green are given in percent */ - int rd = pb_red * pb_max_width / (100 * itemw); /* how many POINTs red */ - int yw = pb_yellow * pb_max_width / (100 * itemw); /* how many POINTs yellow */ - int gn = pb_green * pb_max_width / (100 * itemw); /* how many POINTs green */ + int rd = pb_red * pb_width / (100 * itemw); /* how many POINTs red */ + int yw = pb_yellow * pb_width / (100 * itemw); /* how many POINTs yellow */ + int gn = pb_green * pb_width / (100 * itemw); /* how many POINTs green */ - int maxi = pb_active_width / itemw; /* how many POINTs is the active bar */ - int total = pb_max_width / itemw; /* total number of POINTs */ + // fixup rounding errors + while ((rd + yw + gn) * itemw < pb_width) { + if (gn) + gn++; + if (yw && ((rd + yw + gn) * itemw < pb_width)) + yw++; + if (rd && ((rd + yw + gn) * itemw < pb_width)) + rd++; + } - uint32_t rgb; - fb_pixel_t color; + yw += rd; + gn += yw; - if (pb_active_width != pb_last_width) { - int i, j; - const int py = pb_y + yoff; - if (pb_active_width > pb_last_width) { - int step, off; - int b = 0; - uint32_t diff = 0; - for (i = 0; (i < rd) && (i < maxi); i++) { - diff = i * 255 / rd; - if (pb_invert) - rgb = GREEN + (diff << 16); // adding red - else - rgb = RED + (diff << 8); // adding green - color = make16color(rgb); - for (j = 0; j < hcnt; j++) { - int sh_x = pb_x + i * itemw; - int sh_y = py + j * itemh; - //paintShapes(sh_x, sh_y, pointx, pointy, color); - frameBuffer->paintBoxRel(sh_x, sh_y, pointx, pointy, color); - } - } - step = yw - rd - 1; - if (step < 1) - step = 1; - for (; (i < yw) && (i < maxi); i++) { - diff = b++ * 255 / step / 2; - if (pb_invert) - rgb = YELLOW - (diff << 8); // removing green - else - rgb = YELLOW - (diff << 16); // removing red - color = make16color(rgb); - for (j = 0; j < hcnt; j++) { - int sh_x = pb_x + i * itemw; - int sh_y = py + j * itemh; - //paintShapes(sh_x, sh_y, pointx, pointy, color); - frameBuffer->paintBoxRel(sh_x, sh_y, pointx, pointy, color); - } - } - off = diff; - b = 0; - step = gn - yw - 1; - if (step < 1) - step = 1; - for (; (i < gn) && (i < maxi); i++) { - diff = b++ * 255 / step / 2 + off; - if (pb_invert) - rgb = YELLOW - (diff << 8); // removing green - else - rgb = YELLOW - (diff << 16); // removing red - color = make16color(rgb); - for (j = 0; j < hcnt; j++) { - int sh_x = pb_x + i * itemw; - int sh_y = py + j * itemh; - //paintShapes(sh_x, sh_y, pointx, pointy, color); - frameBuffer->paintBoxRel(sh_x, sh_y, pointx, pointy, color); - } - } - } - for(i = maxi; i < total; i++) { - for (j = 0; j < hcnt; j++) { - int sh_x = pb_x + i * itemw; - int sh_y = py + j * itemh; - //paintShapes(sh_x, sh_y, pointx, pointy, pb_passive_col); //fill passive - frameBuffer->paintBoxRel(sh_x, sh_y, pointx, pointy, pb_passive_col); + uint32_t rgb, diff = 0; + int step, b = 0; + + for (i = 0; i < rd; i++, sh_x += itemw) { + diff = i * 255 / rd; + rgb = RED + (diff << 8); // adding green + fb_pixel_t color = make16color(rgb); + int sh_y = 0; + for (int j = 0; j < hcnt; j++, sh_y += itemh) + paintBoxRel(active, sh_x, sh_y, pointx, pointy, color); + } + step = yw - rd - 1; + if (step < 1) + step = 1; + for (; i < yw; i++, sh_x += itemw) { + diff = b++ * 255 / step / 2; + rgb = YELLOW - (diff << 16); // removing red + fb_pixel_t color = make16color(rgb); + int sh_y = 0; + for (int j = 0; j < hcnt; j++, sh_y += itemh) + paintBoxRel(active, sh_x, sh_y, pointx, pointy, color); + } + int off = diff; + b = 0; + step = gn - yw - 1; + if (step < 1) + step = 1; + for (; i < gn; i++, sh_x += itemw) { + diff = b++ * 255 / step / 2 + off; + rgb = YELLOW - (diff << 16); // removing red + fb_pixel_t color = make16color(rgb); + int sh_y = 0; + for (int j = 0; j < hcnt; j++, sh_y += itemh) + paintBoxRel(active, sh_x, sh_y, pointx, pointy, color); + } + if (pb_invert) { + for (int l = 0; l < pb_height; l++) { + fb_pixel_t *as = active + l * pb_width; + fb_pixel_t *ae = as + pb_width - 1; + for (; as < ae; as++, ae--) { + fb_pixel_t t = *as; + *as = *ae; + *ae = t; } } } + + if (gradient) + applyGradient(active); + + fb_pixel_t *a = active, *p = passive; + fb_pixel_t *end = a + pb_width * pb_height; + for (; a < end; a++, p++) { + fb_pixel_t q = *a; + unsigned int gray = ((q & 0xff) + ((q >> 8) & 0xff) + ((q >> 16) & 0xff)) / 3; + q >>= 24; + q <<= 8; + q |= gray; + q <<= 8; + q |= gray; + q <<= 8; + q |= gray; + *p = q; + } } +void CProgressBarCache::applyGradient(fb_pixel_t *b) +{ + for (int y = 0; y < pb_height; y++) { + int _o = y * pb_width; + fb_pixel_t last_old = 0; + fb_pixel_t last_new = 0; + for (int _x = pb_width - 1; _x > -1; _x--) { + fb_pixel_t &v = *(b + _o + _x); + if (v != last_old) { + last_old = v; + double s = sin((y + .5) * M_PI / pb_height) * .8 + .2; + float fr = ((last_old >> 16) & 0xff) * s + 0.5; + float fg = ((last_old >> 8) & 0xff) * s + 0.5; + float fb = ((last_old ) & 0xff) * s + 0.5; + last_new = (last_old & 0xFF000000) + | ((unsigned int)fr << 16) + | ((unsigned int)fg << 8) + | ((unsigned int)fb ); + } + v = last_new; + } + } +} void CProgressBar::paintProgress(bool do_save_bg) { - if(pb_bl_changed != g_settings.progressbar_color) { - pb_bl_changed = g_settings.progressbar_color; - reset(); + if (*pb_design == PB_OFF) { + paintInit(false); + return; } + if (pb_type == PB_TIMESCALE) + setRgb(g_settings.progressbar_timescale_red, g_settings.progressbar_timescale_green, g_settings.progressbar_timescale_yellow); + + if (!pb_red && !pb_yellow && !pb_green) + pb_green = 1; + int sum = pb_red + pb_yellow + pb_green; + pb_red *= 100; + pb_yellow *= 100; + pb_green *= 100; + pb_red /= sum; + pb_yellow /= sum; + pb_green /= sum; + + if (*pb_gradient) + setFrameThickness(0); initDimensions(); @@ -264,10 +421,13 @@ void CProgressBar::paintProgress(bool do_save_bg) paintInit(do_save_bg); //progress - if (!pb_blink || !g_settings.progressbar_color) - paintSimple(); - else - paintAdvanced(); + bool pb_invert = (pb_type == PB_REDRIGHT) || ((pb_type == PB_TIMESCALE) && g_settings.progressbar_timescale_invert); + if (pb_active_width != pb_last_width) { + CProgressBarCache *pbc = CProgressBarCache::lookup(pb_height, pb_max_width, pb_active_col, pb_passive_col, *pb_design, pb_invert, *pb_gradient, pb_red, pb_yellow, pb_green); + if (pbc) + pbc->paint(pb_x, pb_y, pb_active_width, pb_passive_width); + is_painted = true; + } if (is_painted) pb_last_width = pb_active_width; @@ -276,6 +436,10 @@ void CProgressBar::paintProgress(bool do_save_bg) void CProgressBar::paint(bool do_save_bg) { - paintProgress(do_save_bg); } + +void CProgressBar::setType(pb_type_t type) +{ + pb_type = type; +} diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index 515761b24..03a1996e1 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -43,7 +43,6 @@ frame_col > general frame color of progressbar, set 0 for no frame shadowbar_col color > shadow behind progressbar, set 0 for no shadow - paintZero > optional, if set to true and value = 0, then paints a diagonal line instead of active bar as symbolic for a zero value */ #ifndef __CC_PROGRESSBAR_H__ @@ -80,86 +79,80 @@ class CProgressBar : public CComponentsItem ///start position of activ/passiv area int pb_x, pb_y; - bool pb_blink, pb_invert, pb_bl_changed; - - ///causes a diagonal line as a sign for 0 value instead of an empty bar - bool pb_paint_zero; - ///to evaluate values, these will be convert to the graph int pb_value, pb_max_value; - ///paint simple version of progressbar with simple color modifications - void paintSimple(); - ///paint version of progressbar with color and advanced display modifications - void paintAdvanced(); - ///painting of activ/passive bars via shape object - void paintShapes(int &shx, int ­, int &shw, int &shh, fb_pixel_t &col); + int *pb_design, *pb_gradient; + int pb_type; void initDimensions(); ///paints graph void paintProgress(bool do_save_bg = CC_SAVE_SCREEN_NO); - static inline unsigned int make16color(__u32 rgb){return 0xFF000000 | rgb;}; - public: ///parameters: ///x_pos, y_pos, w, h: position and dimension in pixel - ///blinkenlights: true if you want code to follow progressbar_color. needed, no default. ///w, h: width / height of bar. Can later be set with paintProgressbar. - ///r, g, b: percentage of the bar where red/green/yellow is used, only used if blinkenlights (colored) == true. - ///inv: false => red on the left side, true: red on right side. + ///r, g, b: percentage of the bar where red/green/yellow is used, only used for colored designs ///active_col, passive_col: sets colors for displayed values, activ_col means the the displayed progress ///color_frame, color_body, color_shadow: colores of progressbar for frame, body and shadow, Note: color of frame is ineffective on fr_thickness = 0 CProgressBar( const int x_pos = 0, const int y_pos = 0, const int w = -1, const int h = -1, fb_pixel_t color_frame = 0, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0, const fb_pixel_t active_col = COL_INFOBAR_PLUS_7, const fb_pixel_t passive_col = COL_INFOBAR_PLUS_3, - const bool blinkenlights = false, const int r = 40, const int g = 100, const int b =70, - const bool inv = false, CComponentsForm *parent = NULL); ///set up to display available values - void setValue(const int val){ pb_value = val;}; - void setMaxValue(const int max_val){pb_max_value = max_val;}; + void setValue(const int val){ pb_value = val;} + //return current value + int getValue(void) { return pb_value; } + void setMaxValue(const int max_val){pb_max_value = max_val;} ///set up booth values to display at once - void setValues(const int val, const int max_val){pb_value = val; pb_max_value = max_val;}; - - ///causes painting a diagonal line if value = 0, Note: ineffective in colored mode - void setZeroLine(bool paint_zero_line = true){pb_paint_zero = paint_zero_line;}; + void setValues(const int val, const int max_val){pb_value = val; pb_max_value = max_val;} ///setters for status colors - void setActiveColor(fb_pixel_t active_color) {pb_active_col = active_color;}; - void setPassiveColor(fb_pixel_t passive_color) {pb_passive_col = passive_color;}; + void setActiveColor(fb_pixel_t active_color) {pb_active_col = active_color;} + void setPassiveColor(fb_pixel_t passive_color) {pb_passive_col = passive_color;} ///set up booth status colors at once - void setStatusColors(fb_pixel_t active_color, fb_pixel_t passive_color) {pb_passive_col = passive_color; pb_active_col = active_color;}; + void setStatusColors(fb_pixel_t active_color, fb_pixel_t passive_color) {pb_passive_col = passive_color; pb_active_col = active_color;} - ///invert: false => red on the left side, true: red on right side. - void setInvert(bool inverted = true){pb_invert = inverted;}; - - ///blinkenlights: true (default) if you want code to follow progressbar_color. - void setBlink(bool blinkenlights = true){pb_blink = blinkenlights;}; - ///r, g, b: percentage of the bar where red/green/yellow is used, only used if blinkenlights (colored) == true. - void setRgb(const int r, const int g, const int b){pb_red = r; pb_green = g; pb_yellow = b;}; + ///r, g, b: percentage of the bar where red/green/yellow is used, only used for colored designs + void setRgb(const int r, const int g, const int b){pb_red = r; pb_green = g; pb_yellow = b;} ///x, y, width, height, value, max_value: set most wanted parameters at once void setProgress(const int x_pos, const int y_pos, const int w, const int h, - const int val, const int max_val){x=x_pos; y=y_pos; width=w; height=h; pb_value=val; pb_max_value=max_val;}; + const int val, const int max_val){x=x_pos; y=y_pos; width=w; height=h; pb_value=val; pb_max_value=max_val;} ///force update on next paint void reset() { pb_last_width = -1; } void paint(bool do_save_bg = CC_SAVE_SCREEN_NO); enum pb_color_t { - PB_MATRIX = 0, /* 0 */ - PB_LINES_V, /* 1 */ - PB_LINES_H, /* 2 */ - PB_COLOR /* 3 */ + PB_OFF = -2, /* -2 */ + PB_MONO, /* -1 */ + PB_MATRIX, /* 0 */ + PB_LINES_V, /* 1 */ + PB_LINES_H, /* 2 */ + PB_COLOR, /* 3 */ }; + enum pb_type_t { + PB_REDLEFT = 0, + PB_REDRIGHT, + PB_TIMESCALE, + }; + + void setType(pb_type_t type); + + //set design (overides g_settings.progressbar_design) + void setDesign(int &design) { pb_design = &design; } + + //set gradient (overides g_settings.progressbar_gradient) + void setGradient(int &gradient) { pb_gradient = &gradient; } }; #endif /* __CC_PROGRESSBAR_H__ */ diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 0821a4b84..d66b9ce99 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -479,8 +479,7 @@ void CDBoxInfoWidget::paint() if (pbw > 8) /* smaller progressbar is not useful ;) */ { CProgressBar pb(x+offsetw, ypos+3, pbw, mheight-10); - pb.setBlink(); - pb.setInvert(); + pb.setType(CProgressBar::PB_REDRIGHT); pb.setValues(memstat[row][MEMINFO_TOTAL] ? (memstat[row][MEMINFO_USED] * 100) / memstat[row][MEMINFO_TOTAL] : 0, 100); pb.paint(false); } @@ -549,8 +548,7 @@ void CDBoxInfoWidget::paint() if (pbw > 8) /* smaller progressbar is not useful ;) */ { CProgressBar pb(x+offsetw, ypos+3, pbw, mheight-10); - pb.setBlink(); - pb.setInvert(); + pb.setType(CProgressBar::PB_REDRIGHT); pb.setValues(percent_used, 100); pb.paint(false); } diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index d7ad305cd..090ad9ee2 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -660,8 +660,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start { int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1); CProgressBar pb(pbx, sy+oy-height, 104, height-6); - pb.setBlink(); - pb.setRgb(0, 100, 70); + pb.setType(CProgressBar::PB_TIMESCALE); pb.setValues(epg_done, 100); pb.paint(false); } @@ -706,8 +705,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start if ( epg_done!= -1 ) { int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1); CProgressBar pb(pbx, sy+oy-height, 104, height-6); - pb.setBlink(); - pb.setRgb(0, 100, 70); + pb.setType(CProgressBar::PB_TIMESCALE); pb.setValues(epg_done, 100); pb.paint(false); } diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 4d9a7afe7..552f2193e 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -234,18 +234,15 @@ void CInfoViewer::changePB() if (sigscale) delete sigscale; sigscale = new CProgressBar(); - sigscale->setBlink(); if (snrscale) delete snrscale; snrscale = new CProgressBar(); - snrscale->setBlink(); if (timescale) delete timescale; timescale = new CProgressBar(); - timescale->setBlink(); - timescale->setRgb(0, 100, 70); + timescale->setType(CProgressBar::PB_TIMESCALE); } void CInfoViewer::paintTime (bool show_dot) @@ -1548,7 +1545,7 @@ void CInfoViewer::display_Info(const char *current, const char *next, int pb_starty = ChanNameY - (pb_h + 10); int pb_shadow = COL_INFOBAR_SHADOW_PLUS_0; timescale->setShadowOnOff(true); - int pb_color = g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0; + int pb_color = (g_settings.progressbar_design == CProgressBar::PB_MONO) ? COL_INFOBAR_PLUS_0 : COL_INFOBAR_SHADOW_PLUS_0; if(g_settings.infobar_progressbar){ pb_startx = xStart; pb_w = BoxEndX - 10 - xStart; diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index c374ca78f..39abc5e48 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -829,17 +829,15 @@ void CInfoViewerBB::paintCA_bar(int left, int right) void CInfoViewerBB::changePB() { hddwidth = frameBuffer->getScreenWidth(true) * ((g_settings.screen_preset == 1) ? 10 : 8) / 128; /* 80(CRT)/100(LCD) pix if screen is 1280 wide */ - if (hddscale) - delete hddscale; - hddscale = new CProgressBar(); - hddscale->setBlink(); - hddscale->setInvert(); + if (!hddscale) { + hddscale = new CProgressBar(); + hddscale->setType(CProgressBar::PB_REDRIGHT); + } - if (sysscale) - delete sysscale; - sysscale = new CProgressBar(); - sysscale->setBlink(); - sysscale->setInvert(); + if (!sysscale) { + sysscale = new CProgressBar(); + sysscale->setType(CProgressBar::PB_REDRIGHT); + } } void CInfoViewerBB::reset_allScala() diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index d112ccd46..be4d52714 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -1363,8 +1363,7 @@ void CMovieBrowser::info_hdd_level(bool paint_hdd) const short pbw = 100; const short border = m_cBoxFrameTitleRel.iHeight/4; CProgressBar pb(m_cBoxFrame.iX+ m_cBoxFrameFootRel.iWidth - pbw - border, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + border, pbw, m_cBoxFrameTitleRel.iHeight/2); - pb.setBlink(); - pb.setInvert(); + pb.setType(CProgressBar::PB_REDRIGHT); pb.setValues( blocks_percent_used, 100); pb.paint(false); } @@ -4404,7 +4403,7 @@ static off64_t cut_movie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie) CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); if (! timescale) timescale = new CProgressBar(); - timescale->setBlink(); + timescale->setType(CProgressBar::PB_TIMESCALE); int dx = 256; int x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX; int y = g_settings.screen_EndY - 50; @@ -4664,7 +4663,7 @@ printf("copy: len %d minute %" PRId64 " second %" PRId64 "\n", len, len ? size/l CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); if (! timescale) timescale = new CProgressBar(); - timescale->setBlink(); + timescale->setType(CProgressBar::PB_TIMESCALE); int dx = 256; int x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX; int y = g_settings.screen_EndY - 50; diff --git a/src/gui/osd_progressbar_setup.cpp b/src/gui/osd_progressbar_setup.cpp index 7ac692717..41cfb789d 100644 --- a/src/gui/osd_progressbar_setup.cpp +++ b/src/gui/osd_progressbar_setup.cpp @@ -48,13 +48,29 @@ const CMenuOptionChooser::keyval PROGRESSBAR_INFOBAR_POSITION_OPTIONS[PROGRESSBA { 3 , LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_3 } }; -#define PROGRESSBAR_DESIGN_COUNT 4 -const CMenuOptionChooser::keyval PROGRESSBAR_DESIGN_OPTIONS[PROGRESSBAR_DESIGN_COUNT]= +/* these are more descriptive... */ +#define _LOCALE_PROGRESSBAR_COLOR_MATRIX LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_0 +#define _LOCALE_PROGRESSBAR_COLOR_VERTICAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_1 +#define _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2 +#define _LOCALE_PROGRESSBAR_COLOR_FULL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3 +#define _LOCALE_PROGRESSBAR_COLOR_MONO LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4 + +#define PROGRESSBAR_COLOR_OPTION_COUNT 6 +const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPTION_COUNT] = { - { 0 , LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_0 }, - { 1 , LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_1 }, - { 2 , LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2 }, - { 3 , LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3 } + { CProgressBar::PB_OFF, LOCALE_OPTIONS_OFF }, + { CProgressBar::PB_MONO, _LOCALE_PROGRESSBAR_COLOR_MONO }, + { CProgressBar::PB_MATRIX, _LOCALE_PROGRESSBAR_COLOR_MATRIX }, + { CProgressBar::PB_LINES_V, _LOCALE_PROGRESSBAR_COLOR_VERTICAL }, + { CProgressBar::PB_LINES_H, _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL }, + { CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL }, +}; + +#define PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT 2 +const CMenuOptionChooser::keyval PROGRESSBAR_TIMESCALE_INVERT_OPTIONS[PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT] = +{ + { 0, LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_RED_GREEN }, + { 1, LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_GREEN_RED } }; CProgressbarSetup::CProgressbarSetup() @@ -67,10 +83,23 @@ CProgressbarSetup::~CProgressbarSetup() } -int CProgressbarSetup::exec(CMenuTarget* parent, const std::string &) +bool CProgressbarSetup::changeNotify(const neutrino_locale_t /* OptionName */, void * /* data */) +{ + return true; // repaint +} + +int CProgressbarSetup::exec(CMenuTarget* parent, const std::string &actionKey) { printf("[neutrino] init progressbar menu setup...\n"); + if (actionKey == "reset") { + g_settings.progressbar_timescale_red = 0; + g_settings.progressbar_timescale_green = 100; + g_settings.progressbar_timescale_yellow = 70; + g_settings.progressbar_timescale_invert = false; + return menu_return::RETURN_REPAINT; + } + if (parent) parent->hide(); @@ -79,6 +108,7 @@ int CProgressbarSetup::exec(CMenuTarget* parent, const std::string &) int CProgressbarSetup::showMenu() { +#if 0 //menue init CMenuWidget *progress = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_PROGRESSBAR); @@ -94,7 +124,7 @@ int CProgressbarSetup::showMenu() //design CMenuOptionChooser *design; - design = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN, &g_settings.progressbar_design, PROGRESSBAR_DESIGN_OPTIONS, PROGRESSBAR_DESIGN_COUNT, g_settings.progressbar_color); + design = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN, &g_settings.progressbar_design, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, g_settings.progressbar_color); design->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_DESIGN); //infobar position @@ -115,4 +145,74 @@ int CProgressbarSetup::showMenu() delete progress; return res; +#endif + CMenuWidget m(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_PROGRESSBAR); + + m.addIntroItems(LOCALE_MISCSETTINGS_PROGRESSBAR /*, LOCALE_MISCSETTINGS_GENERAL*/); + + // general progress bar design + CMenuOptionChooser *mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_LONG, + &g_settings.progressbar_design, PROGRESSBAR_COLOR_OPTIONS + 1, PROGRESSBAR_COLOR_OPTION_COUNT - 1, true, this); + mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_COLOR); + m.addItem(mc); + + // progress bar gradient + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_GRADIENT, &g_settings.progressbar_gradient, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_GRADIENT); + m.addItem(mc); + + // preview + CMenuProgressbar *mb = new CMenuProgressbar(LOCALE_MISCSETTINGS_PROGRESSBAR_PREVIEW); + mb->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_PREVIEW); + m.addItem(mb); + m.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE)); + + CMenuOptionNumberChooser *nc; + + nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_RED, &g_settings.progressbar_timescale_red, true, 0, 100, this); + nc->setNumericInput(true); + nc->setNumberFormat("%d %%"); + nc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_RED); + m.addItem(nc); + + nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_YELLOW, &g_settings.progressbar_timescale_yellow, true, 0, 100, this); + nc->setNumericInput(true); + nc->setNumberFormat("%d %%"); + nc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_YELLOW); + m.addItem(nc); + + nc = new CMenuOptionNumberChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_GREEN, &g_settings.progressbar_timescale_green, true, 0, 100, this); + nc->setNumericInput(true); + nc->setNumberFormat("%d %%"); + nc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_GREEN); + m.addItem(nc); + + mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_INVERT, &g_settings.progressbar_timescale_invert, PROGRESSBAR_TIMESCALE_INVERT_OPTIONS, PROGRESSBAR_TIMESCALE_INVERT_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_INVERT); + m.addItem(mc); + + mb = new CMenuProgressbar(LOCALE_MISCSETTINGS_PROGRESSBAR_PREVIEW); + mb->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_PREVIEW); + mb->getScale()->setType(CProgressBar::PB_TIMESCALE); + m.addItem(mb); + + CMenuForwarder* mf = new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, "reset", CRCInput::RC_red); + mf->setHint("", LOCALE_OPTIONS_HINT_DEFAULT); + m.addItem(mf); + + // extended channel list (progressbars) + m.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_CHANNELS)); + + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_progressbar_design, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true, this); + mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED); + m.addItem(mc); + + mb = new CMenuProgressbar(LOCALE_MISCSETTINGS_PROGRESSBAR_PREVIEW); + mb->setHint("", LOCALE_MENU_HINT_PROGRESSBAR_PREVIEW); + mb->getScale()->setType(CProgressBar::PB_TIMESCALE); + mb->getScale()->setDesign(g_settings.channellist_progressbar_design); + mb->getScale()->doPaintBg(false); + m.addItem(mb); + + return m.exec(NULL, ""); } diff --git a/src/gui/osd_progressbar_setup.h b/src/gui/osd_progressbar_setup.h index 30dbe4625..61091b058 100644 --- a/src/gui/osd_progressbar_setup.h +++ b/src/gui/osd_progressbar_setup.h @@ -42,6 +42,7 @@ public: CProgressbarSetup(); ~CProgressbarSetup(); int exec(CMenuTarget* parent, const std::string &); + bool changeNotify(const neutrino_locale_t /* OptionName */, void * /* data */); }; #endif diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index b226e98b8..ce3173556 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -398,11 +398,11 @@ const CMenuOptionChooser::keyval VOLUMEBAR_DISP_POS_OPTIONS[VOLUMEBAR_DISP_POS_ #define MENU_DISP_POS_OPTIONS_COUNT 5 const CMenuOptionChooser::keyval MENU_DISP_POS_OPTIONS[MENU_DISP_POS_OPTIONS_COUNT]= { - { 0 , LOCALE_SETTINGS_POS_DEFAULT_CENTER }, - { 1 , LOCALE_SETTINGS_POS_TOP_LEFT }, - { 2 , LOCALE_SETTINGS_POS_TOP_RIGHT }, - { 3 , LOCALE_SETTINGS_POS_BOTTOM_LEFT }, - { 4 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT } + { 0 , LOCALE_SETTINGS_POS_DEFAULT_CENTER }, + { 1 , LOCALE_SETTINGS_POS_TOP_LEFT }, + { 2 , LOCALE_SETTINGS_POS_TOP_RIGHT }, + { 3 , LOCALE_SETTINGS_POS_BOTTOM_LEFT }, + { 4 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT } }; #define INFOBAR_SHOW_RES_MODE_OPTION_COUNT 3 @@ -452,6 +452,23 @@ const CMenuOptionChooser::keyval OPTIONS_COLORED_EVENTS_OPTIONS[OPTIONS_COLORED_ { 2, LOCALE_MISCSETTINGS_COLORED_EVENTS_2 }, //next }; +/* these are more descriptive... */ +#define _LOCALE_PROGRESSBAR_COLOR_MATRIX LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_0 +#define _LOCALE_PROGRESSBAR_COLOR_VERTICAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_1 +#define _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2 +#define _LOCALE_PROGRESSBAR_COLOR_FULL LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3 +#define _LOCALE_PROGRESSBAR_COLOR_MONO LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4 + +#define PROGRESSBAR_COLOR_OPTION_COUNT 6 +const CMenuOptionChooser::keyval PROGRESSBAR_COLOR_OPTIONS[PROGRESSBAR_COLOR_OPTION_COUNT] = +{ + { CProgressBar::PB_OFF, LOCALE_OPTIONS_OFF }, + { CProgressBar::PB_MONO, _LOCALE_PROGRESSBAR_COLOR_MONO }, + { CProgressBar::PB_MATRIX, _LOCALE_PROGRESSBAR_COLOR_MATRIX }, + { CProgressBar::PB_LINES_V, _LOCALE_PROGRESSBAR_COLOR_VERTICAL }, + { CProgressBar::PB_LINES_H, _LOCALE_PROGRESSBAR_COLOR_HORIZONTAL }, + { CProgressBar::PB_COLOR, _LOCALE_PROGRESSBAR_COLOR_FULL }, +}; //show osd setup int COsdSetup::showOsdSetup() @@ -822,13 +839,13 @@ void COsdSetup::showOsdTimeoutSetup(CMenuWidget* menu_timeout) #define LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT 7 const CMenuOptionChooser::keyval LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS[LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT]= { - { 0 , LOCALE_MISCSETTINGS_INFOBAR_DISP_0 }, - { 1 , LOCALE_MISCSETTINGS_INFOBAR_DISP_1 }, - { 2 , LOCALE_MISCSETTINGS_INFOBAR_DISP_2 }, - { 3 , LOCALE_MISCSETTINGS_INFOBAR_DISP_3 }, - { 4 , LOCALE_MISCSETTINGS_INFOBAR_DISP_4 }, - { 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 }, - { 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 } + { 0 , LOCALE_MISCSETTINGS_INFOBAR_DISP_0 }, + { 1 , LOCALE_MISCSETTINGS_INFOBAR_DISP_1 }, + { 2 , LOCALE_MISCSETTINGS_INFOBAR_DISP_2 }, + { 3 , LOCALE_MISCSETTINGS_INFOBAR_DISP_3 }, + { 4 , LOCALE_MISCSETTINGS_INFOBAR_DISP_4 }, + { 5 , LOCALE_MISCSETTINGS_INFOBAR_DISP_5 }, + { 6 , LOCALE_MISCSETTINGS_INFOBAR_DISP_6 } }; //menus @@ -941,7 +958,7 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist) menu_chanlist->addItem(mc); // extended channel list - mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, CHANNELLIST_EXTENDED_OPTIONS, CHANNELLIST_EXTENDED_OPTIONS_COUNT - (g_settings.progressbar_color ? 0 : 1), true); + mc = new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_progressbar_design, PROGRESSBAR_COLOR_OPTIONS, PROGRESSBAR_COLOR_OPTION_COUNT, true, this); mc->setHint("", LOCALE_MENU_HINT_CHANNELLIST_EXTENDED); menu_chanlist->addItem(mc); diff --git a/src/gui/timeosd.cpp b/src/gui/timeosd.cpp index 74af715f2..94b7cca73 100644 --- a/src/gui/timeosd.cpp +++ b/src/gui/timeosd.cpp @@ -104,7 +104,6 @@ void CTimeOSD::updatePos(int position, int duration) percent = 0; timescale.setProgress(x, y + height/4, width, height/2, percent, 100); - timescale.setBlink(); timescale.setRgb(0, 100, 70); timescale.paint(); frameBuffer->blit(); diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 225c36f9b..3a714e055 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1124,7 +1124,7 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) g_PicViewer->rescaleImageDimensions(&flogo_w, &flogo_h, m_title_height*2, m_title_height-14); } } - g_PicViewer->DisplayImage(tmpname.c_str(), m_x+m_width-flogo_w-2-RADIUS_MID, m_y + 2, flogo_w, flogo_h, CFrameBuffer::TM_NONE); + g_PicViewer->DisplayImage(tmpname.c_str(), m_x+m_width-flogo_w-2-RADIUS_MID, m_y + 2, flogo_w, flogo_h); } } diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 90fc35b0b..bed085121 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -187,8 +187,7 @@ void CVolumeBar::initVolumeBarScale() { vb_pb = new CProgressBar(); - vb_pb->setInvert(); - vb_pb->setBlink(); + vb_pb->setType(CProgressBar::PB_REDRIGHT); vb_pb->setRgb(85, 75, 100); vb_pb->setFrameThickness(2); vb_pb->setProgress(vb_pbx, vb_pby, vb_pbw, vb_pbh, *vb_vol, 100); diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index a890e7129..cbaf5873a 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -2306,7 +2306,7 @@ int CMenuProgressbar::getWidth(void) int CMenuProgressbar::exec(CMenuTarget*) { - int val = /*scale.getValue()*/ + 25; + int val = scale.getValue() + 25; if (val > 100) val = 0; scale.setValue(val); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6caefb35a..f3b049b7f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -416,9 +416,21 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.infobar_sat_display = configfile.getBool("infobar_sat_display" , true ); g_settings.infobar_show_channeldesc = configfile.getBool("infobar_show_channeldesc" , false ); g_settings.infobar_subchan_disp_pos = configfile.getInt32("infobar_subchan_disp_pos" , 0 ); - g_settings.progressbar_color = configfile.getBool("progressbar_color", true ); - g_settings.progressbar_design = configfile.getInt32("progressbar_design", 2); //horizontal bars - g_settings.infobar_show = configfile.getInt32("infobar_show", 1); + g_settings.progressbar_gradient = configfile.getBool("progressbar_gradient", true ); + g_settings.progressbar_design = configfile.getInt32("progressbar_design", CProgressBar::PB_COLOR); + if (g_settings.progressbar_design == 4) { + // 4 meant monochrome gradient which is no longer a design option + g_settings.progressbar_design = CProgressBar::PB_COLOR; + g_settings.progressbar_gradient = true; + } + bool pb_color = configfile.getBool("progressbar_color", true ); + if (!pb_color) + g_settings.progressbar_design = CProgressBar::PB_MONO; + g_settings.progressbar_timescale_red = configfile.getInt32("progressbar_timescale_red", 0); + g_settings.progressbar_timescale_green = configfile.getInt32("progressbar_timescale_green", 100); + g_settings.progressbar_timescale_yellow = configfile.getInt32("progressbar_timescale_yellow", 70); + g_settings.progressbar_timescale_invert = configfile.getBool("progressbar_timescale_invert", false); + g_settings.infobar_show = configfile.getInt32("infobar_show", configfile.getInt32("infobar_cn", 1)); g_settings.infobar_show_channellogo = configfile.getInt32("infobar_show_channellogo" , 3 ); g_settings.infobar_progressbar = configfile.getInt32("infobar_progressbar" , 1 ); // below channel name g_settings.casystem_display = configfile.getInt32("casystem_display", 1 );//discreet ca mode default @@ -660,7 +672,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.channellist_additional = configfile.getInt32("channellist_additional", 2); //default minitv g_settings.eventlist_additional = configfile.getInt32("eventlist_additional", 0); g_settings.channellist_epgtext_align_right = configfile.getBool("channellist_epgtext_align_right" , false); - g_settings.channellist_extended = configfile.getInt32("channellist_extended", 1); + g_settings.channellist_progressbar_design = configfile.getInt32("channellist_progressbar_design", g_settings.progressbar_design); g_settings.channellist_foot = configfile.getInt32("channellist_foot" , 1);//default next Event g_settings.channellist_new_zap_mode = configfile.getInt32("channellist_new_zap_mode", 1); g_settings.channellist_sort_mode = configfile.getInt32("channellist_sort_mode", 0);//sort mode: alpha, freq, sat @@ -947,8 +959,12 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool("infobar_sat_display" , g_settings.infobar_sat_display ); configfile.setBool("infobar_show_channeldesc" , g_settings.infobar_show_channeldesc ); configfile.setInt32("infobar_subchan_disp_pos" , g_settings.infobar_subchan_disp_pos ); - configfile.setBool("progressbar_color" , g_settings.progressbar_color ); + configfile.setBool("progressbar_gradient", g_settings.progressbar_gradient); configfile.setInt32("progressbar_design", g_settings.progressbar_design); + configfile.setInt32("progressbar_timescale_red", g_settings.progressbar_timescale_red); + configfile.setInt32("progressbar_timescale_green", g_settings.progressbar_timescale_green); + configfile.setInt32("progressbar_timescale_yellow", g_settings.progressbar_timescale_yellow); + configfile.setInt32("progressbar_timescale_invert", g_settings.progressbar_timescale_invert); configfile.setInt32("infobar_show", g_settings.infobar_show); configfile.setInt32("infobar_show_channellogo" , g_settings.infobar_show_channellogo ); configfile.setInt32("infobar_progressbar" , g_settings.infobar_progressbar ); @@ -1156,8 +1172,8 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32("eventlist_additional", g_settings.eventlist_additional); configfile.setInt32("channellist_additional", g_settings.channellist_additional); configfile.setBool("channellist_epgtext_align_right", g_settings.channellist_epgtext_align_right); - configfile.setInt32("channellist_extended", g_settings.channellist_extended); - configfile.setInt32("channellist_foot" , g_settings.channellist_foot); + configfile.setInt32("channellist_progressbar_design", g_settings.channellist_progressbar_design); + configfile.setInt32("channellist_foot", g_settings.channellist_foot); configfile.setInt32("channellist_new_zap_mode", g_settings.channellist_new_zap_mode); configfile.setInt32("remote_control_hardware", g_settings.remote_control_hardware); configfile.setBool ( "audiochannel_up_down_enable", g_settings.audiochannel_up_down_enable ); @@ -3775,7 +3791,6 @@ void stop_daemons(bool stopall, bool for_flash) my_system(NEUTRINO_ENTER_FLASH_SCRIPT); } - InfoClock->enableInfoClock(false); dvbsub_close(); tuxtxt_stop(); tuxtxt_close(); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index b00740b78..4fe2c0225 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -65,6 +65,7 @@ enum MN_WIDGET_ID MN_WIDGET_ID_OSDSETUP_SCREENSHOT, MN_WIDGET_ID_OSDSETUP_VOLUME, MN_WIDGET_ID_OSDSETUP_INFOCLOCK, + MN_WIDGET_ID_OSDSETUP_PROGRESSBAR, //actually it does not matter, but these 6 entries must be the same order as in menu MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU, MN_WIDGET_ID_OSDSETUP_FONTSIZE_CHANNELLIST, diff --git a/src/system/locals.h b/src/system/locals.h index 6e57c0539..791067675 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1093,8 +1093,13 @@ typedef enum LOCALE_MENU_HINT_PREF_SUBS, LOCALE_MENU_HINT_PROGRESSBAR, LOCALE_MENU_HINT_PROGRESSBAR_COLOR, - LOCALE_MENU_HINT_PROGRESSBAR_DESIGN, LOCALE_MENU_HINT_PROGRESSBAR_INFOBAR_POSITION, + LOCALE_MENU_HINT_PROGRESSBAR_GRADIENT, + LOCALE_MENU_HINT_PROGRESSBAR_PREVIEW, + LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_GREEN, + LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_INVERT, + LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_RED, + LOCALE_MENU_HINT_PROGRESSBAR_TIMESCALE_YELLOW, LOCALE_MENU_HINT_PROTECTION, LOCALE_MENU_HINT_RADIOMODE, LOCALE_MENU_HINT_REBOOT, @@ -1347,11 +1352,22 @@ typedef enum LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_1, LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_2, LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_3, + LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_4, + LOCALE_MISCSETTINGS_PROGRESSBAR_DESIGN_LONG, + LOCALE_MISCSETTINGS_PROGRESSBAR_GRADIENT, LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION, LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_0, LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_1, LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_2, LOCALE_MISCSETTINGS_PROGRESSBAR_INFOBAR_POSITION_3, + LOCALE_MISCSETTINGS_PROGRESSBAR_PREVIEW, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_GREEN, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_GREEN_RED, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_INVERT, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_RED, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_RED_GREEN, + LOCALE_MISCSETTINGS_PROGRESSBAR_TIMESCALE_YELLOW, LOCALE_MISCSETTINGS_RADIOTEXT, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, @@ -1650,6 +1666,7 @@ typedef enum LOCALE_OPKG_UPGRADE, LOCALE_OPTIONS_DEFAULT, LOCALE_OPTIONS_FB, + LOCALE_OPTIONS_HINT_DEFAULT, LOCALE_OPTIONS_NTP_OFF, LOCALE_OPTIONS_NTP_ON, LOCALE_OPTIONS_NULL, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 850fe513a..a0200ec2f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1093,8 +1093,13 @@ const char * locale_real_names[] = "menu.hint_pref_subs", "menu.hint_progressbar", "menu.hint_progressbar_color", - "menu.hint_progressbar_design", "menu.hint_progressbar_infobar_position", + "menu.hint_progressbar_gradient", + "menu.hint_progressbar_preview", + "menu.hint_progressbar_timescale_green", + "menu.hint_progressbar_timescale_invert", + "menu.hint_progressbar_timescale_red", + "menu.hint_progressbar_timescale_yellow", "menu.hint_protection", "menu.hint_radiomode", "menu.hint_reboot", @@ -1347,11 +1352,22 @@ const char * locale_real_names[] = "miscsettings.progressbar_design_1", "miscsettings.progressbar_design_2", "miscsettings.progressbar_design_3", + "miscsettings.progressbar_design_4", + "miscsettings.progressbar_design_long", + "miscsettings.progressbar_gradient", "miscsettings.progressbar_infobar_position", "miscsettings.progressbar_infobar_position_0", "miscsettings.progressbar_infobar_position_1", "miscsettings.progressbar_infobar_position_2", "miscsettings.progressbar_infobar_position_3", + "miscsettings.progressbar_preview", + "miscsettings.progressbar_timescale", + "miscsettings.progressbar_timescale_green", + "miscsettings.progressbar_timescale_green_red", + "miscsettings.progressbar_timescale_invert", + "miscsettings.progressbar_timescale_red", + "miscsettings.progressbar_timescale_red_green", + "miscsettings.progressbar_timescale_yellow", "miscsettings.radiotext", "miscsettings.shutdown_count", "miscsettings.shutdown_count_hint1", @@ -1650,6 +1666,7 @@ const char * locale_real_names[] = "opkg.upgrade", "options.default", "options.fb", + "options.hint_default", "options.ntp_off", "options.ntp_on", "options.null", diff --git a/src/system/settings.h b/src/system/settings.h index dfb96eb07..31fd4bc64 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -85,8 +85,12 @@ struct SNeutrinoSettings int infobar_show; int infobar_show_channellogo; int infobar_progressbar; - int progressbar_color; int progressbar_design; + int progressbar_gradient; + int progressbar_timescale_red; + int progressbar_timescale_green; + int progressbar_timescale_yellow; + int progressbar_timescale_invert; int casystem_display; int scrambled_message; int volume_pos; @@ -483,7 +487,7 @@ struct SNeutrinoSettings int eventlist_additional; int channellist_additional; int channellist_epgtext_align_right; - int channellist_extended; + int channellist_progressbar_design; int channellist_foot; int channellist_new_zap_mode; int channellist_sort_mode;