diff --git a/data/icons/headers/Makefile.am b/data/icons/headers/Makefile.am index 29328dcbf..77e409429 100644 --- a/data/icons/headers/Makefile.am +++ b/data/icons/headers/Makefile.am @@ -21,6 +21,7 @@ install_DATA = \ multimedia.png \ network.png \ personalize.png \ + pictureviewer.png \ recording.png \ settings.png \ shell.png \ diff --git a/data/icons/headers/pictureviewer.png b/data/icons/headers/pictureviewer.png new file mode 100644 index 000000000..d474bd577 Binary files /dev/null and b/data/icons/headers/pictureviewer.png differ diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 58ccb9720..f10d65859 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2688,6 +2688,7 @@ usermenu.title_blue Erweiterungen usermenu.title_green Tonwahl usermenu.title_red EPG usermenu.title_yellow Bildoptionen +usermenus.head Benutzermenüs video_mode_ok Video-Einstellungen OK? videomenu.43mode 4:3 Anzeigeverhalten videomenu.analog_auto AUTO diff --git a/data/locale/english.locale b/data/locale/english.locale index 1de49a9a2..b90154a65 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2687,6 +2687,7 @@ usermenu.title_blue Features usermenu.title_green Audio usermenu.title_red Event-List usermenu.title_yellow Video +usermenus.head User menus video_mode_ok Is this video mode working ok ? videomenu.43mode 4:3 Content mode videomenu.analog_auto AUTO diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index a5c455bb8..54acff507 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -738,18 +738,21 @@ void CCDraw::paintTrigger() hide(); } +bool CCDraw::paintBlink(CComponentsTimer* Timer) +{ + if (Timer){ + Timer->OnTimer.connect(cc_draw_trigger_slot); + return Timer->isRun(); + } + return false; +} + bool CCDraw::paintBlink(const int& interval, bool is_nano) { - if (cc_draw_timer == NULL){ + if (cc_draw_timer == NULL) cc_draw_timer = new CComponentsTimer(interval, is_nano); - if (cc_draw_timer->OnTimer.empty()){ - cc_draw_timer->OnTimer.connect(cc_draw_trigger_slot); - } - } - if (cc_draw_timer) - return cc_draw_timer->isRun(); - return false; + return paintBlink(cc_draw_timer); } bool CCDraw::cancelBlink(bool keep_on_screen) diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index 463dc62e1..dd99986fa 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -312,6 +312,17 @@ class CCDraw : public COSDFader, public CComponentsSignals ///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument virtual void paint1(){paint(CC_SAVE_SCREEN_YES);} + /**paint item with blink effect + * This should work with all cc item types. + * + * @return bool returns true if effect is successful started + * + * @param[in] CComponentsTimer* pointer to timer object, Note: This object must be created and distroy outside + * of this methode. + * @see overloaded version of paintBlink() + */ + virtual bool paintBlink(CComponentsTimer* Timer); + /**paint item with blink effect * This should work with all cc item types. * diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index bc2b1be35..8a3dff514 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -97,6 +97,7 @@ void CComponentsHeader::initVarHeader( const int& x_pos, const int& y_pos, const cch_font = NULL; cch_size_mode = CC_HEADER_SIZE_LARGE; + CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CComponentsHeader::resetFont)); shadow = shadow_mode; col_frame = col_frame_old = color_frame; @@ -161,6 +162,14 @@ void CComponentsHeader::setCaptionFont(Font* font) cch_font = font; } +void CComponentsHeader::resetFont() +{ + if (cch_font){ + cch_font = NULL; + dprintf(DEBUG_DEBUG, "\033[33m[CComponentsHeader][%s - %d] reset header font \033[0m\n", __func__, __LINE__); + } +} + void CComponentsHeader::initCaptionFont() { Font *l_font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; @@ -168,7 +177,6 @@ void CComponentsHeader::initCaptionFont() if (cch_font == NULL){ cch_font = (cch_size_mode == CC_HEADER_SIZE_LARGE? l_font : s_font); - //select matching height if (cch_size_mode == CC_HEADER_SIZE_LARGE) height = std::max(height, l_font->getHeight()); diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index d091e800f..6d3169c12 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -68,6 +68,8 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen fb_pixel_t cch_col_text; ///property: caption font, see also setCaptionFont() Font* cch_font; + ///reset font + void resetFont(); ///property: internal y-position for all items int cch_items_y; diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index a26879b22..1fbb14407 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -387,7 +387,7 @@ int CPersonalizeGui::ShowPersonalizationMenu() { pMenu->addItem(GenericMenuSeparatorLine); uMenu = new CMenuWidget(LOCALE_PERSONALIZE_HEAD, NEUTRINO_ICON_PERSONALIZE, width, MN_WIDGET_ID_PERSONALIZE_USERMENU); - pMenu->addItem(new CMenuForwarder(LOCALE_USERMENU_HEAD, true, NULL, uMenu, NULL, CRCInput::RC_green)); + pMenu->addItem(new CMenuForwarder(LOCALE_USERMENUS_HEAD, true, NULL, uMenu, NULL, CRCInput::RC_green)); ShowUserMenu(); } @@ -490,7 +490,7 @@ void CPersonalizeGui::ShowUserMenu() { int uMenu_shortcut = 1; - uMenu->addIntroItems(LOCALE_USERMENU_HEAD); + uMenu->addIntroItems(LOCALE_USERMENUS_HEAD); uMenu->addItem(new CMenuOptionChooser(LOCALE_PERSONALIZE_USERMENU_SHOW_CANCEL, &g_settings.personalize[SNeutrinoSettings::P_UMENU_SHOW_CANCEL], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 258853731..44f51aa1b 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -713,7 +713,7 @@ void CPictureViewerGui::paintItem(int pos) void CPictureViewerGui::paintHead() { - CComponentsHeaderLocalized header(x, y, width, theight, LOCALE_PICTUREVIEWER_HEAD, NEUTRINO_ICON_MP3, CComponentsHeaderLocalized::CC_BTN_HELP); + CComponentsHeaderLocalized header(x, y, width, theight, LOCALE_PICTUREVIEWER_HEAD, NEUTRINO_ICON_PICTUREVIEWER, CComponentsHeaderLocalized::CC_BTN_HELP); //NI #ifdef ENABLE_GUI_MOUNT header.setContextButton(NEUTRINO_ICON_BUTTON_MENU); diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index 0814aacb3..a1856c743 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -293,14 +293,10 @@ void CScreenSaver::paint() //check position and size use only possible available screen size int x_cl, y_cl, w_cl, h_cl; - scr_clock->getDimensions( &x_cl, &y_cl, &w_cl, &h_cl); - bool unchecked = true; - while(unchecked){ - scr_clock->setPosP(uint8_t(rand() % 100),uint8_t(rand() % 100)); - scr_clock->getDimensions( &x_cl, &y_cl, &w_cl, &h_cl); - if (x_cl+w_cl < g_settings.screen_EndX && y_cl+h_cl < g_settings.screen_EndY) - unchecked = false; - } + scr_clock->getDimensions(&x_cl, &y_cl, &w_cl, &h_cl); + int x_random = rand() % ((g_settings.screen_EndX - w_cl - g_settings.screen_StartX) + 1) + g_settings.screen_StartX; + int y_random = rand() % ((g_settings.screen_EndY - h_cl - g_settings.screen_StartY) + 1) + g_settings.screen_StartY; + scr_clock->setPos(x_random, y_random); scr_clock->Start(); if (g_settings.screensaver_mode == SCR_MODE_CLOCK_COLOR) { diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index d885d79a6..f3bfcb5e6 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -90,6 +90,7 @@ CTestMenu::CTestMenu() clock = clock_r = NULL; text_ext = NULL; scrollbar = NULL; + timer = NULL; } CTestMenu::~CTestMenu() @@ -955,6 +956,8 @@ void CTestMenu::showRecords() const int box_posX = 30; const int box_posY = 300; + if (!timer) + timer = new CComponentsTimer(1); if (crm->RecordingStatus()) { @@ -1018,7 +1021,7 @@ void CTestMenu::showRecords() for(size_t j = 0; j< images.size(); j++){ images[j]->kill(); - images[j]->paintBlink(); + images[j]->paintBlink(timer); } ShowHint("Testmenu: Records", "Record test ...", 200, 30, NULL, NEUTRINO_ICON_HINT_RECORDING, CComponentsHeader::CC_BTN_EXIT); diff --git a/src/gui/test_menu.h b/src/gui/test_menu.h index 20c4937b1..84cacac6e 100644 --- a/src/gui/test_menu.h +++ b/src/gui/test_menu.h @@ -54,6 +54,7 @@ class CTestMenu : public CMenuTarget CComponentsChannelLogo* chnl_pic; CComponentsExtTextForm* text_ext; CComponentsScrollBar* scrollbar; + CComponentsTimer *timer; int width, selected; int showTestMenu(); diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 0d19fafa6..858ea0ac2 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -183,6 +183,7 @@ #define NEUTRINO_ICON_STAR_OFF "star-off" #define NEUTRINO_ICON_TMDB "tmdb" #define NEUTRINO_ICON_IMDB "imdb" +#define NEUTRINO_ICON_PICTUREVIEWER "pictureviewer" #define DUMMY_ICON "dummy" diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 655f3a4fc..d4600470f 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1342,10 +1342,9 @@ void CMenuWidget::paintItems() if(total_pages>1) { int item_height=height-(item_start_y-y); - frameBuffer->paintBoxRel(x+ width,item_start_y, 15, item_height, COL_SCROLLBAR_PASSIVE_PLUS_0, RADIUS_MIN); - frameBuffer->paintBoxRel(x+ width +2, item_start_y+ 2+ current_page*(item_height-4)/total_pages, 11, (item_height-4)/total_pages, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_MIN); - /* background of menu items, paint every time because different items can have - * different height and this might leave artifacts otherwise after changing pages */ + paintScrollBar(x+ width, item_start_y, 15, item_height, total_pages, current_page); +// /* background of menu items, paint every time because different items can have +// * different height and this might leave artifacts otherwise after changing pages */ frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); } diff --git a/src/system/locals.h b/src/system/locals.h index e16443b72..2fececf52 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2714,6 +2714,7 @@ typedef enum LOCALE_USERMENU_TITLE_GREEN, LOCALE_USERMENU_TITLE_RED, LOCALE_USERMENU_TITLE_YELLOW, + LOCALE_USERMENUS_HEAD, LOCALE_VIDEO_MODE_OK, LOCALE_VIDEOMENU_43MODE, LOCALE_VIDEOMENU_ANALOG_AUTO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index fa5ccbd91..aa8fce3bd 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2714,6 +2714,7 @@ const char * locale_real_names[] = "usermenu.title_green", "usermenu.title_red", "usermenu.title_yellow", + "usermenus.head", "video_mode_ok", "videomenu.43mode", "videomenu.analog_auto",