Reputation: 179
we're using an image as a popup in our kivy app but can't seem to get the popup's background to fit the size of the image. The resulting popup has the image with a dark gray border around the left side, top, and right side of the image. Can someone help us eliminate the popup's background so that only the image and the semi-transparent filter are visible?
Main.py code:
popup = Popup(title="",
content=Image(source='img/popup'),
auto_dismiss=True,
size_hint=(None, None),
size=(400, 146),
separator_height=0
)
Thanks
Upvotes: 2
Views: 1784
Reputation: 29460
If you don't have a title, maybe a simple ModalView would better fit your purposes.
Either way, the background is controlled by the background
and background_color
properties. To get rid of it entirely, it's probably simplest to set popup.background_color=(0, 0, 0, 0)
(i.e. transparent).
Upvotes: 3