From 88622a07b480a626a4d97bba9e05799a9984cceb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 21 Jun 2016 12:33:49 +0200 Subject: [PATCH] CComponentsWindow: change order of items Add header and footer items as first and body as last item. Render of items occurs in listed order. So it's better for performance while render of window. This is something more advantageously because all other items are contained inside body. So we avoid possible delay while rendering of base items. It looks better on screen. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/29d723a97b699f6ad3ffede29c94975f9a84db8a Author: Thilo Graf Date: 2016-06-21 (Tue, 21 Jun 2016) Origin message was: ------------------ CComponentsWindow: change order of items Add header and footer items as first and body as last item. Render of items occurs in listed order. So it's better for performance while render of window. This is something more advantageously because all other items are contained inside body. So we avoid possible delay while rendering of base items. It looks better on screen. --- src/gui/components/cc_frm_window.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 27a190d6d..67b3657a2 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -352,15 +352,19 @@ void CComponentsWindow::initCCWItems() //init window body core initBody(); - //add header, body and footer items only one time + /*Add header and footer items as first and body as last item. + Render of items occurs in listed order. So it's better for performance while render of window. + This is something more advantageously because all other items are contained inside body. + So we avoid possible delay while rendering of base items. It looks better on screen. + */ if (ccw_head) if (!ccw_head->isAdded()) addCCItem(ccw_head); - if (!ccw_body->isAdded()) - addCCItem(ccw_body); if (ccw_footer) if (!ccw_footer->isAdded()) addCCItem(ccw_footer); + if (!ccw_body->isAdded()) + addCCItem(ccw_body); } void CComponentsWindow::enableSidebar(const int& sidbar_type)