2016-04-11, 15:28
Hi all,
I want to display, from the addon I'm writing, a picture with width 100% of the screen.
When I get the screen width with window.getWidth() it gives me 1920 (wich is correct as displayed in system info), but it seems that kodi uses a virtual resolution of 1280x720 as in the allegated screeshot.
How can I get in the code the actual screen width to use?
Following the relevant code:
bar.png is a test image 1920x50.
I want to display, from the addon I'm writing, a picture with width 100% of the screen.
When I get the screen width with window.getWidth() it gives me 1920 (wich is correct as displayed in system info), but it seems that kodi uses a virtual resolution of 1280x720 as in the allegated screeshot.
How can I get in the code the actual screen width to use?
Following the relevant code:
Code:
bar1 = xbmcgui.ControlImage(0, 100, 1000, 15, os.path.join(__resources__, 'bar.png'))
bar2 = xbmcgui.ControlImage(0, 150, 1200, 15, os.path.join(__resources__, 'bar.png'))
bar3 = xbmcgui.ControlImage(0, 200, window.getWidth(), 15, os.path.join(__resources__, 'bar.png'))
window.addControls([bar1, bar2, bar3])
bar.png is a test image 1920x50.