How do I Center Image in MDToolbar Kivymd?

Viewed 406

How do i center my image inside the toolbar so that its always in the center no matter how big or small the window?

            MDToolbar:
                left_action_items: [['menu', lambda x: nav_drawer.set_state()]]
                theme_text_color: 'Custom'

                GridLayout:
                    cols: 3
                    cols_minimum: {0: 100, 1: 800, 0:100}

                    Image:
                        source: 'images/FS_Logo1_textHeader.png'
                        size_hint_x: None
                        width: 500
                        allow_stretch: True
                        keep_ratio: True

This is the code im attempting but it obviously doesn't work. The gridLayout is basically an attempt to position the image in the middle row and even that doesnt work. How can i write this correctly?

1 Answers
pos_hint: { "center_x": .5, "center_y": 1 }

Use in Image Properties.

Related