Ширина карточки пользователя KivyMD

Всем доброго времени суток!

Столкнулся с проблемой регулировки параметров карточки и всего, что на ней располагается. Не могу выставить нужный мне размер карточки (хочу сделать уже) и помимо этого не могу адекватно выставить размеры кнопок и textfield'ов.

Выглядит это так:

введите сюда описание изображения

При попытке выставить параметры:

size_hint: None, None
size: 300, 500

На выходе получаю нечто подобное:

введите сюда описание изображения

Подскажите/намекните, куда смотреть, где я ошибся?

.kv

    orientation: "vertical"
    pos_hint: {"center_x": 0.5, "center_y": 0.5}
    spacing: 30
    size_hint_y: None
    height: 500

    MDTextField:

        id: card_first_name
        mode: "rectangle"
        halign: "left"
        hint_text: "Имя"
        pos_hint: {"center_x": 0.5, "center_y": 0.9}
        size_hint_x: None
        width: 400

    MDTextField:

        id: card_last_name

        mode: "rectangle"
        halign: "left"
        hint_text: "Фамилия"
        pos_hint: {"center_x": 0.5, "center_y": 0.8}
        size_hint_x: None
        width: 400

    MDTextField:

        id: card_patronymic

        mode: "rectangle"
        halign: "left"
        hint_text: "Отчество"
        pos_hint: {"center_x": 0.5, "center_y": 0.7}
        size_hint_x: None
        width: 400

    MDRectangleFlatIconButton:

        id: card_status

        icon: "android"
        size_hint: 0.75, None
        text: "Категория"
        pos_hint: {"center_x": 0.5}
        on_release: root.open_status_list()
        font_size: 16

    MDTextField:

        id: card_phone

        mode: "rectangle"
        halign: "left"
        hint_text: "Телефон"
        pos_hint: {"center_x": 0.5, "center_y": 0.5}
        size_hint_x: None
        width: 400

    MDRoundFlatIconButton:

        icon: "printer"
        icon_color: (0, 0, 0, 1)
        text: "Печать бейджа"

        font_size: 16
        on_release: root.print_badge()
        pos_hint: {"center_x": 0.5, "center_y": 0.4}

        text_color: (0, 0, 0, 1)

    MDBoxLayout:

        adaptive_size: True
        orientation: "horizontal"
        spacing: "10dp"
        pos_hint: {"center_x": 0.8, "center_y": 0.5}

        MDFillRoundFlatButton:

            id: button_cancel

            text: "Отмена"
            font_size: 16
            md_bg_color: 1, 0, 0, 1
            on_press: app.root.get_screen('main').dialog.dismiss()

        MDFillRoundFlatButton:

            id: button_next

            text: "Сохранить"
            font_size: 16
            md_bg_color: 0, 0, 0, 1

.py

class RegCard(MDBoxLayout):
    
    def open_status_list(self):
        menu_items = [
            {
                "text": f'{item}',
                "viewclass": "OneLineListItem",
                "on_release": lambda x=f'{item}': self.menu_callback(x),
            }
            for item in ['Junior', 'Middle', 'Senior']
        ]

        self.menu = MDDropdownMenu(
            caller=self.ids.card_status,
            items=menu_items,
            width_mult=3,
        )
        self.menu.open()

    def print_badge(self):
        print("Printing badge...")

    def menu_callback(self, text_item):
        self.ids.card_status.text = text_item
        self.menu.dismiss()

Заранее спасибо за ответы.


Ответы (0 шт):