After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707842 - AppFolderPopup: fix the position of close buttons
AppFolderPopup: fix the position of close buttons
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-10 09:50 UTC by Giovanni Campagna
Modified: 2013-09-12 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AppFolderPopup: fix the position of close buttons (2.94 KB, patch)
2013-09-10 09:50 UTC, Giovanni Campagna
reviewed Details | Review
AppFolderPopup: fix the position of close buttons (3.16 KB, patch)
2013-09-10 14:11 UTC, Giovanni Campagna
reviewed Details | Review
AppFolderPopup: fix the position of close buttons (5.73 KB, patch)
2013-09-12 12:08 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-09-10 09:50:00 UTC
We need to adjust the offset of close buttons, in case the box
pointer has the arrow at the top.
Comment 1 Giovanni Campagna 2013-09-10 09:50:03 UTC
Created attachment 254573 [details] [review]
AppFolderPopup: fix the position of close buttons
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-09-10 13:26:51 UTC
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?
Comment 3 Giovanni Campagna 2013-09-10 14:11:31 UTC
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.
Comment 4 Carlos Soriano 2013-09-12 11:36:52 UTC
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
Comment 5 Giovanni Campagna 2013-09-12 12:08:52 UTC
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.
Comment 6 Carlos Soriano 2013-09-12 12:30:14 UTC
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
Comment 7 Giovanni Campagna 2013-09-12 12:33:50 UTC
Attachment 254773 [details] pushed as 255cb8e - AppFolderPopup: fix the position of close buttons