I've tried changing around size hints and pos hints, and also the sizing references (I think that root references NavigationDrawer here, but I'm not sure if that's what's messing it up? Any help would be appreciated, I'm pretty new to kivy so it's totally possible I'm missing something very obvious. My Python and a minimally functional kv file are below...
Thank you,
Erin
import kivy
kivy.require('1.9.1') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.slider import Slider
from kivy.uix.boxlayout import BoxLayout
from kivy.graphics import Rectangle, Color
from kivy.uix.widget import Widget
from kivy.uix.togglebutton import ToggleButton
from kivy.properties import ListProperty
from kivy.uix.button import Button
from kivy.garden.navigationdrawer import NavigationDrawer
class Controller(NavigationDrawer):
def __init__(self):
super(Controller, self).__init__()
class SliderApp(App):
def build(self):
return Controller()
if __name__ == '__main__':
SliderApp().run()
lbl1: angle anim_type: 'fade_in' BoxLayout: orientation: 'vertical' Label: text: 'PLEASE SELECT AN OBJECT' font_size: 18 Button: text: 'Particle' BoxLayout: orientation: 'horizontal' canvas: Color: rgb: (255, 255, 255) Rectangle: pos: self.pos size: (400,300) BoxLayout: orientation: 'vertical' size: root.width * .25, root.height pos: root.width * .75, 0 Button: text: 'Object' on_press: root.toggle_state() BoxLayout: orientation: 'horizontal' Label: text: "0" font_size: 20 Slider: id: angle_slider min: 0 max: 360 step: .5 value: 0 on_value: angle.text = "Angle: " + str(self.value) Label: text: "360" font_size: 20 Label: id: angle text: "Angle: 0.0" font_size: 24
class Controller(NavigationDrawer):
def __init__(self):
super(Controller, self).__init__()
class Controller(NavigationDrawer):
def __init__(self, **kwargs):
super(Controller, self).__init__(**kwargs)
Is NavigationDrawer just not meant to contain a canvas?
BoxLayout: orientation: 'horizontal' Widget:
canvas: Color: rgb: (255, 255, 255) Rectangle: pos: self.pos
size: self.size