GNOME Bugzilla – Bug 703808
Remove support for fixed positioning in BoxLayout
Last modified: 2015-05-13 15:22:24 UTC
It is odd API, undocumented, hardly used and in the way of some major cleanup - kill it.
Created attachment 248634 [details] [review] layout: Use a custom layoutManager for panelBox Currently lookingGlass relies on some odd BoxLayout behavior, which allows children to use fixed positioning without affecting the parent's size request. As this behavior is scheduled for removal, use a custom layout manager to achieve the desired behavior instead.
Created attachment 248635 [details] [review] overview: Add coverPane to stack instead of BoxLayout The event catcher that covers the entire primary monitor during transitions is currently inside a BoxLayout, relying in its odd support for fixed position actors. We already have a proper stack widget in place, move it there.
Created attachment 248636 [details] [review] st: Remove support for fixed positioning in BoxLayout It is the job of layout containers to arrange their children; having a hidden feature that *also* allows children to be positioned freely outside the parent's allocation is just odd. With the last user of the feature gone, kill it.
Review of attachment 248634 [details] [review]: Why not remove it from the panelBox and remove the allocation-changed, etc. signals?
Review of attachment 248635 [details] [review]: OK.
Review of attachment 248636 [details] [review]: Yeah. Have you also considered removing pack-start?
(In reply to comment #6) > Review of attachment 248636 [details] [review]: > > Yeah. Have you also considered removing pack-start? Not really. The goal is to make StBoxLayout use a ClutterBoxLayout internally, so supporting pack-start will be dead-cheap (e.g. just passing on the property). We can still remove it later and make consumers use box.layout_manager.pack_start instead though ...
There are no consumers of pack_start...
Right, I meant "people who may want to use it in the future". It would be easier for me to leave it in until the ClutterBoxLayout patches have landed, but if it makes you happy, I can rebase the set again ...
Ah, I didn't see that pack_start was supported by ClutterBoxLayout as well..
(In reply to comment #4) > Why not remove [...] the allocation-changed, etc. signals? Uh? We still need the panel size/position for sizing/positioning the dialog. Anyway, I'll attach two alternative patches which leave panelBox alone ...
Created attachment 248667 [details] [review] lookingGlass: Don't use fixed positions in BoxLayout That's the fancier variant, which moves the trickery into lookingGlass itself.
Created attachment 248668 [details] [review] lookingGlass: Use uiGroup as parent instead of panelBox The obvious alternative, move lookingGlass to uiGroup instead.
Review of attachment 248668 [details] [review]: Yeah, this is something more like what I meant. Though I was going to suggest using a layout manager to position the looking glass globally, and continue to use translation_y for the tween.
Attachment 248635 [details] pushed as 70da558 - overview: Add coverPane to stack instead of BoxLayout Attachment 248636 [details] pushed as 53d268a - st: Remove support for fixed positioning in BoxLayout Attachment 248668 [details] pushed as 1121537 - lookingGlass: Use uiGroup as parent instead of panelBox
Hi, If you removed absolute positioning, how to set absolute positioning now !??? Regards,
Bugzilla is not a support forum, and doubly so in case of old and closed bugs, but here you go: Don't use StBoxLayout, use a container that uses a ClutterFixedLayout instead, like ClutterActor or StWidget.