Skip to content

Instantly share code, notes, and snippets.

View hansent's full-sized avatar

Thomas Hansen hansent

View GitHub Profile
import kivy
kivy.require('1.0.4')
from kivy.app import App
from kivy.core.window import Window
from kivy.properties import StringProperty
from kivy.uix.widget import Widget
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.video import Video
from kivy.uix.label import Label
#:kivy 1.0
<Label>:
font_name: 'Loma Book'
# Always clear the background of every child widget
# FIXME: this should be done in FBO of PageLayout... well.
<AppScreen>:
canvas:
Color:
<MovieThumbnail>:
orientation: 'vertical'
cls: ['debug']
Video:
cls: ["video"]
size_hint: (1, None)
size: self.width, self.width/self.image_ratio
canvas.before:
Color:
rgb: 0,0,1
class KivyFactoryMetaClass(type):
def __new__(cls, name, bases, attrs):
#replacement for original __init__ function
original_init = attrs.get('__init__', bases[0].__init__)
def alternate_init(self,*args,**kwargs):
original_init(self,*args,**kwargs)
if name == self.__class__.__name__: #dont call base setup again
self.setup(**kwargs)
#:kivy 1.0
#This file is part of the Kivy Cinema Kiosk Demo.
# Copyright (C) 2010 by
# Thomas Hansen <[email protected]>
# Mathieu Virbel <[email protected]>
#
# The Kivy Cinema Kiosk Demo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7bVRRON/9DEBf7ri6hFy9K4Fz4Pvdmo4nPdbxj7jKwYBywDlCR6TF6TSqhFODpPfFjRVRNHNA6wq2u2YONcGTgP0bSCR/pLSr4BrFL+ViIguWNOuXhUTSErdUWsWLQ2UiUfON9X1+8q69hyolqPJ0XdcKN4O+0QWogEdR5fdbgJYjOXkwcn0OyIqG6MTJjVwbzhR7TKAYPwrs35s4IOVrHbTKrKAEm/cMvDyvTQnv29Fwf5ksrgPfbEcUohbXnggS8wbUuDiNVjGaKFuwzDNBQH5kjeD49Yuxz42DyeNsv0+9cBV6i8cww99qTgUrWq0SvpyZg6g7Uxzi8KEse8jRw== [email protected]
from glob import glob
import kivy
kivy.require('1.0.0')
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.cache import Cache
import kivy
kivy.require('1.0.0')
from kivy.app import App
from kivy.uix.image import Image
from kivy.core.image import Image as CoreImage
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.cache import Cache
from kivy.clock import Clock
<frame object at 0x3597720>
<frame object at 0x3597940>
<frame object at 0x3597b10>
<frame object at 0x3597d00>
['_purge_by_timeout', 'print_cache']
<listiterator object at 0x3521990>
<listiterator object at 0x352e490>
<frame object at 0x3597ef0>
<frame object at 0x35a4f70>
(1.0038530826568604,)
"gui options
set guioptions-=T
set guioptions-=r " Remove right- and left-hand scrollbars
set guioptions-=L
"set guioptions-=m
"set fuopt+=maxhorz " grow to maximum horizontal width on entering fullscreen mode
:colorscheme zenburn
set number