def show_bubble(self, *l):
if not hasattr(self, 'bubb'):
self.bubb = bubb = cut_copy_paste()
self.scroller = ScrollView(size_hint=(None, None), size=(160, 100),
pos_hint={'center_x': .5, 'y': .6})
self.scroller.add_widget(bubb)
self.add_widget(self.scroller)
else:
values = ('left_top', 'left_mid', 'left_bottom', 'top_left',
'top_mid', 'top_right', 'right_top', 'right_mid',
'right_bottom', 'bottom_left', 'bottom_mid', 'bottom_right')
index = values.index(self.bubb.arrow_pos)
self.bubb.arrow_pos = values[(index + 1) % len(values)]
<ScrollView>:
canvas.after:
Color:
rgba: self.bar_color[:3] + [self.bar_color[3] * 1 if self.do_scroll_y 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] * 1 if self.do_scroll_x 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
--