From 4d00293197dc7a63392502d5bb629ec75531a2fb Mon Sep 17 00:00:00 2001 From: qua-non Date: Sat, 20 Jul 2013 14:23:51 +0530 Subject: [PATCH] uix:ScrollView show bars only when viewport is scrollable. closes #1386 --- kivy/data/style.kv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kivy/data/style.kv b/kivy/data/style.kv index 9a1e35faf..63aa14ff6 100644 --- a/kivy/data/style.kv +++ b/kivy/data/style.kv @@ -713,12 +713,12 @@ : canvas.after: Color: - rgba: self.bar_color[:3] + [self.bar_color[3] * self.bar_alpha if self.do_scroll_y else 0] + rgba: self.bar_color[:3] + [self.bar_color[3] * self.bar_alpha if (self.do_scroll_y and self.viewport_size[1]>self.height) else 0] Rectangle: pos: self.right - self.bar_width - self.bar_margin, self.y + self.height * self.vbar[0] size: self.bar_width, self.height * self.vbar[1] Color: - rgba: self.bar_color[:3] + [self.bar_color[3] * self.bar_alpha if self.do_scroll_x else 0] + rgba: self.bar_color[:3] + [self.bar_color[3] * self.bar_alpha if (self.do_scroll_x and self.viewport_size[0] > self.width) else 0] Rectangle: pos: self.x + self.width * self.hbar[0], self.y + self.bar_margin size: self.width * self.hbar[1], self.bar_width