#:kivy 1.0.9 # colormodel.kv # Kivy GUI Layout Specification for colormodel # Walker M. White, Lillian Lee (LJL2), Steve Marschner (srm2) # June 2, 2012 : size: (10,0) canvas: Color: rgb: (1,1,1) Rectangle: size: self.size pos: self.pos Color: rgb: (0,0,0,1) Line: points: (self.pos[0]+self.size[0]/2,self.pos[1],self.pos[0]++self.size[0]/2,self.pos[1]+self.size[1]) : canvas: Color: rgb: self.background Rectangle: size: self.size pos: self.pos Label: text: root.text color: root.foreground font_size: 14 bold: True valign: 'top' text_size: (self.parent.size[0]-10,self.parent.size[1]-10) slider: slider_component size: (50,0) size_hint: (None,1) orientation: 'vertical' padding: 5 canvas: Color: rgb: self.color Rectangle: size: self.size pos: self.pos Color: rgb: [1-self.color[0],1-self.color[1],1-self.color[2],1-self.color[3]] Rectangle: size: [4,self.size[1]-50] pos: [(self.pos[0]+self.size[0]/2)-2, self.pos[1]+10] Label: text: root.text bold: True font_size: 12 color: (0,0,0,1) size: (1,30) size_hint: (1,None) Slider: id: slider_component padding: 20 orientation: 'vertical' min: root.min_value max: root.max_value value: root.initial size_hint: (1,1) : orientation: 'horizontal' main: main_panel comp: comp_panel rSlider: red gSlider: green bSlider: blue ColorPanel: id: main_panel color: [1,0,0,1] size_hint: (0.5,1) ColorPanel: id:comp_panel color: [0,1,0,1] size_hint: (0.5,1) ColorSlider: id: red text: "R" color: [1,1,1,1] max_value: 25500 min_value: 0 initial: 0 size_hint: (None,1) on_slide: root.parent.on_rgb_slide(self.value,root.gSlider.value,root.bSlider.value) ColorSlider: id: green text: "G" color: [1,1,1,1] max_value: 25500 min_value: 0 initial: 25500 size_hint: (None,1) on_slide: root.parent.on_rgb_slide(root.rSlider.value,self.value,root.bSlider.value) ColorSlider: id: blue text: "B" max_value: 25500 min_value: 0 initial: 0 color: [1,1,1,1] size_hint: (None,1) on_slide: root.parent.on_rgb_slide(root.rSlider.value,root.gSlider.value,self.value) : rField: red gField: green bField: blue rgbButton: rgb orientation: 'horizontal' padding: 10 canvas: Color: rgb: (1,1,1) Rectangle: size: self.size pos: self.pos Label: text: "R" color: (0,0,0,1) font_size: 14 bold: True size: (25,0) size_hint: (None, 1) TextInput: id: red size_hint: (0.07,1) multiline: False font_size: 14 padding_y: 9 padding_x: 8 Label: text: "G" color: (0,0,0,1) font_size: 14 bold: True size: (25,0) size_hint: (None,1) TextInput: id: green size_hint: (0.07,1) multiline: False font_size: 14 padding_y: 9 padding_x: 8 Label: text: "B" color: (0,0,0,1) font_size: 14 bold: True size: (25,0) size_hint: (None,1) TextInput: id: blue size_hint: (0.07,1) multiline: False font_size: 14 padding_y: 9 padding_x: 8 Button: id: rgb text: "Set Color" bold: True size_hint: (0.1,1) on_press: root.parent.on_rgb_press(root._toInt(root.rField.text),root._toInt(root.gField.text),root._toInt(root.bField.text)) Label: text: root.transformName color: (0, 0, 0, 1) font_size: 14 width: 200 size_hint: (.5, 1) : orientation: 'vertical' top: top_panel bot: bot_panel TopPanel: id: top_panel size_hint: (1,0.8) BotPanel: id: bot_panel size_hint: (1,0.2)