Yassin Mrd
Yassin Mrd

Reputation: 13

Kivymd MDLabel padding or margin

I hope you are doing great. I would like to keep space between the text in MDLabel and the edges of the screen any help ideas? this is my code for the first page .kv MDScreen: name:"splash" MDFloatLayout: md_bg_color: (255/255, 250/255, 245/255, 1) Image: source:"assets/1.png" size_hint:.50,.50 pos_hint:{"center_x":.5,"center_y":.8}

        MDLabel:
            text:"the Vine Reco App"
            pos_hint:{"center_x":.5,"center_y":.63}
            halign:"center"
            theme_text_color:"Custom"
            text_color: (106/255, 90/255, 200/255, 1)
            font_size:"28sp"
            font_name:"Lemonada"
        MDLabel:
            text:"Recognizing the Type of the vine based on the image of list leaves"
            pos_hint:{"center_x":.5,"center_y":.4}
            halign:"center"
            theme_text_color:"Custom"
            text_color: (5/255, 215/255, 80/255, 1)
            font_size:"22sp"
        MDRaisedButton:
            text:"Get Started"
            font_name: 'Fonts/Poppins-Regular.ttf'
            font_size:35
            markup: True
            pos_hint:{"center_x":.5,"center_y":.12}
            md_bg_color:(140/255, 220/255, 150/255, 1)
            text_color: (22/255, 160/255, 133/255, 1)

the image i will attached shows where i need spaces my first page

Upvotes: 0

Views: 1357

Answers (1)

Yassin Mrd
Yassin Mrd

Reputation: 13

I got the answer:

MDLabel:
            text:"Recognizing the Type of the vine based on the image of list leaves"
            pos_hint:{"center_x":.5,"center_y":.4}
            halign:"center"
            theme_text_color:"Custom"
            text_color: (5/255, 215/255, 80/255, 1)
            font_size:"22sp"
            padding:[40,0]

Upvotes: 0

Related Questions