From d5401442d446276beccd68ad847df2c03b3f7614 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 7 Dec 2020 20:33:52 +0100 Subject: [PATCH] cc_frm: Simplify assigning of scroll bar width. --- 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