commiting in case the kivy trial fails
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#:kivy 1.4
|
||||
|
||||
AnchorLayout:
|
||||
anchor_x: "right"
|
||||
anchor_y: "bottom"
|
||||
Button:
|
||||
text: "Button 1"
|
||||
size_hint: .2, .4
|
||||
Button:
|
||||
text: "Button 2"
|
||||
size_hint: .4, .2
|
||||
|
||||
Button:
|
||||
text: "Button 3"
|
||||
size_hint: .2, .2
|
||||
@@ -0,0 +1,14 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
orientation: 'vertical'
|
||||
padding: 20
|
||||
spacing: 10
|
||||
Button:
|
||||
text: "Button 1"
|
||||
size_hint: 1, None
|
||||
Button:
|
||||
text: "Button 2"
|
||||
size_hint: 1, 0.5
|
||||
Button:
|
||||
text: "Button 3"
|
||||
@@ -0,0 +1,27 @@
|
||||
#:kivy 1.4
|
||||
|
||||
GridLayout:
|
||||
cols: 2
|
||||
Button:
|
||||
text: "Button 1"
|
||||
Button:
|
||||
text: "Button 2"
|
||||
font_size: 24
|
||||
Button:
|
||||
text: "Button 3"
|
||||
background_color: .7, .7, 1, 1
|
||||
Button:
|
||||
text: "Button 4"
|
||||
on_press: self.text = 'pressed'
|
||||
on_release: self.text = 'Button 4'
|
||||
ToggleButton:
|
||||
text: "A toggle button"
|
||||
ToggleButton:
|
||||
text: "a toggle button in a group"
|
||||
group: "money"
|
||||
ToggleButton:
|
||||
text: "A toggle in the down state"
|
||||
state: "down"
|
||||
ToggleButton:
|
||||
text: "another toggle button in a group"
|
||||
group: "money"
|
||||
@@ -0,0 +1,28 @@
|
||||
#:kivy 1.4
|
||||
|
||||
GridLayout:
|
||||
cols: 2
|
||||
CheckBox:
|
||||
Label:
|
||||
text: "A checkbox"
|
||||
CheckBox:
|
||||
active: True
|
||||
Label:
|
||||
text: "Another checkbox"
|
||||
CheckBox:
|
||||
group: "money"
|
||||
Label:
|
||||
text: "A radio in a group"
|
||||
CheckBox:
|
||||
group: "money"
|
||||
active: True
|
||||
|
||||
Label:
|
||||
text: "Another radio in same group"
|
||||
Switch:
|
||||
Label:
|
||||
text: "A Switch"
|
||||
Switch:
|
||||
active: True
|
||||
Label:
|
||||
text: "An active switch"
|
||||
@@ -0,0 +1,19 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
# Double as a Tabbed Panel Demo!
|
||||
TabbedPanel:
|
||||
tab_pos: "top_right"
|
||||
default_tab_text: "List View"
|
||||
default_tab_content: list_view_tab
|
||||
|
||||
TabbedPanelHeader:
|
||||
text: 'Icon View'
|
||||
content: icon_view_tab
|
||||
|
||||
FileChooserListView:
|
||||
id: list_view_tab
|
||||
|
||||
FileChooserIconView:
|
||||
id: icon_view_tab
|
||||
show_hidden: True
|
||||
@@ -0,0 +1,16 @@
|
||||
#:kivy 1.4
|
||||
|
||||
FloatLayout:
|
||||
Button:
|
||||
text: "Button 1"
|
||||
pos: 100, 100
|
||||
size_hint: .2, .4
|
||||
Button:
|
||||
text: "Button 2"
|
||||
pos: 200, 200
|
||||
size_hint: .4, .2
|
||||
|
||||
Button:
|
||||
text: "Button 3"
|
||||
pos_hint: {'x': .8, 'y': .6}
|
||||
size_hint: .2, .2
|
||||
@@ -0,0 +1,20 @@
|
||||
#:kivy 1.4
|
||||
|
||||
GridLayout:
|
||||
cols: 2
|
||||
Button:
|
||||
text: "Button 1"
|
||||
size_hint_x: None
|
||||
width: 100
|
||||
Button:
|
||||
text: "Button 2"
|
||||
Button:
|
||||
text: "Button 3"
|
||||
size_hint_x: None
|
||||
Button:
|
||||
text: "Button 4"
|
||||
Button:
|
||||
text: "Button 5"
|
||||
size_hint_x: None
|
||||
Button:
|
||||
text: "Button 6"
|
||||
@@ -0,0 +1,62 @@
|
||||
#:kivy 1.4
|
||||
|
||||
GridLayout:
|
||||
cols: 1
|
||||
Label:
|
||||
text: "Label crowded by size hint"
|
||||
size_hint_y: .2
|
||||
Label:
|
||||
text: 'Label with\nmultiple\nlines'
|
||||
size_hint_y: .4
|
||||
Label:
|
||||
font_size: '48sp'
|
||||
text: "Label [color=ff3333][sub]with[/sub][/color] [color=3333ff][b]mark[sup]up[/sup][/b][/color]"
|
||||
markup: True
|
||||
Button:
|
||||
text: 'Labels in buttons'
|
||||
GridLayout:
|
||||
cols: 2
|
||||
size_hint_y: 3
|
||||
Button:
|
||||
text: 'Left aligned at middle'
|
||||
padding: 10, 10
|
||||
halign: 'left'
|
||||
valign: 'middle'
|
||||
text_size: self.size
|
||||
Button:
|
||||
text: 'right aligned at top'
|
||||
padding: 10, 10
|
||||
halign: 'right'
|
||||
valign: 'top'
|
||||
text_size: self.size
|
||||
Button:
|
||||
text: 'Left aligned with no padding'
|
||||
halign: 'left'
|
||||
valign: 'middle'
|
||||
text_size: self.size
|
||||
Button:
|
||||
text: 'Multiple\nbold italic centered\nlines'
|
||||
halign: 'center'
|
||||
valign: 'middle'
|
||||
bold: True
|
||||
italic: True
|
||||
text_size: self.size
|
||||
Button:
|
||||
text: 'multiple\nspaced lines\ncentered'
|
||||
padding: 10, 10
|
||||
halign: 'center'
|
||||
valign: 'middle'
|
||||
line_height: 1.5
|
||||
text_size: self.size
|
||||
Button:
|
||||
text: 'button without\npadding\nor align'
|
||||
Label:
|
||||
text: "Label with [ref=reference]reference[/ref]"
|
||||
markup: True
|
||||
on_ref_press: self.text = "ref clicked"
|
||||
Label:
|
||||
text: "different font"
|
||||
bold: True
|
||||
font_name: "data/fonts/RobotoMono-Regular.ttf"
|
||||
font_size: 32
|
||||
valign: 'bottom'
|
||||
@@ -0,0 +1,9 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
Image:
|
||||
source: "../../widgets/cityCC0.png"
|
||||
Video:
|
||||
source: "../../widgets/cityCC0.mpg"
|
||||
state: "play"
|
||||
@@ -0,0 +1,4 @@
|
||||
#:kivy 1.4
|
||||
|
||||
RstDocument:
|
||||
text: "Welcome\n---------------\nThis Kivy Catalog is an interactive showcase of Kivy Widgets defined with the Kivy (.kv) language. You can edit the .kv language description in the left pane and see your changes affect the widgets in the right pane. Your changes will update the widget within a few seconds though the impatient could type 'Ctrl-S' or click 'Render Now'.\n\nYou can explore most Kivy widgets from the menu in the upper left corner. You can also use this playground to test your Kivy language code and adding a new .kv file to the interface is easy.\n\nSome Kivy widgets are omitted from this catalog or could have more complete .kv representation. This is beta software; pull requests are welcome."
|
||||
@@ -0,0 +1,36 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
id: bl
|
||||
orientation: "vertical"
|
||||
popup: popup.__self__
|
||||
canvas:
|
||||
Color:
|
||||
rgba: .18, .18, .18, .91
|
||||
Rectangle:
|
||||
size: self.size
|
||||
pos: self.pos
|
||||
Bubble:
|
||||
size_hint: (None, None)
|
||||
size: (150, 50)
|
||||
pos_hint: {'center_x': .5, 'y': .6}
|
||||
arrow_pos: 'bottom_mid'
|
||||
orientation: 'horizontal'
|
||||
BubbleButton:
|
||||
text: 'This is'
|
||||
BubbleButton:
|
||||
text: 'a'
|
||||
BubbleButton:
|
||||
text: 'Bubble'
|
||||
Button:
|
||||
text: 'press to show popup'
|
||||
on_release: root.popup.open()
|
||||
Popup:
|
||||
id: popup
|
||||
on_parent: if self.parent == bl: bl.remove_widget(self)
|
||||
title: "An example popup"
|
||||
content: popupcontent
|
||||
Button:
|
||||
id: popupcontent
|
||||
text: "press to dismiss"
|
||||
on_release: popup.dismiss()
|
||||
@@ -0,0 +1,17 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
orientation: 'vertical'
|
||||
padding: 50
|
||||
ProgressBar:
|
||||
id: bar
|
||||
value: 140
|
||||
max: 300
|
||||
Slider:
|
||||
id: slider
|
||||
max: 200
|
||||
value: 140
|
||||
on_value: slider.value = self.value
|
||||
Slider:
|
||||
orientation: 'vertical'
|
||||
on_value: slider.value = self.value
|
||||
@@ -0,0 +1,5 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
RstDocument:
|
||||
text: ".. _top:\n\nHello world\n===========\n\nThis is an **emphased text**, some ``interpreted text``.\nAnd this is a reference to top_::\n\n $ print('Hello world')\n"
|
||||
@@ -0,0 +1,16 @@
|
||||
#:kivy 1.4
|
||||
|
||||
FloatLayout:
|
||||
Scatter:
|
||||
size_hint: None, None
|
||||
size: 100, 100
|
||||
pos: 100, 100
|
||||
Image:
|
||||
source: "../../widgets/cityCC0.png"
|
||||
Scatter:
|
||||
size_hint: None, None
|
||||
size: 100, 100
|
||||
pos: 100, 100
|
||||
do_rotation: False
|
||||
Label:
|
||||
text: "something"
|
||||
@@ -0,0 +1,10 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
orientation: 'vertical'
|
||||
Spinner:
|
||||
text: "Work"
|
||||
values: "Work", "Home", "Mobile", "Skype"
|
||||
size_hint: (None, None)
|
||||
size: (100, 44)
|
||||
# Wanted to put DropDown here, too, but it seems not to be working too well when loaded from .kv
|
||||
@@ -0,0 +1,25 @@
|
||||
#:kivy 1.4
|
||||
|
||||
StackLayout:
|
||||
orientation: 'tb-lr'
|
||||
padding: 10
|
||||
spacing: 5
|
||||
Button:
|
||||
text: "Button 1"
|
||||
size_hint: .2, .4
|
||||
width: 100
|
||||
Button:
|
||||
text: "Button 2"
|
||||
size_hint: .2, .4
|
||||
Button:
|
||||
text: "Button 3"
|
||||
size_hint: .2, .4
|
||||
Button:
|
||||
text: "Button 4"
|
||||
size_hint: .2, .4
|
||||
Button:
|
||||
text: "Button 5"
|
||||
size_hint: .2, .4
|
||||
Button:
|
||||
text: "Button 6"
|
||||
size_hint: .2, .4
|
||||
@@ -0,0 +1,20 @@
|
||||
#:kivy 1.4
|
||||
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
TextInput:
|
||||
text: "Single Line Input"
|
||||
multiline: False
|
||||
TextInput:
|
||||
text: "Text Input, start typing here\nmultiline\nsupport"
|
||||
background_color: .8, .8, 0, 1
|
||||
size_hint: 1, 3
|
||||
TextInput:
|
||||
password: True
|
||||
text: "Password (but you can't see it)"
|
||||
multiline: False
|
||||
on_text: viewer.text = self.text
|
||||
TextInput:
|
||||
id: viewer
|
||||
readonly: True
|
||||
text: "edit the password to see it here"
|
||||
Reference in New Issue
Block a user