amwebexpert / poc-mobile-python

Python multi-platform app using the KivyMD framework, integrating Artificial Intelligence features.
MIT License
8 stars 3 forks source link

fix: navigation menu image for iOS #13

Closed costa-rica closed 9 months ago

costa-rica commented 9 months ago

This pull request fixes the issue for the image in the navigation menu being too large in iOS devices.

Description

The issue was with the MDNavigationDrawerHeader class's handling of the source image. MDNavigationDrawerHeader has a property FitImage that takes the source and places the image in the MDNavigationDrawerHeader. This works well in wide screens but for some reason when the screens shrink or are in the iPhone the image explodes.

Solution

Created another class MDNavigationDrawerHeaderOM and replaced FitImage with a BoxLayout that does the same thing. However this BoxLayout and Image (child of BoxLayout that replaced FitImage) do not blow up in size when the screen gets small or on the iPhone.

The new class is in /libs/theme/MDNavigationDrawerHeaderOM. The only code needed to change

Question

This pull request builds off docs: updated README.md with link to TestFlight app #11 pull request. Does this one need to be approved after #11 ?