diff --git a/src/gui/components/cc_detailsline.cpp b/src/gui/components/cc_detailsline.cpp index 6b49e3032..809e76491 100644 --- a/src/gui/components/cc_detailsline.cpp +++ b/src/gui/components/cc_detailsline.cpp @@ -88,7 +88,7 @@ CComponentsDetailsLine::~CComponentsDetailsLine() //paint details line with current parameters -void CComponentsDetailsLine::paint(bool do_save_bg) +void CComponentsDetailsLine::paint(const bool &do_save_bg) { hide(); if (hasChanges()) diff --git a/src/gui/components/cc_detailsline.h b/src/gui/components/cc_detailsline.h index 48f44635e..1194b767e 100644 --- a/src/gui/components/cc_detailsline.h +++ b/src/gui/components/cc_detailsline.h @@ -77,7 +77,7 @@ class CComponentsDetailsLine : public CComponents void setLineWidth(const int& w){dl_w = w;} ///paint all to screen - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; #endif diff --git a/src/gui/components/cc_draw.cpp b/src/gui/components/cc_draw.cpp index bcdb1aaab..229c69289 100644 --- a/src/gui/components/cc_draw.cpp +++ b/src/gui/components/cc_draw.cpp @@ -498,7 +498,7 @@ void CCDraw::enablePaintCache(bool enable) } //paint framebuffer layers -void CCDraw::paintFbItems(bool do_save_bg) +void CCDraw::paintFbItems(const bool &do_save_bg) { //Pick up signal if filled and execute slots. OnBeforePaintLayers(); diff --git a/src/gui/components/cc_draw.h b/src/gui/components/cc_draw.h index 51c27e4c4..3dd1f33ca 100644 --- a/src/gui/components/cc_draw.h +++ b/src/gui/components/cc_draw.h @@ -156,7 +156,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes ///rendering of framebuffer elements at once, ///elements are contained in v_fbdata, presumes added frambuffer elements with paintInit(), ///parameter do_save_bg=true, saves background of element to pixel buffer, this can be restore with hide() - void paintFbItems(bool do_save_bg = true); + void paintFbItems(const bool &do_save_bg = true); public: ///basic component class constructor. @@ -306,7 +306,7 @@ class CCDraw : public COSDFader, public CComponentsSignals, public CCTypes int getColBodyGradientMode(){return cc_body_gradient_enable;} ///abstract: paint item, arg: do_save_bg see paintInit() above - virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES) = 0; + virtual void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES) = 0; ///paint item, same like paint(CC_SAVE_SCREEN_NO) but without any argument void paint0(){paint(CC_SAVE_SCREEN_NO);} ///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 4e27d304d..c160b1187 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -341,7 +341,7 @@ void CComponentsForm::exchangeCCItem(CComponentsItem* item_a, CComponentsItem* i exchangeCCItem(getCCItemId(item_a), getCCItemId(item_b)); } -void CComponentsForm::paintForm(bool do_save_bg) +void CComponentsForm::paintForm(const bool &do_save_bg) { //paint body if (!is_painted || force_paint_bg || shadow_force) @@ -351,7 +351,7 @@ void CComponentsForm::paintForm(bool do_save_bg) paintCCItems(); } -void CComponentsForm::paint(bool do_save_bg) +void CComponentsForm::paint(const bool &do_save_bg) { if(is_painted) OnBeforeRePaint(); @@ -368,7 +368,7 @@ bool CComponentsForm::isPageChanged() return false; } -void CComponentsForm::paintPage(const uint8_t& page_number, bool do_save_bg) +void CComponentsForm::paintPage(const uint8_t& page_number, const bool &do_save_bg) { cur_page = page_number; paint(do_save_bg); @@ -724,3 +724,4 @@ int CComponentsForm::getUsedDX() return x_res; } + diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index b44cd5a66..1cee4ecb4 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -36,7 +36,7 @@ class CComponentsForm : public CComponentsItem { protected: std::vector v_cc_items; - void paintForm(bool do_save_bg); + void paintForm(const bool &do_save_bg); ///generates next possible index for an item, see also cc_item_index, getIndex(), setIndex() int genIndex(); @@ -77,7 +77,7 @@ class CComponentsForm : public CComponentsItem virtual ~CComponentsForm(); ///paints current form on screen, for paint a page use paintPage() - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); ///same like CComponentsItem::kill(), but erases all embedded items inside of parent at once, this = parent ///NOTE: Items always have parent bindings to "this" and use the parent background color as default! Set parameter 'ignore_parent=true' to ignore parent background color! @@ -170,7 +170,7 @@ class CComponentsForm : public CComponentsItem ///get current page uint8_t getCurrentPage(){return cur_page;}; ///paint defined page number 0...n - void paintPage(const uint8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO); + void paintPage(const uint8_t& page_number, const bool &do_save_bg = CC_SAVE_SCREEN_NO); ///enum page scroll modes enum { diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 81df0ffdb..e8d282531 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -288,7 +288,7 @@ void CComponentsButton::initCCBtnItems() } -void CComponentsButton::paint(bool do_save_bg) +void CComponentsButton::paint(const bool &do_save_bg) { //prepare items before paint initCCBtnItems(); diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index 272f86da8..f23be2014 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -173,7 +173,7 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen void Refresh(){initCCBtnItems();}; ///paint button object - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); /** * Assigns a single event msg value to button object diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 5f16adb3b..e7165427d 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -381,7 +381,7 @@ bool CComponentsFrmClock::Stop() return false; } -void CComponentsFrmClock::paint(bool do_save_bg) +void CComponentsFrmClock::paint(const bool &do_save_bg) { //prepare items before paint initCCLockItems(); diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index 86bb936d0..8680baeaa 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -159,7 +159,7 @@ class CComponentsFrmClock : public CComponentsForm, public CCTextScreen void setClockInterval(const int& seconds){cl_interval = seconds;} ///show clock on screen - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); ///hide clock on screen void hide(){Stop(); CComponentsForm::hide();} ///does the same like kill() from base class, but stopping clock before kill diff --git a/src/gui/components/cc_frm_ext_text.cpp b/src/gui/components/cc_frm_ext_text.cpp index 239ba383a..d402bd984 100644 --- a/src/gui/components/cc_frm_ext_text.cpp +++ b/src/gui/components/cc_frm_ext_text.cpp @@ -229,7 +229,7 @@ void CComponentsExtTextForm::setLabelWidthPercent(const uint8_t& percent_val) initCCTextItems(); } -void CComponentsExtTextForm::paint(bool do_save_bg) +void CComponentsExtTextForm::paint(const bool &do_save_bg) { //prepare items before paint initCCTextItems(); diff --git a/src/gui/components/cc_frm_ext_text.h b/src/gui/components/cc_frm_ext_text.h index 4e37efd0f..7c5edbe95 100644 --- a/src/gui/components/cc_frm_ext_text.h +++ b/src/gui/components/cc_frm_ext_text.h @@ -152,7 +152,7 @@ class CComponentsExtTextForm : public CComponentsForm, public CCTextScreen Font* getFont(){return ccx_font;} ///paint this item/form - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; #endif diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 858ee4c8b..dc4a40515 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -381,7 +381,7 @@ void CComponentsFooter::paintButtons(const int& x_pos, const int& label_width, const int& context_buttons, Font* font, - bool do_save_bg) + const bool &do_save_bg) { this->setDimensionsAll(x_pos, y_pos, w, h); this->setButtonFont(font); diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 0691f411f..142eeeb80 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -143,7 +143,7 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect const int& label_width = 0, const int& context_buttons = 0, Font* font = g_Font[SNeutrinoSettings::FONT_TYPE_BUTTON_TEXT], - bool do_save_bg = CC_SAVE_SCREEN_NO + const bool &do_save_bg = CC_SAVE_SCREEN_NO ); enum diff --git a/src/gui/components/cc_frm_header.cpp b/src/gui/components/cc_frm_header.cpp index 6b866ac24..31bdf3fd8 100644 --- a/src/gui/components/cc_frm_header.cpp +++ b/src/gui/components/cc_frm_header.cpp @@ -707,7 +707,7 @@ void CComponentsHeader::initCCItems() initLogo(); } -void CComponentsHeader::paint(bool do_save_bg) +void CComponentsHeader::paint(const bool &do_save_bg) { //prepare items initCCItems(); diff --git a/src/gui/components/cc_frm_header.h b/src/gui/components/cc_frm_header.h index 1d8ac71fa..678ddd4fc 100644 --- a/src/gui/components/cc_frm_header.h +++ b/src/gui/components/cc_frm_header.h @@ -328,7 +328,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen, CCHeaderT void disableClock(); ///paint header - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); ///hides item, arg: no_restore see hideCCItem() void hide(){disableClock(); CComponentsForm::hide();} diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index c9476d7bc..b007dcc67 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -233,7 +233,7 @@ void CSignalBar::paintScale() } } -void CSignalBar::paint(bool do_save_bg) +void CSignalBar::paint(const bool &do_save_bg) { //initialize before and paint frame and body if (!is_painted){ @@ -353,7 +353,7 @@ void CSignalBox::paintScale() snrbar->paint/*Scale*/(false); } -void CSignalBox::paint(bool do_save_bg) +void CSignalBox::paint(const bool &do_save_bg) { //paint frame and body if (!is_painted) diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index 3a4cde963..a33c0a352 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -146,7 +146,7 @@ class CSignalBar : public CComponentsForm, public CCTextScreen virtual int getScaleWidth(){ return sb_scale_width;}; ///paint this items - virtual void paint(bool do_save_bg); + virtual void paint(const bool &do_save_bg); //returns the current signal value uint16_t getValue(void) { return sb_signal; } @@ -329,7 +329,7 @@ class CSignalBox : public CComponentsForm, public CCTextScreen fb_pixel_t getPassiveColor(){return sbx_passive_color;}; ///paint items - void paint(bool do_save_bg); + void paint(const bool &do_save_bg); ///return current signal value uint16_t getSignalValue(void) { return sbar->getValue();} diff --git a/src/gui/components/cc_frm_slider.cpp b/src/gui/components/cc_frm_slider.cpp index 9c022cad3..8284f1dc8 100644 --- a/src/gui/components/cc_frm_slider.cpp +++ b/src/gui/components/cc_frm_slider.cpp @@ -157,7 +157,7 @@ void CComponentsSlider::setSliderIcon(const std::string &icon_name) initCCSlSlider(); } -// void CComponentsSlider::paint(bool do_save_bg) +// void CComponentsSlider::paint(const bool &do_save_bg) // { // //prepare items before paint // initCCSlItems(); diff --git a/src/gui/components/cc_frm_slider.h b/src/gui/components/cc_frm_slider.h index afa7a13bf..1c0d4c624 100644 --- a/src/gui/components/cc_frm_slider.h +++ b/src/gui/components/cc_frm_slider.h @@ -76,7 +76,7 @@ class CComponentsSlider : public CComponentsForm void setValueScale(const int& min_value, const int& max_value); void setSliderIcon(const std::string &icon_name); -// void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); +// void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; #endif diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index c60aab34d..ca1385136 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -432,7 +432,7 @@ void CComponentsWindow::enablePageScroll(const int& mode) ccw_body->enablePageScroll(mode); } -void CComponentsWindow::paintCurPage(bool do_save_bg) +void CComponentsWindow::paintCurPage(const bool &do_save_bg) { if (is_painted) //ensure that we have painted already the parent form before paint body ccw_body->paint(do_save_bg); @@ -440,13 +440,13 @@ void CComponentsWindow::paintCurPage(bool do_save_bg) paint(do_save_bg); } -void CComponentsWindow::paintPage(const uint8_t& page_number, bool do_save_bg) +void CComponentsWindow::paintPage(const uint8_t& page_number, const bool &do_save_bg) { CComponentsWindow::setCurrentPage(page_number); CComponentsWindow::paintCurPage(do_save_bg); } -void CComponentsWindow::paint(bool do_save_bg) +void CComponentsWindow::paint(const bool &do_save_bg) { //prepare items before paint initCCWItems(); diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index e3cb65ebc..199ff5759 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -385,7 +385,7 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes * @param[in] do_save_bg * @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode */ - void paintCurPage(bool do_save_bg = CC_SAVE_SCREEN_NO); + void paintCurPage(const bool &do_save_bg = CC_SAVE_SCREEN_NO); /** * Paints defined page of body, parameter number 0...n @@ -394,7 +394,7 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes * @param[in] do_save_bg * @li optional: expects type bool, default = CC_SAVE_SCREEN_NO (false), sets background save mode */ - void paintPage(const uint8_t& page_number, bool do_save_bg = CC_SAVE_SCREEN_NO); + void paintPage(const uint8_t& page_number, const bool &do_save_bg = CC_SAVE_SCREEN_NO); /** * enable/disable page scroll @@ -420,7 +420,7 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes * @param[in] do_save_bg * @li optional: expects type bool, sets background save mode */ - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); /** * Adds an additional exec key to current collection, default exit keys are CRCInput::RC_home and CRCInput::RC_setup diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 0bbf45e60..7d9261348 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -65,7 +65,7 @@ void CComponentsItem::initParent(CComponentsForm* parent) // init container properties in cc-items for shadow, background and frame. // This member must be called first in all paint() members before paint other items into the container. // If backround is not required, it's possible to override this with variable paint_bg=false, use doPaintBg(true/false) to set this! -void CComponentsItem::paintInit(bool do_save_bg) +void CComponentsItem::paintInit(const bool &do_save_bg) { if (hasChanges()){ clearFbData(); diff --git a/src/gui/components/cc_item.h b/src/gui/components/cc_item.h index 08b4336ac..6c357001a 100644 --- a/src/gui/components/cc_item.h +++ b/src/gui/components/cc_item.h @@ -59,7 +59,7 @@ class CComponentsItem : public CComponents ///If backround is not required, it's possible to override this with variable paint_bg=false, use doPaintBg(true/false) to set this! ///arg do_save_bg=false avoids using of unnecessary pixel memory, eg. if no hide with restore is provided. This is mostly the case whenever ///an item will be hide or overpainted with other methods, or it's embedded (bound) in a parent form. - void paintInit(bool do_save_bg); + void paintInit(const bool &do_save_bg); ///add "this" current item to parent void initParent(CComponentsForm* parent); diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index f1df156d1..83101c483 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -138,7 +138,7 @@ void CComponentsInfoBox::paintPicture() pic->paint(CC_SAVE_SCREEN_NO); } -void CComponentsInfoBox::paint(bool do_save_bg) +void CComponentsInfoBox::paint(const bool &do_save_bg) { paintInit(do_save_bg); paintPicture(); diff --git a/src/gui/components/cc_item_infobox.h b/src/gui/components/cc_item_infobox.h index afad2989d..7733615a5 100644 --- a/src/gui/components/cc_item_infobox.h +++ b/src/gui/components/cc_item_infobox.h @@ -88,7 +88,7 @@ class CComponentsInfoBox : public CComponentsText ///retur internal picture object CComponentsPicture * getPictureObject(){return pic;} ///paint item - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; #endif diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 6576e1756..a612ca22e 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -343,7 +343,7 @@ void CComponentsPicture::paintPicture() } } -void CComponentsPicture::paint(bool do_save_bg) +void CComponentsPicture::paint(const bool &do_save_bg) { if (pic_name.empty()) return; diff --git a/src/gui/components/cc_item_picture.h b/src/gui/components/cc_item_picture.h index a29c056f2..f6c12bcd7 100644 --- a/src/gui/components/cc_item_picture.h +++ b/src/gui/components/cc_item_picture.h @@ -179,7 +179,7 @@ class CComponentsPicture : public CComponentsItem void SetTransparent(int t){ image_transparent = t; } ///paint item - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); ///hide item, see also CComponents::hide(); void hide(); diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp index 5b94608ed..02c574666 100644 --- a/src/gui/components/cc_item_progressbar.cpp +++ b/src/gui/components/cc_item_progressbar.cpp @@ -371,7 +371,7 @@ void CProgressBarCache::pbcApplyGradient(fb_pixel_t *b) } } -void CProgressBar::paintProgress(bool do_save_bg) +void CProgressBar::paintProgress(const bool &do_save_bg) { if (*pb_design == PB_OFF) { paintInit(false); @@ -416,7 +416,7 @@ void CProgressBar::paintProgress(bool do_save_bg) } -void CProgressBar::paint(bool do_save_bg) +void CProgressBar::paint(const bool &do_save_bg) { paintProgress(do_save_bg); } diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index dbc5644cd..f5ea152d4 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -150,7 +150,7 @@ class CProgressBar : public CComponentsItem void initDimensions(); ///paints graph - void paintProgress(bool do_save_bg = CC_SAVE_SCREEN_NO); + void paintProgress(const bool &do_save_bg = CC_SAVE_SCREEN_NO); public: ///parameters: @@ -198,7 +198,7 @@ class CProgressBar : public CComponentsItem ///force update on next paint void reset() { pb_last_width = -1; } - void paint(bool do_save_bg = CC_SAVE_SCREEN_NO); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_NO); enum pb_color_t { PB_OFF = -2, /* -2 */ diff --git a/src/gui/components/cc_item_shapes.cpp b/src/gui/components/cc_item_shapes.cpp index dccd1b5a4..e9f412453 100644 --- a/src/gui/components/cc_item_shapes.cpp +++ b/src/gui/components/cc_item_shapes.cpp @@ -56,7 +56,7 @@ CComponentsShapeSquare::CComponentsShapeSquare( const int x_pos, const int y_pos initParent(parent); } -void CComponentsShapeSquare::paint(bool do_save_bg) +void CComponentsShapeSquare::paint(const bool &do_save_bg) { paintInit(do_save_bg); } @@ -105,7 +105,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam, // // + - + -void CComponentsShapeCircle::paint(bool do_save_bg) +void CComponentsShapeCircle::paint(const bool &do_save_bg) { paintInit(do_save_bg); } diff --git a/src/gui/components/cc_item_shapes.h b/src/gui/components/cc_item_shapes.h index 0f926c011..677ef8dfd 100644 --- a/src/gui/components/cc_item_shapes.h +++ b/src/gui/components/cc_item_shapes.h @@ -57,7 +57,7 @@ class CComponentsShapeCircle : public CComponentsItem inline int getDiam() const {return d;}; ///paint item - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; class CComponentsShapeSquare : public CComponentsItem @@ -70,7 +70,7 @@ class CComponentsShapeSquare : public CComponentsItem fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 3d57ae8c7..447984fc7 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -278,7 +278,7 @@ bool CComponentsText::setTextFromFile(const string& path_to_textfile, const int return setText(txt, mode, font_text, color_text, style); } -void CComponentsText::paintText(bool do_save_bg) +void CComponentsText::paintText(const bool &do_save_bg) { if (cc_parent){ if(!cc_parent->OnAfterPaintBg.empty()) @@ -300,7 +300,7 @@ void CComponentsText::paintText(bool do_save_bg) ct_text_sent = false; } -void CComponentsText::paint(bool do_save_bg) +void CComponentsText::paint(const bool &do_save_bg) { OnBeforePaint(); paintText(do_save_bg); diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index e017edd7e..97f8798f5 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -96,7 +96,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem void initCBox(); ///paint CCItem backckrond (if paint_bg=true), apply initCCText() and send paint() to the CTextBox object - void paintText(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paintText(const bool &do_save_bg = CC_SAVE_SCREEN_YES); public: enum { FONT_STYLE_REGULAR = 0, @@ -136,7 +136,7 @@ class CComponentsText : public CCTextScreen, public CComponentsItem ///remove textbox from screen void kill(const fb_pixel_t& bg_color = COL_BACKGROUND_PLUS_0, const int& corner_radius = -1, const int& fblayer_type = CC_FBDATA_TYPES); ///paint text box, parameter do_save_bg: default = true, causes fill of backckrond pixel buffer - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); ///send options for text font (size and type), color and mode (allignment) void setTextFont(Font* font_text); diff --git a/src/gui/components/cc_item_tvpic.cpp b/src/gui/components/cc_item_tvpic.cpp index d6787861c..4397b09f9 100644 --- a/src/gui/components/cc_item_tvpic.cpp +++ b/src/gui/components/cc_item_tvpic.cpp @@ -77,7 +77,7 @@ CComponentsPIP::~CComponentsPIP() // videoDecoder->Pig(-1, -1, -1, -1); } -void CComponentsPIP::paint(bool do_save_bg) +void CComponentsPIP::paint(const bool &do_save_bg) { //NOTE: real values are reqiured, if we paint not bound items or an own render methodes int pig_x = (cc_parent ? cc_xr : x) + fr_thickness; diff --git a/src/gui/components/cc_item_tvpic.h b/src/gui/components/cc_item_tvpic.h index 373a88490..7ab2bb3fd 100644 --- a/src/gui/components/cc_item_tvpic.h +++ b/src/gui/components/cc_item_tvpic.h @@ -65,7 +65,7 @@ class CComponentsPIP : public CComponentsItem void setPicture(const std::string& image){pic_name = image;}; ///show tv box - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); ///remove tv box from screen void hide(); }; diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 1f057b6e0..c19ac7919 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -247,7 +247,7 @@ void CVolumeBar::paintVolScale() vb_pb->paint(CC_SAVE_SCREEN_NO); } -void CVolumeBar::paint(bool do_save_bg) +void CVolumeBar::paint(const bool &do_save_bg) { //prepare items initVolumeBarItems(); diff --git a/src/gui/volumebar.h b/src/gui/volumebar.h index cfc201305..e95ffc540 100644 --- a/src/gui/volumebar.h +++ b/src/gui/volumebar.h @@ -89,7 +89,7 @@ class CVolumeBar : public CComponentsForm // ~CVolumeBar(); inherited from CComponentsForm void repaintVolScale(); - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; diff --git a/src/gui/widget/helpbox.h b/src/gui/widget/helpbox.h index 238a79c1b..4165e79c8 100644 --- a/src/gui/widget/helpbox.h +++ b/src/gui/widget/helpbox.h @@ -74,7 +74,7 @@ public: const char* Icon = NEUTRINO_ICON_INFO); ///show = paint, for compatibility - void show(bool do_save_bg = true){ paint(do_save_bg) ;} + void show(const bool &do_save_bg = true){ paint(do_save_bg) ;} /**Adds an item with pre defined text diff --git a/src/gui/widget/navibar.cpp b/src/gui/widget/navibar.cpp index 925b2f449..a8b8b3833 100644 --- a/src/gui/widget/navibar.cpp +++ b/src/gui/widget/navibar.cpp @@ -115,7 +115,7 @@ void CNaviBar::initCCItems() } -void CNaviBar::paint(bool do_save_bg) +void CNaviBar::paint(const bool &do_save_bg) { hideCCItems(); nb_lText->hide(); diff --git a/src/gui/widget/navibar.h b/src/gui/widget/navibar.h index 48740ec04..21d6759d5 100644 --- a/src/gui/widget/navibar.h +++ b/src/gui/widget/navibar.h @@ -162,7 +162,7 @@ class CNaviBar : public CComponentsFrmChain * @param[in] do_save_bg * @li optional: expects type bool, default = CC_SAVE_SCREEN_YES. */ - void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); + void paint(const bool &do_save_bg = CC_SAVE_SCREEN_YES); }; #endif diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index 50626c232..19fd6568a 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -211,7 +211,7 @@ int CProgressWindow::exec(CMenuTarget* parent, const string & /*actionKey*/) return menu_return::RETURN_REPAINT; } -void CProgressWindow::paint(bool do_save_bg) +void CProgressWindow::paint(const bool &do_save_bg) { fitItems(); CComponentsWindow::paint(do_save_bg); diff --git a/src/gui/widget/progresswindow.h b/src/gui/widget/progresswindow.h index da88911f3..fed2bd940 100644 --- a/src/gui/widget/progresswindow.h +++ b/src/gui/widget/progresswindow.h @@ -285,7 +285,7 @@ class CProgressWindow : public CComponentsWindow, public CMenuTarget * @param[in] do_save_bg * @li optional: expects type bool, sets background save mode */ - void paint(bool do_save_bg = true); + void paint(const bool &do_save_bg = true); }; class CProgressSignals : public sigc::trackable