[escher] do not display the scroll indicator when unneeded

Change-Id: Ife24fa2fe175b3d944749ff4a1ea8e2017f04048
This commit is contained in:
Émilie Feral
2016-09-22 15:59:31 +02:00
committed by Romain Goyet
parent 2e116344ea
commit 33401a361b

View File

@@ -15,6 +15,10 @@ ScrollViewIndicator::ScrollViewIndicator(ScrollViewIndicator::Direction directio
}
void ScrollViewIndicator::drawRect(KDContext * ctx, KDRect rect) const {
if (m_start <= 0 && m_end >=1) {
return;
}
ctx->fillRect(bounds(), k_backgroundColor);
KDRect indicatorFrame = KDRectZero;
if (m_direction == Direction::Horizontal) {