- cc_item_infobox: user OFFSET defines; fix width of textbox

This commit is contained in:
svenhoefer
2016-10-13 19:03:38 +02:00
parent c915f857d7
commit e8e237df40

View File

@@ -70,7 +70,7 @@ CComponentsInfoBox::CComponentsInfoBox( const int& x_pos,
pic = NULL; pic = NULL;
cctext = NULL; cctext = NULL;
pic_name = ""; pic_name = "";
x_offset = 10; x_offset = OFFSET_INNER_MID;
initParent(parent); initParent(parent);
} }
@@ -155,7 +155,7 @@ void CComponentsInfoBox::paint(bool do_save_bg)
//calculate vars for x-position and dimensions //calculate vars for x-position and dimensions
int tx = x_offset + x_text + pic_w; int tx = x_offset + x_text + pic_w;
int tw = width - x_offset - pic_w - 2*fr_thickness; int tw = width - 2*x_offset - pic_w - 2*fr_thickness;
int th = height-2*fr_thickness; int th = height-2*fr_thickness;
cctext->setDimensionsAll(tx, y_text, tw, th); cctext->setDimensionsAll(tx, y_text, tw, th);