#:import get_root tagit.utils.get_root # FIXME: remove need for get_root <-Dialogue>: auto_dismiss: True ok_on_enter: True : orientation: 'vertical' padding: '12dp' size_hint: 0.66, None height: self.minimum_height : # nothing to do : : title: '' title_color: 1,1,1,1 DialogueTitle: text: root.title size_hint_y: None height: self.texture_size[1] + dp(16) text_size: self.width - dp(16), None color: root.title_color # small space Label: size_hint_y: None height: 12 : : orientation: 'vertical' size_hint_y: None height: dp(48+8) # small space Label: size_hint_y: None height: dp(8) # here come the buttons : ok_text: 'OK' DialogueButton: text: root.ok_text on_press: get_root(self).ok() : cancel_text: 'Cancel' ok_text: 'OK' ok_enabled: True BoxLayout: orientation: 'horizontal' DialogueButton: text: root.cancel_text on_press: get_root(self).cancel() DialogueButton: text: root.ok_text on_press: get_root(self).ok() disabled: not root.ok_enabled ## EOF ##