From 0180998bced8ec6801d384bb24c583c7f90fc224 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 7 Dec 2020 23:28:52 +0100 Subject: [PATCH] cc_frm: consider frame width with center mode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7ce4ceb44951aac221004e93822fe68901902826 Author: Thilo Graf Date: 2020-12-07 (Mon, 07 Dec 2020) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 2e7db02df..60a0848b0 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -500,7 +500,7 @@ void CComponentsForm::paintCCItems() } //positionize vertical centered else if (xpos == CC_CENTERED){ - auto_x = this_w/2 - w_item/2; + auto_x = (this_w - 2* fr_thickness)/2 - w_item/2; v_cc_items.at(i)->setRealXPos(this_x + auto_x); } else{ @@ -518,7 +518,7 @@ void CComponentsForm::paintCCItems() } //positionize hor centered else if (ypos == CC_CENTERED){ - auto_y = height/2 - h_item/2; + auto_y = (height - 2* fr_thickness)/2 - h_item/2; v_cc_items.at(i)->setRealYPos(this_y + auto_y); } else{