Bugzilla – Bug 15454
7.5: Window.noLayout isn't working anymore
Last modified: 2011-01-14 13:18:26 UTC
the style parameter 'Window.noLayout' isn't working anymore - see the Skin-Applets where it is used like this: ---- QVGAbaseSkinApplet, line 435 ----------- -- window with absolute positioning s.absolute = _uses(s.window, { layout = Window.noLayout, }) --------------------------------------------- My (WeatherForecast-) applet uses absolute positioning, to draw some Icons on top of each other. No Icon is drawn while having 'layout = Window.noLayout' in the Skin, if I remove it I can see the Icons again (but they lost the ability to be positioned). You can reproduce this very easily yourself as the 'Bounce'-Screensafer who uses the 'absolute'-skin and isn't painting anything as well ! If you remove 'Window.noLayout' from the QVGAbaseSkinApplet you can see at least the background drawing again (and below it a glimpse of another icon).
Upon further investigation I think the problem started with revision 8046 of src/squeezeplay/src/ui/jive_icon.c With this commit the image of the icon gets cropped to its size - when the Icon isn't layouted it doesn't have an initial size (thus isn't drawn anymore). I suggest adding the following to the constructor of the LUA-jive.ui.Icon-class to set the default size: ------- if (image ~= nil) then local w,h = image:getSize() obj:setSize(w,h) end ------- This fixes the Bounce-Screensafer as my own of course too.
I'm confused by this...I've been the principal engineer in charge of skinning our products for 2.5 years and I've never even heard of Window.noLayout... have you tried position = LAYOUT_NONE, I do plenty of absolute positioning (e.g., clock screensavers), and position = LAYOUT_NONE is what I consider the supported parameter for this behavior. Could you tell me how you decided to use Window.noLayout?
I guess I searched for some code to load and position images. The 'Boing'-Screensafer must have been the first thing I found ... Anyway - on second look this bug is more on icons not having a default-size than about skins.
added bug_meeting to remind me to talk to Ben about this bug
Moving lower-priority bugs to next target
Ben, just close this bug if you don't want to include the lines of comment #1 :) Also delete the Boing-Screensaver so noone will ever wonder why this one isn't working anymore. My Applet workarounds the problem by setting the sizes of an image after loading manually anyway, so for me there is no interest in hoping for the 'Future' release ;)
I'll close this, but FYI there is some better-than-zero possibility I'll be adding the ability to extend any skin within an applet at the window level. That is, if you want to add an applet-specific window style for a skin, that may be supported. It's all dependent on when a particular feature (sorry, that I can't discuss) is approved for inclusion in the software. Might happen as early as 7.6.0, but don't know yet.