diff --git a/src/gui/components/cc_item_progressbar.cpp b/src/gui/components/cc_item_progressbar.cpp index a04fce28c..037d5754c 100644 --- a/src/gui/components/cc_item_progressbar.cpp +++ b/src/gui/components/cc_item_progressbar.cpp @@ -508,23 +508,8 @@ void CProgressBar::paintProgress(bool do_save_bg) //NI graphic void CProgressBar::paintGraphic() { - std::ostringstream buf; - - buf.str(""); - buf << ICONSDIR_VAR << "/" << graphic_file << ".png"; - if (access(buf.str().c_str(), F_OK) != 0) { - buf.str(""); - buf << ICONSDIR << "/" << graphic_file << ".png"; - } - std::string pb_active_graphic(buf.str()); - - buf.str(""); - buf << ICONSDIR_VAR << "/" << graphic_file << "_passive.png"; - if (access(buf.str().c_str(), F_OK) != 0) { - buf.str(""); - buf << ICONSDIR << "/" << graphic_file << "_passive.png"; - } - std::string pb_passive_graphic(buf.str()); + std::string pb_active_graphic(frameBuffer->getIconPath(graphic_file)); + std::string pb_passive_graphic(frameBuffer->getIconPath(graphic_file + "_passive")); //printf("**** %04d::%04d: pb_last_width: %d, pb_active_width: %d, pb_max_width %d\n", pb_x, pb_y, pb_last_width, pb_active_width, pb_max_width); diff --git a/src/gui/components/cc_item_progressbar.h b/src/gui/components/cc_item_progressbar.h index 02d351c26..6ea067c04 100644 --- a/src/gui/components/cc_item_progressbar.h +++ b/src/gui/components/cc_item_progressbar.h @@ -136,7 +136,7 @@ class CProgressBar : public CComponentsItem 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;} //NI graphic - void setGraphic(std::string graphic = "progressbar"){graphic_file = graphic;}; + void setGraphic(std::string graphic) { graphic_file = graphic; } ///force update on next paint void reset() { pb_last_width = -1; }