diff --git a/examples/application/template1/test.kv b/examples/application/template1/test.kv index 638e2a7da..f2747bf23 100644 --- a/examples/application/template1/test.kv +++ b/examples/application/template1/test.kv @@ -1,4 +1,4 @@ #:kivy 1.0 Button: - text: 'Hello world in template 1' + text: 'Hello world in template 1' diff --git a/examples/application/test.kv b/examples/application/test.kv index 0fc891e44..f570a7ca8 100644 --- a/examples/application/test.kv +++ b/examples/application/test.kv @@ -1,4 +1,4 @@ #:kivy 1.0 Button: - text: 'Hello world' + text: 'Hello world' diff --git a/examples/audio/audio.kv b/examples/audio/audio.kv index b4d092c2e..c374a60d8 100644 --- a/examples/audio/audio.kv +++ b/examples/audio/audio.kv @@ -24,5 +24,5 @@ text_size: self.size color: (1, 1, 1, .8) text: 'Kivy %s - Audio sample' % kivy.__version__ - valign: 'middle' + valign: 'middle' diff --git a/examples/demo/showcase/showcase.kv b/examples/demo/showcase/showcase.kv index 729b03088..04f2cd9b4 100644 --- a/examples/demo/showcase/showcase.kv +++ b/examples/demo/showcase/showcase.kv @@ -33,12 +33,12 @@ id: content : - scale_min: 1 + scale_min: 1 Image: source: 'data/logo/kivy-icon-512.png' : - scale_min: 1 + scale_min: 1 canvas: Color: rgba: .5, .5, .5, .2 @@ -142,269 +142,262 @@ pos: self.pos [VSeparator@Widget]: - size_hint_x: None - width: 10 - canvas: - Color: - rgba: .8, .8, .8, .3 - Rectangle: - size: 1, self.height - pos: self.center_x, self.y + size_hint_x: None + width: 10 + canvas: + Color: + rgba: .8, .8, .8, .3 + Rectangle: + size: 1, self.height + pos: self.center_x, self.y [HSeparator@Label]: - size_hint_y: None - height: 45 - text: ctx.text if 'text' in ctx else '' - text_size: self.size - valign: 'middle' - halign: 'center' - canvas.before: - Color: - rgba: .2, .2, .2, .8 - Rectangle: - size: self.size - pos: self.pos + size_hint_y: None + height: 45 + text: ctx.text if 'text' in ctx else '' + text_size: self.size + valign: 'middle' + halign: 'center' + canvas.before: + Color: + rgba: .2, .2, .2, .8 + Rectangle: + size: self.size + pos: self.pos : - BoxLayout: - pos_hint: {'x': 0, 'y': 0} + BoxLayout: + pos_hint: {'x': 0, 'y': 0} - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'Buttons' + HSeparator: + text: 'Buttons' - Button: - text: 'Button ' + self.state + Button: + text: 'Button ' + self.state - Button: - text: 'Button ' + self.state - state: 'down' + Button: + text: 'Button ' + self.state + state: 'down' - ToggleButton: - text: 'Toggle ' + self.state + ToggleButton: + text: 'Toggle ' + self.state - HSeparator: - text: 'Toggle buttons with group' + HSeparator: + text: 'Toggle buttons with group' - ToggleButton: - text: 'Toggle 1' - group: 'tgroup' + ToggleButton: + text: 'Toggle 1' + group: 'tgroup' - ToggleButton: - text: 'Toggle 2' - group: 'tgroup' + ToggleButton: + text: 'Toggle 2' + group: 'tgroup' - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'Sliders' + HSeparator: + text: 'Sliders' - Slider: - value: 33 - size_hint_y: None - height: 50 + Slider: + value: 33 + size_hint_y: None + height: 50 - Slider: - value: 66 - size_hint_y: None - height: 50 + Slider: + value: 66 + size_hint_y: None + height: 50 - BoxLayout: + BoxLayout: - Slider: - orientation: 'vertical' - value: 33 + Slider: + orientation: 'vertical' + value: 33 - Slider: - orientation: 'vertical' - value: 66 + Slider: + orientation: 'vertical' + value: 66 - HSeparator: - text: 'Progress Bar' + HSeparator: + text: 'Progress Bar' - ProgressBar: - value: (20 * root.value) % (1 + self.max) - size_hint_y: None - height: 50 + ProgressBar: + value: (20 * root.value) % (1 + self.max) + size_hint_y: None + height: 50 - HSeparator: - text: 'Switch' + HSeparator: + text: 'Switch' - Switch: - size_hint_y: None - height: 50 + Switch: + size_hint_y: None + height: 50 - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'Text inputs' + HSeparator: + text: 'Text inputs' - TextInput: - text: 'Monoline textinput' - size_hint_y: None - height: 30 + TextInput: + text: 'Monoline textinput' + size_hint_y: None + height: 50 - TextInput: - text: 'This is a password' - size_hint_y: None - height: 30 - password: True + TextInput: + text: 'This is a password' + size_hint_y: None + height: 50 + password: True - TextInput: - text: 'Readonly textinput' - size_hint_y: None - height: 30 - readonly: True + TextInput: + text: 'Readonly textinput' + size_hint_y: None + height: 50 + readonly: True - TextInput: - text: 'Multiline textinput\nSecond line' + TextInput: + text: 'Multiline textinput\nSecond line' - HSeparator: - text: 'Spinner' + HSeparator: + text: 'Checkbox' - Spinner: - size_hint_y: None - height: 44 - values: ('Work', 'Home', 'Other', 'Custom') - text: 'Home' + GridLayout: + rows: 1 + CheckBox + CheckBox - HSeparator: - text: 'Checkbox' - - GridLayout: - rows: 1 - CheckBox: - active: True - CheckBox - - GridLayout: - cols: 2 - CheckBox: - group: 'group1' - active: True - CheckBox: - group: 'group1' + GridLayout: + cols: 2 + CheckBox: + group: 'group1' + CheckBox: + group: 'group1' + CheckBox: + group: 'group2' + CheckBox: + group: 'group2' : - BoxLayout: - pos_hint: {'x': 0, 'y': 0} + BoxLayout: + pos_hint: {'x': 0, 'y': 0} - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'Accordions' + HSeparator: + text: 'Accordions' - Accordion: + Accordion: - AccordionItem: - title: 'Panel 1' - Label: - text: 'This is a label fit to the content view' + AccordionItem: + title: 'Panel 1' + Label: + text: 'This is a label fit to the content view' - AccordionItem: - title: 'Panel 2' - Button: - text: 'A button, what else?' + AccordionItem: + title: 'Panel 2' + Button: + text: 'A button, what else?' - AccordionItem: - title: 'Panel 3' - Label: - text: 'This is a label fit to the content view' + AccordionItem: + title: 'Panel 3' + Label: + text: 'This is a label fit to the content view' - Accordion: + Accordion: - orientation: 'vertical' + orientation: 'vertical' - AccordionItem: - title: 'Panel 1' - Label: - text: 'This is a label fit to the content view' + AccordionItem: + title: 'Panel 1' + Label: + text: 'This is a label fit to the content view' - AccordionItem: - title: 'Panel 2' - Button: - text: 'A button, what else?' + AccordionItem: + title: 'Panel 2' + Button: + text: 'A button, what else?' - AccordionItem: - title: 'Panel 3' - Label: - text: 'This is a label fit to the content view' + AccordionItem: + title: 'Panel 3' + Label: + text: 'This is a label fit to the content view' - VSeparator + VSeparator - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'File choosers' + HSeparator: + text: 'File choosers' - FileChooserListView + FileChooserListView - FileChooserIconView + FileChooserIconView : - treeview1: treeview1 - treeview2: treeview2 + treeview1: treeview1 + treeview2: treeview2 - BoxLayout: - pos_hint: {'x': 0, 'y': 0} + BoxLayout: + pos_hint: {'x': 0, 'y': 0} - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'Treeview with root' + HSeparator: + text: 'Treeview with root' - TreeView: - id: treeview1 + TreeView: + id: treeview1 - Button: - text: 'Remove first node' - size_hint_y: None - height: 50 - on_release: treeview1.remove_node(treeview1.root.nodes[0]) if not treeview1.root.is_leaf else None + Button: + text: 'Remove first node' + size_hint_y: None + height: 50 + on_release: treeview1.remove_node(treeview1.root.nodes[0]) if not treeview1.root.is_leaf else None - BoxLayout: - orientation: 'vertical' - padding: 10 - spacing: 10 + BoxLayout: + orientation: 'vertical' + padding: 10 + spacing: 10 - HSeparator: - text: 'Treeview without root' + HSeparator: + text: 'Treeview without root' - TreeView: - id: treeview2 - hide_root: True + TreeView: + id: treeview2 + hide_root: True - Button: - text: 'Remove first node' - size_hint_y: None - height: 50 - on_release: treeview2.remove_node(treeview2.root.nodes[0]) if not treeview2.root.is_leaf else None + Button: + text: 'Remove first node' + size_hint_y: None + height: 50 + on_release: treeview2.remove_node(treeview2.root.nodes[0]) if not treeview2.root.is_leaf else None diff --git a/examples/kv/app_button.kv b/examples/kv/app_button.kv index 16b1d5668..134dbfe16 100644 --- a/examples/kv/app_button.kv +++ b/examples/kv/app_button.kv @@ -1,9 +1,9 @@ #:kivy 1.0 # Widget: - Button: - text: "Hello World" + Button: + text: "Hello World" - Button: - text: "I'm another label" - pos: (200, 200) + Button: + text: "I'm another label" + pos: (200, 200) diff --git a/examples/kv/app_camera.kv b/examples/kv/app_camera.kv index 8994e0715..4bbdfecb1 100644 --- a/examples/kv/app_camera.kv +++ b/examples/kv/app_camera.kv @@ -1,25 +1,25 @@ Camera: - canvas: - Color: - rgb: (1, 1, 1) - Rectangle: - texture: self.texture - size: (320, 240) - Color: - rgb: (.5, 0, 1) - Rectangle: - texture: self.texture - pos: (320, 0) - size: (320, 240) - Color: - rgb: (0, 1, 0) - Rectangle: - texture: self.texture - pos: (320, 240) - size: (320, 240) - Color: - rgb: (1, 0, 0) - Rectangle: - texture: self.texture - pos: (0, 240) - size: (320, 240) + canvas: + Color: + rgb: (1, 1, 1) + Rectangle: + texture: self.texture + size: (320, 240) + Color: + rgb: (.5, 0, 1) + Rectangle: + texture: self.texture + pos: (320, 0) + size: (320, 240) + Color: + rgb: (0, 1, 0) + Rectangle: + texture: self.texture + pos: (320, 240) + size: (320, 240) + Color: + rgb: (1, 0, 0) + Rectangle: + texture: self.texture + pos: (0, 240) + size: (320, 240) diff --git a/examples/kv/app_logo.kv b/examples/kv/app_logo.kv index d2b5246e8..da9c2e273 100644 --- a/examples/kv/app_logo.kv +++ b/examples/kv/app_logo.kv @@ -1,36 +1,36 @@ Widget: - Video: - id: myvideo - source: '/home/tito/code/pymt/examples/apps/videoplayer/softboy.avi' - play: mybutton.state == 'down' - canvas: - Color: - rgb: (1, 1, 1) - BorderImage: - texture: self.texture - size: self.texture_size + Video: + id: myvideo + source: '/home/tito/code/pymt/examples/apps/videoplayer/softboy.avi' + play: mybutton.state == 'down' + canvas: + Color: + rgb: (1, 1, 1) + BorderImage: + texture: self.texture + size: self.texture_size - Image: - source: 'kivy.jpg' - canvas: - PushMatrix: - Rotate: - angle: 1 - BorderImage: - border: 250, 250, 250, 250 - texture: self.texture - size: self.texture_size - PopMatrix: + Image: + source: 'kivy.jpg' + canvas: + PushMatrix: + Rotate: + angle: 1 + BorderImage: + border: 250, 250, 250, 250 + texture: self.texture + size: self.texture_size + PopMatrix: - Button: - id: mybutton - text: 'Push me' - pos: 100, 100 + Button: + id: mybutton + text: 'Push me' + pos: 100, 100 - Slider: - width: myvideo.width - height: 25 - min: 0 - max: myvideo.duration - value: myvideo.position - pos: myvideo.pos + Slider: + width: myvideo.width + height: 25 + min: 0 + max: myvideo.duration + value: myvideo.position + pos: myvideo.pos diff --git a/examples/kv/app_scatter.kv b/examples/kv/app_scatter.kv index b1c3133b6..10034f8f0 100644 --- a/examples/kv/app_scatter.kv +++ b/examples/kv/app_scatter.kv @@ -1,6 +1,6 @@ Widget: - Scatter: - size: image.texture_size - Image: - id: image - source: 'kivy.jpg' + Scatter: + size: image.texture_size + Image: + id: image + source: 'kivy.jpg' diff --git a/examples/kv/app_stencil.kv b/examples/kv/app_stencil.kv index ebb2ee1cd..cbc8c89db 100644 --- a/examples/kv/app_stencil.kv +++ b/examples/kv/app_stencil.kv @@ -1,27 +1,27 @@ Widget: - canvas: + canvas: - StencilPush + StencilPush - # create a rectangle mask, from pos 100, 100, with a 100, 100 size. - Rectangle: - pos: 100, 100 - size: 100, 100 + # create a rectangle mask, from pos 100, 100, with a 100, 100 size. + Rectangle: + pos: 100, 100 + size: 100, 100 - StencilUse + StencilUse - # we want to show a big green rectangle, however, the previous stencil - # mask will crop us :) - Color: - rgb: 0, 1, 0 - Rectangle: - size: 900, 900 + # we want to show a big green rectangle, however, the previous stencil + # mask will crop us :) + Color: + rgb: 0, 1, 0 + Rectangle: + size: 900, 900 - StencilUnUse + StencilUnUse - # Remove the mask previously set - Rectangle: - pos: 100, 100 - size: 100, 100 + # Remove the mask previously set + Rectangle: + pos: 100, 100 + size: 100, 100 - StencilPop + StencilPop diff --git a/examples/kv/app_video.kv b/examples/kv/app_video.kv index 6c9e19a58..4c3b59d01 100644 --- a/examples/kv/app_video.kv +++ b/examples/kv/app_video.kv @@ -1,42 +1,42 @@ BoxLayout: - orientation: 'vertical' - spacing: 5 - padding: 5 + orientation: 'vertical' + spacing: 5 + padding: 5 - Video: - id: myvideo - source: '../widgets/softboy.avi' - allow_stretch: True - on_eos: self.play = True; print 'woot we are looping!' + Video: + id: myvideo + source: '../widgets/softboy.avi' + allow_stretch: True + on_eos: self.play = True; print 'woot we are looping!' - BoxLayout: - size_hint_y: None - height: 30 + BoxLayout: + size_hint_y: None + height: 30 - Label: - id: mylabel - text: str(myvideo.position) + Label: + id: mylabel + text: str(myvideo.position) - Slider: - value: myvideo.position - max: myvideo.duration - on_value: print args[1] + Slider: + value: myvideo.position + max: myvideo.duration + on_value: print args[1] - BoxLayout: - size_hint_y: None - height: 50 - spacing: 5 + BoxLayout: + size_hint_y: None + height: 50 + spacing: 5 - ToggleButton: - group: 'video' - text: 'Play' - state: 'down' if myvideo.play else 'normal' - on_press: myvideo.play = True + ToggleButton: + group: 'video' + text: 'Play' + state: 'down' if myvideo.play else 'normal' + on_press: myvideo.play = True - ToggleButton: - group: 'video' - text: 'Stop' - state: 'down' if not myvideo.play else 'normal' - on_press: myvideo.play = False + ToggleButton: + group: 'video' + text: 'Stop' + state: 'down' if not myvideo.play else 'normal' + on_press: myvideo.play = False diff --git a/examples/shader/plasma.kv b/examples/shader/plasma.kv index f5a58a36a..58c842aea 100644 --- a/examples/shader/plasma.kv +++ b/examples/shader/plasma.kv @@ -1,9 +1,9 @@ #:kivy 1.0 : - canvas: - Color: - rgb: 1, 0, 0 - Rectangle: - pos: self.pos - size: self.size + canvas: + Color: + rgb: 1, 0, 0 + Rectangle: + pos: self.pos + size: self.size diff --git a/examples/shader/shadertree.kv b/examples/shader/shadertree.kv index 1504a3c50..624a8bee9 100644 --- a/examples/shader/shadertree.kv +++ b/examples/shader/shadertree.kv @@ -1,12 +1,12 @@ #:kivy 1.0 : - canvas: - Color: - rgb: 1, 1, 1 - Rectangle: - texture: self.texture - pos: self.pos - size: self.size + canvas: + Color: + rgb: 1, 1, 1 + Rectangle: + texture: self.texture + pos: self.pos + size: self.size : size: image.size diff --git a/examples/widgets/scrollview.kv b/examples/widgets/scrollview.kv index 1a8f7f952..5be05625c 100644 --- a/examples/widgets/scrollview.kv +++ b/examples/widgets/scrollview.kv @@ -1,16 +1,16 @@ #:kivy 1.0.4 : - canvas: - Color: - rgb: 1, 0, 0 - Rectangle: - pos: self.pos - size: self.size + canvas: + Color: + rgb: 1, 0, 0 + Rectangle: + pos: self.pos + size: self.size : - canvas: - Color: - rgb: 1, 1, 0 - Rectangle: - pos: self.pos - size: self.size + canvas: + Color: + rgb: 1, 1, 0 + Rectangle: + pos: self.pos + size: self.size