From cd30144567ee2a3c793510f1247dafe04efabc09 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 2 Apr 2019 22:10:16 +0200 Subject: [PATCH] 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 ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6033df56a65fed9bdd298c219387a6f2ec7aa7c5 Author: Thilo Graf Date: 2019-04-02 (Tue, 02 Apr 2019) --- src/gui/widget/menue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 33c24f944..cff5d5696 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -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);