uix:ScrollView show bars only when viewport is scrollable. closes #1386

This commit is contained in:
qua-non 2013-07-20 14:23:51 +05:30
parent f60750c79d
commit 4d00293197
1 changed files with 2 additions and 2 deletions

View File

@ -713,12 +713,12 @@
<ScrollView>:
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