From e340f4f4dce319b7d25f29d124d2f0e1081336b4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 8 Sep 2013 22:49:27 +0200 Subject: [PATCH] CComponentsWindow: fix max width of base items, if frame was set Header, body and footer were too wide on the right side. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b9f35bfc6db8ab1f94f4f9198c7388d9bb273ea2 Author: Thilo Graf Date: 2013-09-08 (Sun, 08 Sep 2013) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 47d188a31..c5cde1729 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -161,7 +161,7 @@ void CComponentsWindow::initHeader() //set header properties if (ccw_head){ ccw_head->setPos(0, 0); - ccw_head->setWidth(width); + ccw_head->setWidth(width-2*fr_thickness); ccw_head->setIcon(ccw_icon_name); ccw_head->setCaption(ccw_caption); ccw_head->initCCItems(); @@ -185,7 +185,7 @@ void CComponentsWindow::initBody() fh = ccw_footer->getHeight(); int hh = ccw_head->getHeight(); int h_body = height - hh - fh; - ccw_body->setDimensionsAll(0, CC_APPEND, width, h_body); + ccw_body->setDimensionsAll(0, CC_APPEND, width-2*fr_thickness, h_body); ccw_body->doPaintBg(false); } } @@ -202,7 +202,7 @@ void CComponentsWindow::initFooter() //set footer properties if (ccw_footer){ ccw_footer->setPos(0, CC_APPEND); - ccw_footer->setWidth(width); + ccw_footer->setWidth(width-2*fr_thickness); ccw_footer->setShadowOnOff(shadow); } }