From 62acbb47ab0ce5efc74c3cb6a2bd5db0a2b18211 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 17 Jul 2014 21:39:39 +0200 Subject: [PATCH] CComponentsItem: fix percentage dimensions setters heigth and width were swapped, parameter "real" was false --- src/gui/components/cc_item.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 8a2a1312f..0aeb374ce 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -207,10 +207,10 @@ void CComponentsItem::setCenterPos(int along_mode) void CComponentsItem::setHeightP(const uint8_t& h_percent) { - height = cc_parent ? h_percent*cc_parent->getWidth()/100 : h_percent*frameBuffer->getScreenWidth()/100; + height = cc_parent ? h_percent*cc_parent->getHeight()/100 : h_percent*frameBuffer->getScreenHeight(true)/100; } void CComponentsItem::setWidthP(const uint8_t& w_percent) { - width = cc_parent ? w_percent*cc_parent->getHeight()/100 : w_percent*frameBuffer->getScreenHeight()/100; + width = cc_parent ? w_percent*cc_parent->getWidth()/100 : w_percent*frameBuffer->getScreenWidth(true)/100; }