CComponentsScrollBar: fix radius for single segment

Radius on top was missed if only one segment is available.


Origin commit data
------------------
Commit: c5451046d4
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-04-21 (Fri, 21 Apr 2017)
This commit is contained in:
2017-04-21 22:47:23 +02:00
parent 984728a11c
commit 8f5e8cb5ff

View File

@@ -183,8 +183,12 @@ void CComponentsScrollBar::initSegments()
}
//set corner types
sb_segments_obj->front()->setCorner(RADIUS_MIN, CORNER_TOP);
sb_segments_obj->back()->setCorner(RADIUS_MIN, CORNER_BOTTOM);
if (sb_segments_obj->size() == 1){
sb_segments_obj->front()->setCorner(RADIUS_MIN, CORNER_ALL);
}else{
sb_segments_obj->front()->setCorner(RADIUS_MIN, CORNER_TOP);
sb_segments_obj->back()->setCorner(RADIUS_MIN, CORNER_BOTTOM);
}
}