title: Kivy label left align and sizing
body: <p>I have been running against this wall now for almost a day. I feel like I have tried everything. First here is what I want and what I have visually.</p>
  
  <p>This what I have right now:</p>
  
  <p><a href="https://i.stack.imgur.com/CyIVO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CyIVO.png" alt="enter image description here"></a></p>
  
  <p>What I want is this:</p>
  
  <p><a href="https://i.stack.imgur.com/QFBHt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QFBHt.png" alt="enter image description here"></a></p>
  
  <p>In the images 'CurrentHistory:\nHeader:' is a single label. I can get it align left but I can't get it not have massive padding top and bottom. I's like the label is square and not a rectangle just around the text. I have been Kivy'ing now for about 2 days so please forgive me if I missed something super basic.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I updated with a fully functional demo. The odd thing is that the .kv produced label does exactly what I want it to do, but the Label produced via python does not.</p>
  
  <p>The SegmentLayout is identical to the GridLayout defined in the .kv file :(</p>
  
  <p>The overall layout is this: .kv</p>
  
  <pre><code>#:kivy 1.8.0
  
  &lt;MainWidget&gt;
      BoxLayout
          size: root.size
  
          ScrollView
              id: scrlv
              size_hint: .75, 1
  
              GridLayout
                  cols: 1
                  size_hint: 1, None
                  height: max(self.minimum_height, scrlv.height)
  
                  canvas:
                      Color:
                          rgba: 150/255, 150/255, 150/255, 1
                      Rectangle:
                          pos: self.pos
                          size: self.size
  
                  SegmentLayout
  
                  GridLayout
                      cols: 1
                      size_hint: 1,None
                      height: self.minimum_height
  
                      Label
                          text: '[b]CurrentHistory:[/b]\nHeader:'
                          size_hint: (None, None)
                          halign: 'left'
                          markup: True
                          size: self.texture_size
  
                      TextInput
                          size_hint: (1,None)
                          height: self.minimum_height
                          text: 'Enter Text Here'
  
          BoxLayout
              orientation: "vertical"
              size_hint: .25, 1
  
              canvas:
                  Color:
                      rgba: 240/255, 180/255, 80/255, 1
                  Rectangle:
                      pos: self.pos
                      size: self.size
  
              Label
                  text: "Label 1"
              Label
                  text: "Label 2"
  </code></pre>
  
  <p>python driver demo</p>
  
  <pre><code>import kivy
  
  kivy.require('1.8.0') # replace with your current kivy version !
  
  from kivy.app import App
  from kivy.uix.widget import Widget
  from kivy.factory import Factory
  
  from kivy.uix.label import Label
  from kivy.uix.gridlayout import GridLayout
  from kivy.uix.textinput import TextInput
  
  class SegmentLayout(GridLayout):
  
      def __init__(self, **kwargs):
          super(SegmentLayout, self).__init__(cols=1, size_hint=(1,None), **kwargs)
          self.bind(minimum_height=self.setter('height'))
  
          label_text = '[b]CurrentHistory:[/b]\nHeader:'
  
          label = Label(text=label_text, halign='left', size_hint=(None,None), markup=True)
          label.bind(size=label.setter('texture_size'))    
          self.add_widget(label)
  
          text_input = TextInput(text='Enter Text Here', size_hint=(1,None))
          text_input.bind(minimum_height=text_input.setter('height'))
          self.add_widget(text_input)
  
  class MainWidget(Widget):
      pass
  
  class MyApp(App):
  
      def build(self):
          return MainWidget()
  
  Factory.register('SegmentLayout', cls=SegmentLayout)
  
  if __name__ == '__main__':
      MyApp().run()
  </code></pre>