CMenuWidget: ensure applying of changed header width while runtime

Width was not applied after changed osd settings e.g. changed corner types


Origin commit data
------------------
Branch: ni/coolstream
Commit: 6033df56a6
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-04-02 (Tue, 02 Apr 2019)



------------------
This commit was generated by Migit
This commit is contained in:
2019-04-02 22:10:16 +02:00
committed by vanhofen
parent d5bf9a09c9
commit 85504aa6f4

View File

@@ -1389,11 +1389,13 @@ void CMenuWidget::paint()
void CMenuWidget::initHeader()
{
int dx = width + scrollbar_width;
if (!header){
header = new CComponentsHeader(x, y, width + scrollbar_width, 0, getName(), iconfile);
header = new CComponentsHeader(x, y, dx, 0, getName(), iconfile);
header->enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT);
header->setOffset(OFFSET_INNER_MID);
}
header->setWidth(dx);
header->setCaption(getName());
header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0);
header->setCaptionColor(COL_MENUHEAD_TEXT);