Created
August 20, 2013 20:10
-
-
Save jeanpat/6286606 to your computer and use it in GitHub Desktop.
Interface file for the pictures.py application. Modified version of kivy-example/demo/pictures/pictures.kv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#:kivy 1.0 | |
#:import kivy kivy | |
#:import win kivy.core.window | |
FloatLayout: | |
canvas: | |
Color: | |
rgb: 1, 1, 1 | |
Rectangle: | |
source: 'data/images/background.jpg' | |
size: self.size | |
BoxLayout: | |
padding: 10 | |
spacing: 10 | |
size_hint: 1, None | |
pos_hint: {'top': 1} | |
height: 44 | |
Image: | |
size_hint: None, None | |
size: 24, 24 | |
source: 'data/logo/kivy-icon-24.png' | |
Label: | |
height: 24 | |
text_size: self.width, None | |
color: (1, 1, 1, .8) | |
text: 'Kivy %s - Pictures' % kivy.__version__ | |
<Picture>: | |
# each time a picture is created, the image can delay the loading | |
# as soon as the image is loaded, ensure that the center is changed | |
# to the center of the screen. | |
on_size: self.center = win.Window.center | |
size: image.size | |
size_hint: None, None | |
Image: | |
id: image | |
source: root.source | |
# create initial image to be 400 pixels width | |
size: 100, 100 / self.image_ratio | |
# add shadow background | |
#canvas.before: | |
#Color: | |
# rgba: 1,1,1,1 | |
#BorderImage: | |
# source: 'shadow32.png' | |
# border: (36,36,36,36) | |
# size:(self.width+72, self.height+72) | |
# pos: (-36,-36) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment