kivymd / KivyMD

KivyMD is a collection of Material Design compliant widgets for use with Kivy, a framework for cross-platform, touch-enabled graphical applications. https://youtube.com/c/KivyMD https://twitter.com/KivyMD https://habr.com/ru/users/kivymd https://stackoverflow.com/tags/kivymd

Home Page:https://kivymd.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect button width when window not resized

ilya2008ss opened this issue · comments

Description of the Bug

At the start of the program, the width of the button is incorrect, and the width can be corrected only by resizing the window

Code and Logs

from kivy.lang import Builder

from kivymd.app import MDApp

KV = """
MDBoxLayout:
    orientation: 'vertical'

    MDRectangleFlatIconButton:
        text: 'Hello world'
        width: self.parent.width
"""

class MainApp(MDApp):
    def build(self):
        return Builder.load_string(KV)
    
MainApp().run()

Screenshots

Before resizing:
Desktop Screenshot 2024 07 04 - 03 43 46 86

After resizing:
Desktop Screenshot 2024 07 04 - 03 53 42 01

Versions

  • OS: Windows 10
  • Python: 3.10.6
  • Kivy: 2.3.0
  • KivyMD: 1.2.0

KivyMD: 1.2.0 is not supported