I am trying to change the Popup background as per the answer in this question:
How to change popup color in kivy
In the directory of my project there is a folder Images and a file main.py. In the Images folder there are 2 64 by 64 images:popup_background.png, popup_background_green.png
First, I create an atlas using the command:
python -m kivy.atlas myatlas 256x256 popup_background.png popup_background_green.png
After execution, the necessary files appear in the folder
Here is my code:
cnt = Button(text='Close', size_hint=(0.3, 0.2))
popup = Popup(title='AlertTitle',
content=cnt,
size_hint=(.5, .5),
background='atlas://Images/myatlas/popup_background')
When the Popup is launched, it is completely black color (the title, button and separator are clearly visible) instead of the expected image in the atlas.
I tried a lot of experiments to get the expected image, but nothing worked. Instead, I don't understand how, but this path works and changes color:'atlas://data/images/defaulttheme/button_pressed'
I assume that it finds the image in the files of the library itself, but how?
What am I doing wrong and how can I solve this problem?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…