From 53e19aaae267e136304618c42cab1c14601da0ba Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 13 Nov 2021 18:56:47 +0100 Subject: [PATCH] cc_item_infobox: remove pic->isPicPainted(), pic->doPaintBg(false) not required --- src/gui/components/cc_item_infobox.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index d07ca8c5b..bbae7ee03 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -121,15 +121,10 @@ void CComponentsInfoBox::paintPicture() int y_pic = (cc_parent ? cc_yr : y) + fr_thickness; //init pic object and set icon paint position - string image = frameBuffer->getIconPath(pic_name); - pic = new CComponentsPicture(x_pic+x_offset, y_pic, pic_width, min(pic_height, height-2*fr_thickness), image); //NOTE: icons do not scale! + pic = new CComponentsPicture(x_pic+x_offset, y_pic, pic_width, min(pic_height, height-2*fr_thickness), pic_name); //NOTE: icons do not scale! pic->setColorBody(col_body_std); - //set gradient behavior of pic object - if (cc_body_gradient_enable) - pic->doPaintBg(false); - //fit icon into frame pic->setYPos(y_pic+(height-2*fr_thickness)/2-pic->getHeight()/2); @@ -150,7 +145,7 @@ void CComponentsInfoBox::paint(const bool &do_save_bg) //set text to the left border if picture is not painted int pic_w = 0; - if ((pic) && (pic->isPicPainted())) + if ((pic) && (pic->isPainted())) pic_w = pic->getWidth() + x_offset; //set text properties and paint text lines