diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index d5d093a6a..102efd4c1 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -47,6 +47,9 @@ static int cfg_national_subset; static int screen_x, screen_y, screen_w, screen_h; +void FillRect(int x, int y, int w, int h, fb_pixel_t color, bool modeFullColor=false); +void FillBorder(fb_pixel_t color, bool modeFullColor=false); + fb_pixel_t *getFBp(int *y) { if (*y < (int)var_screeninfo.yres) @@ -56,34 +59,31 @@ fb_pixel_t *getFBp(int *y) return lbb; } -void FillRect(int x, int y, int w, int h, int color) +void FillRect(int x, int y, int w, int h, fb_pixel_t color, bool modeFullColor/*=false*/) { - if(color < 0 || SIZECOLTABLE < color){ - printf("FIXME array size %i color %i not in range\n",SIZECOLTABLE,color); - return; - } fb_pixel_t *p = getFBp(&y); MARK_FB(x, y, w, h); p += x + y * stride; - if (w > 0) + if (w > 0) { + fb_pixel_t col = (modeFullColor) ? color : bgra[color]; for (int count = 0; count < h; count++) { fb_pixel_t *dest0 = p; for (int i = 0; i < w; i++) - *(dest0++) = bgra[color]; + *(dest0++) = col; p += stride; } + } } - -void FillBorder(int color) +void FillBorder(fb_pixel_t color, bool modeFullColor/*=false*/) { int ys = (var_screeninfo.yres-var_screeninfo.yoffset); - FillRect(0 , ys ,StartX ,var_screeninfo.yres ,color); - FillRect(StartX, ys ,displaywidth,StartY ,color); - FillRect(StartX, ys+StartY+25*fontheight,displaywidth,var_screeninfo.yres-(StartY+25*fontheight),color); + FillRect(0 , ys ,StartX ,var_screeninfo.yres ,color, modeFullColor); + FillRect(StartX, ys ,displaywidth,StartY ,color, modeFullColor); + FillRect(StartX, ys+StartY+25*fontheight,displaywidth,var_screeninfo.yres-(StartY+25*fontheight),color, modeFullColor); if (screenmode == 0 ) - FillRect(StartX+displaywidth, ys,var_screeninfo.xres-(StartX+displaywidth),var_screeninfo.yres ,color); + FillRect(StartX+displaywidth, ys,var_screeninfo.xres-(StartX+displaywidth),var_screeninfo.yres ,color, modeFullColor); } int getIndexOfPageInHotlist() @@ -258,7 +258,7 @@ void RenderClearMenuLineBB(char *p, tstPageAttr *attrcol, tstPageAttr *attr) memset(p-TOPMENUCHARS, ' ', TOPMENUCHARS); /* init with spaces */ } -void ClearBB(int color) +void ClearBB(fb_pixel_t color) { FillRect(0, (var_screeninfo.yres - var_screeninfo.yoffset), var_screeninfo.xres, var_screeninfo.yres, color); } @@ -270,7 +270,7 @@ void ClearFB(int /*color*/) } #if 0 //never used -void ClearB(int color) +void ClearB(fb_pixel_t color) { FillRect(0, 0, var_screeninfo.xres, var_screeninfo.yres, color); /* framebuffer */ FillRect(0, var_screeninfo.yres, var_screeninfo.xres, var_screeninfo.yres, color); /* backbuffer */ @@ -841,7 +841,7 @@ int eval_triplet(int iOData, tstCachedPage *pstCachedPage, { *pAPy = RowAddress2Row(iAddress); /* new Active Row */ - int color = iData & 0x1f; + fb_pixel_t color = iData & 0x1f; int row = *pAPy0 + *pAPy; int maxrow; #if TUXTXT_DEBUG @@ -892,7 +892,7 @@ int eval_triplet(int iOData, tstCachedPage *pstCachedPage, *pAPx = *pAPy = 0; /* new Active Position 0,0 */ if (*endcol == 40) /* active object */ { - int color = iData & 0x1f; + fb_pixel_t color = iData & 0x1f; int row = *pAPy0; // + *pAPy; int maxrow; @@ -4096,7 +4096,7 @@ void RenderDRCS( //FIX ME } -void DrawVLine(int x, int y, int l, int color) +void DrawVLine(int x, int y, int l, fb_pixel_t color) { fb_pixel_t *p = getFBp(&y); MARK_FB(x, y, 0, l); @@ -4109,7 +4109,7 @@ void DrawVLine(int x, int y, int l, int color) } } -void DrawHLine(int x, int y, int l, int color) +void DrawHLine(int x, int y, int l, fb_pixel_t color) { int ltmp; fb_pixel_t *p = getFBp(&y); @@ -4130,7 +4130,7 @@ void FillRectMosaicSeparated(int x, int y, int w, int h, int fgcolor, int bgcolo } } -void FillTrapez(int x0, int y0, int l0, int xoffset1, int h, int l1, int color) +void FillTrapez(int x0, int y0, int l0, int xoffset1, int h, int l1, fb_pixel_t color) { fb_pixel_t *p = getFBp(&y0); MARK_FB(x0, y0, l0, h); @@ -4789,7 +4789,7 @@ void RenderChar(int Char, tstPageAttr *Attribute, int zoom, int yoffset) { for (Bit = 0x80; Bit; Bit >>= 1) { - int color; + fb_pixel_t color; if (--pixtodo < 0) break; @@ -5559,7 +5559,7 @@ void CopyBB2FB() /* adapt background of backbuffer if changed */ if (StartX > 0 && *lfb != *lbb) { - FillBorder(*lbb); + FillBorder(*lbb, true); // ClearBB(*(lfb + var_screeninfo.xres * var_screeninfo.yoffset)); } diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 6a573308c..3a398de36 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1825,7 +1825,7 @@ void CAudioPlayerGui::paintTitleBox() if (!m_titlebox) { m_titlebox = new CComponentsShapeSquare(m_x, m_y, m_width, m_title_height, NULL, CC_SHADOW_ON); - m_titlebox->enableFrame(true, FRAME_MIN_WIDTH); + m_titlebox->enableFrame(true, FRAME_WIDTH_MIN); m_titlebox->setCorner(RADIUS_LARGE); } m_titlebox->paint(false); diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 771bbd3f2..3c7a937d0 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -333,10 +333,14 @@ void CComponentsFooter::paintButtons(const int& x_pos, Font* font, bool do_save_bg) { + int lw = label_width; + if (label_count > 0 && label_width == 0) + lw = (w/label_count) - 2*cch_offset; + this->setDimensionsAll(x_pos, y_pos, w, h); this->setButtonFont(font); this->setContextButton(context_buttons); - this->setButtonLabels(content, label_count, 0, label_width ? label_width : (w/label_count) - 2*cch_offset); + this->setButtonLabels(content, label_count, 0, lw); this->paint(do_save_bg); } diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index a45705234..1262c5c6e 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3557,7 +3557,9 @@ bool CMovieBrowser::showMenu(bool calledExternally) if (!calledExternally) { CMenuWidget mainMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); mainMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_MAIN_HEAD); - mainMenu.addItem(new CMenuForwarder(m_movieSelectionHandler->epgTitle, false)); + if (m_movieSelectionHandler){ + mainMenu.addItem(new CMenuForwarder(m_movieSelectionHandler->epgTitle, false)); + } mainMenu.addItem(GenericMenuSeparator); mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD, (m_movieSelectionHandler != NULL), NULL, this, "show_movie_info_menu", CRCInput::RC_red)); mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_CUT_HEAD, (m_movieSelectionHandler != NULL), NULL, this, "show_movie_cut_menu", CRCInput::RC_green)); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index add4e8bcd..5037198c1 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1317,6 +1317,11 @@ bool CMoviePlayerGui::SetPosition(int pos, bool absolute) { clearSubtitle(); bool res = playback->SetPosition(pos, absolute); + if(is_file_player && res && speed == 0 && playstate == CMoviePlayerGui::PAUSE){ + playstate = CMoviePlayerGui::PLAY; + speed = 1; + playback->SetSpeed(speed); + } return res; } @@ -1614,7 +1619,8 @@ void CMoviePlayerGui::PlayFileLoop(void) makeScreenShot(); } else if ((msg == (neutrino_msg_t) g_settings.mpkey_rewind) || (msg == (neutrino_msg_t) g_settings.mpkey_forward)) { - int newspeed; + int newspeed = 0; + bool setSpeed = false; if (msg == (neutrino_msg_t) g_settings.mpkey_rewind) { newspeed = (speed >= 0) ? -1 : speed - 1; } else { @@ -1627,9 +1633,10 @@ void CMoviePlayerGui::PlayFileLoop(void) if (playstate != CMoviePlayerGui::PAUSE) playstate = msg == (neutrino_msg_t) g_settings.mpkey_rewind ? CMoviePlayerGui::REW : CMoviePlayerGui::FF; updateLcd(); + setSpeed = true; } - if (!FileTimeOSD->IsVisible() && !time_forced) { + if (!FileTimeOSD->IsVisible() && !time_forced && setSpeed) { FileTimeOSD->switchMode(position, duration); time_forced = true; } diff --git a/src/system/settings.h b/src/system/settings.h index 6c63e5494..bd5a0a5be 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -1006,7 +1006,7 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define SCROLLBAR_WIDTH (OFFSET_INNER_MID + 2*OFFSET_INNER_MIN) -#define FRAME_MIN_WIDTH 1 +#define FRAME_WIDTH_MIN 1 #define DETAILSLINE_WIDTH CFrameBuffer::getInstance()->scale2Res(16)