From c6f16e5acf4fe8eed544715c74eac0353edb0908 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 15 Dec 2016 21:09:01 +0100 Subject: [PATCH] CComponentsScrollBar: fix pos and use current width to set height of arrows This fix size and position and dimensions of arrows. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6dda28d612e9fb46f2b3b86d726a4a40d73197bd Author: Thilo Graf Date: 2016-12-15 (Thu, 15 Dec 2016) --- src/gui/components/cc_frm_scrollbar.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index ce0d281b8..b0ca25fca 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -111,22 +111,20 @@ void CComponentsScrollBar::initTopNaviIcon() { //initialize icon object if (sb_up_obj == NULL){ - sb_up_obj = new CComponentsPicture(CC_CENTERED, fr_thickness, sb_up_icon, this); + sb_up_obj = new CComponentsPicture(CC_CENTERED, fr_thickness, width-2*fr_thickness, width-2*fr_thickness, sb_up_icon, this); sb_up_obj->SetTransparent(CFrameBuffer::TM_BLACK); sb_up_obj->doPaintBg(false); } - sb_up_obj->setWidth(width-2*fr_thickness); } void CComponentsScrollBar::initBottomNaviIcon() { //initialize icon object if (sb_down_obj == NULL){ - sb_down_obj = new CComponentsPicture(CC_CENTERED, CC_APPEND, sb_down_icon, this); + sb_down_obj = new CComponentsPicture(CC_CENTERED, height - width-2*fr_thickness, width-2*fr_thickness, 0, sb_down_icon, this); sb_down_obj->SetTransparent(CFrameBuffer::TM_BLACK); sb_down_obj->doPaintBg(false); } - sb_down_obj->setWidth(width-2*fr_thickness); } void CComponentsScrollBar::initSegments()