GNOME Bugzilla – Bug 707842
AppFolderPopup: fix the position of close buttons
Last modified: 2013-09-12 12:33:54 UTC
We need to adjust the offset of close buttons, in case the box pointer has the arrow at the top.
Created attachment 254573 [details] [review] AppFolderPopup: fix the position of close buttons
Review of attachment 254573 [details] [review]: ::: js/ui/appDisplay.js @@ +1148,3 @@ x_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.START }); + if (side == St.Side.TOP) Just call this.updateArrowSide from here?
Created attachment 254603 [details] [review] AppFolderPopup: fix the position of close buttons We need to adjust the offset of close buttons, in case the box pointer has the arrow at the top.
Review of attachment 254603 [details] [review]: Not sure if I like the overall way to do it. Currently we have to take into account each use of close button with offsets (like the arrow in boxpointer) in css, and if we change the arrowHeigth in boxpointer for example, we will have to change all classes that uses boxpointers in the css file. Can we add a public API to util makeCloseButton to manage offsets? In this manner we can avoid that. But you are more experienced than me, just go with the better approach you can see. ::: data/theme/gnome-shell.css @@ +1034,3 @@ + -shell-close-overlap-y: -1px; +} + Sure I'm overlooking something, but where's the app-folder-popup-container.bottom class? If we didn't do a public api to makeCloseButton to manage offsets, since we are using this only in AppFolderView in updateArrowSide and we know at that point how much height the arrow has, can we just modify -shell-close-overlap-y programatically? (not sure we can). ::: js/ui/appDisplay.js @@ +1148,3 @@ x_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.START }); + new line? looks good tough
Created attachment 254773 [details] [review] AppFolderPopup: fix the position of close buttons We need to adjust the offset of close buttons, in case the box pointer has the arrow at the top. To do so, extend close buttons to hook into a boxpointer (since that's the common use for them) and automatically adjust their position.
Review of attachment 254773 [details] [review]: As talked in IRC, since we don't see any use of that outside boxpointer in a near future, looks good to me
Attachment 254773 [details] pushed as 255cb8e - AppFolderPopup: fix the position of close buttons