From ad5ba834c268109dc00f30f1aedac6c7554a1d42 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 7 Dec 2020 23:28:52 +0100 Subject: [PATCH] cc_frm: Simplify assigning of scroll bar width. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6339ba9e2dbea21df675f9449cdef0b399d9b5cd Author: Thilo Graf Date: 2020-12-07 (Mon, 07 Dec 2020) --- src/gui/components/cc_frm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 60a0848b0..ac6d535a2 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -443,15 +443,16 @@ void CComponentsForm::paintCCItems() sb->setDimensionsAll(x_sb, y_sb, w_sb, h_sb); } + this_w = width; + if(page_count > 1){ sb->setSegmentCount(page_count); sb->setMarkID(cur_page); - this_w = width - w_sb; + this_w -= w_sb; sb->paint(false); }else{ if (sb->isPainted()) sb->kill(col_body); - this_w = width; } //detect if current page has changed, if true then kill items from screen