From 94517d34042243540f550990d1a8b99670aeaccc Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 19 Nov 2017 17:51:31 +0100 Subject: [PATCH] src/gui/components/cc_frm_window.cpp: fix too small left bottom corner radius is allready calculatetd in base class src/gui/components/cc_frm.cpp in member CComponentsForm::paintCCItems() NOTE: It seems the radius calculation inside framebuffer don't working correct for corners on the right site on top and bottom. Seen on hd51 hardware on osd-boxes with shadow (e.g. infobar) or Boxes with frames e.g. on error message windows, buttons. There are pixel errors like minimal holes on osd or displaced pixels. On CST hardware evreything is ok. --- src/gui/components/cc_frm.cpp | 6 ++---- src/gui/components/cc_frm_window.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 850e32b6a..a62df72ee 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -482,10 +482,8 @@ void CComponentsForm::paintCCItems() //reduce corner radius, if we have a frame around parent item, ensure matching corners inside of embedded item, this avoids ugly unpainted spaces between frame and item border //TODO: other constellations not considered at the moment - if (w_parent_frame){ - if(xpos <= fr_thickness || ypos <= fr_thickness) - cc_item->setCorner(max(0, cc_item->getCornerRadius()-w_parent_frame), cc_item->getCornerType()); - } + if (w_parent_frame) + cc_item->setCorner(max(0, cc_item->getCornerRadius()- w_parent_frame), cc_item->getCornerType()); //These steps check whether the element can be painted into the container. //Is it too wide or too high, it will be shortened and displayed in the log. diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 5c05a19ed..f23245147 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -226,7 +226,7 @@ void CComponentsWindow::initFooter() ccw_footer->setPos(cc_xr + fr_thickness, cc_yr + height - ccw_footer->getHeight()- fr_thickness); ccw_footer->setWidth(width/*-2*fr_thickness*/); ccw_footer->enableShadow(false/*shadow*/); - ccw_footer->setCorner(corner_rad-fr_thickness, CORNER_BOTTOM); + ccw_footer->setCorner(corner_rad, CORNER_BOTTOM); ccw_footer->setButtonFont(ccw_button_font); ccw_footer->setColorBody(ccw_col_footer); ccw_footer->doPaintBg(true);