Skip to content

Instantly share code, notes, and snippets.

@NumesSanguis
Created June 27, 2014 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NumesSanguis/3e0282bc8252cd86b76b to your computer and use it in GitHub Desktop.
Save NumesSanguis/3e0282bc8252cd86b76b to your computer and use it in GitHub Desktop.
Kivy ScrollView blur
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import StringProperty
from kivy.base import runTouchApp
from kivy.lang import Builder
Builder.load_string('''
<ScrollableLabel>:
orientation: 'vertical'
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
ScrollView:
text: str('some really really long string' * 100)
Label:
text: str('some really really long string' * 100)
font_size: '20sp'
text_size: self.width-10, None
color: 0, 0, 0, 1
# size_hint_y blurs text, try putting # in front:
size_hint_y: None
height: int(self.texture_size[1]+10)
valign: 'top'
ScrollView:
size_hint_y: .2
BoxLayout:
orientation: 'vertical'
Button:
text: 'Bla1'
font_size: 20
Button:
text: 'Bla2'
Button:
text: 'Bla3'
''')
class ScrollableLabel(BoxLayout):
pass
runTouchApp(ScrollableLabel())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment