mirror of https://github.com/kivy/kivy.git
uix:ScrollView show bars only when viewport is scrollable. closes #1386
This commit is contained in:
parent
f60750c79d
commit
4d00293197
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue