Commit Graph

204 Commits

Author SHA1 Message Date
Carlos Soriano
0418b68051 popupMenu: Use an image for arrows
Until now the arrows were the associated arrow
character of the font. This cause some problems like
different arrows for different fonts, and size can be
altered because of the font size.
To solve that, use an image for the arrows.

https://bugzilla.gnome.org/show_bug.cgi?id=720206
2014-02-19 13:44:27 +01:00
Carlos Soriano
a7283864e8 popupMenu: Use relative rotation for arrows
Currently the animation of the arrows doesn't take
into account previous rotation.
Since in a incoming patch we will use one arrow
and rotate it to generate the four directions, we
need that the animation use relative rotation.

https://bugzilla.gnome.org/show_bug.cgi?id=720206
2014-02-19 13:44:26 +01:00
Carlos Soriano
4950bad2a7 popupMenu: Rename _arrow_rotation to follow JS covention 2014-02-19 13:44:26 +01:00
Florian Müllner
3e7e88cd5f popupMenu: Make destroy() a bit more robust
Currently destroying a menu's actor and calling its destroy() method
are subtly different - the latter will also result in the menu being
removed from the corresponding menu manager.
There is no good justification for that behavior, so make both actions
behave the same.

https://bugzilla.gnome.org/show_bug.cgi?id=724690
2014-02-18 21:27:24 +01:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
52b1a1b835 popupMenu: Fix removing the active menu from PopupMenuManager
Commit b42af9aa99 changed the parameter list of _closeMenu()
to account for changes in the GrabHelper ungrab mechanism, but
didn't update other callers.

https://bugzilla.gnome.org/show_bug.cgi?id=709806
2013-11-07 00:09:50 +01:00
Alejandro Piñeiro
5c5f2fdf8f a11y: setting ATK_ROLE_ARROW to object unicodeArrow
https://bugzilla.gnome.org/show_bug.cgi?id=710120
2013-10-14 22:29:09 +02:00
Carlos Soriano
63593e45a6 Make dropdown arrows consistent size
Since the agregate menu does 120% of font-size, make this
for all dropdown arrows in gnome-shell and rename the css
class to make clear that it is used in overall gnome-shell

https://bugzilla.gnome.org/show_bug.cgi?id=709564
2013-10-11 17:32:55 +02:00
Jasper St. Pierre
33a4f59cfb popupMenu: Center the labels in submenu items
https://bugzilla.gnome.org/show_bug.cgi?id=708330
2013-09-19 12:40:43 -04:00
Alejandro Piñeiro
49c8cdd8f6 a11y: check states EXPANDABLE/EXPANDED on PopupSubMenuMenuItem
https://bugzilla.gnome.org/show_bug.cgi?id=708038
2013-09-16 12:36:16 +02:00
Jasper St. Pierre
660f0fec16 popupMenu: Fix algorithm for separator visibility to work with sections
Before, separators naively checked whether their siblings were visible
using actor visibility. However, if section actors are visible but have
no visible children, this will fail. Special-case separators when doing
visiblity checks.

https://bugzilla.gnome.org/show_bug.cgi?id=707801
2013-09-10 10:23:43 -04:00
Jasper St. Pierre
fd9401cc62 Revert "popupMenu: Make the section invisible if it has no visible children"
This reverts commit 5a0ac6c2ac.

https://bugzilla.gnome.org/show_bug.cgi?id=707801
2013-09-10 10:23:43 -04:00
Jasper St. Pierre
5a0ac6c2ac popupMenu: Make the section invisible if it has no visible children
https://bugzilla.gnome.org/show_bug.cgi?id=706852
2013-08-29 15:17:12 -04:00
Jasper St. Pierre
34ec457a47 popupMenu: Fix indentation and style 2013-08-22 14:09:04 -04:00
Jasper St. Pierre
bc3d019ecf popupMenu: Flip the popup menu triangle for RTL
Triangles should be flipped in RTL. This is the easiest way to do it that
doesn't rely on modifying the rotating logic, though it is a bit hacky since
the ClutterActor "scale-x" property technically considers the lower bound
to be 0. It works, though.
2013-08-19 10:04:03 -04:00
Jasper St. Pierre
f0e5fb04fc popupMenu: Remove PopupMenuAlternatingMenuItem
It's now unused.
2013-08-16 20:11:44 -04:00
Jasper St. Pierre
8e49c433e8 theme: Adjust the aggregate menu
Adjust spacing and size of elements and other to correspond better
to the mockups.
2013-08-15 21:50:49 -04:00
Tarun Kumar Joshi
386f88c9b2 popupMenu: changes rotation center of sub-menu's triangle
When the triangle rotates (when sub-menu is expanded), it seems as if
the triangle pivots from one corner even though rotation center is set
to Clutter.Gravity.CENTER. Hence the rotation center is set nearer to
the edge than to the corner ([0.3, 0.5] instead of [0.5, 0.5]) so that
it doesn't appear odd.

Also pivot_point is used instead of rotation_center_z_gravity as it is
deprecated.

http://bugzilla.gnome.org/show_bug.cgi?id=703109
2013-08-15 14:21:34 +02:00
Jasper St. Pierre
51485396c7 popupMenu: Remove our custom allocation code
With support for column-based layout gone, simply use a box layout
and allow items to use their own layouts without any "framework".

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-13 06:50:25 -04:00
Jasper St. Pierre
c1fb1ba94c popupMenu: Remove column widths
This code is too complicated to keep, and the last straw came after the
fixed width menu in the aggregate menu design.

This will break some existing popup menus that rely on the fixed width,
but this will soon be replaced with the aggregate menu. We'll also soon
clean this up further by replacing PopupBaseMenuItem's custom layout code
with an StBoxLayout.

https://bugzilla.gnome.org/show_bug.cgi?id=705845
2013-08-12 14:23:19 -04:00
Jasper St. Pierre
c58a2e8e46 popupMenu: Don't propagate the 'activate' signal on menu items
We used to do this to close the menu when activating, but now we have
the itemActivated call which explicitly calls up to the toplevel.
2013-08-06 10:36:36 -04:00
Jasper St. Pierre
41117578c5 popupMenu: Make sure to disconnect open-state-changed when the menu item dies 2013-08-06 10:36:36 -04:00
Jasper St. Pierre
43661fff76 popupMenu: Fix popup menu layouts in RTL directions
The math for inverting RTL layouts (which was copy/pasted from
ClutterBoxLayout) was incorrect for non-zero child offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=704542
2013-07-22 07:09:19 -04:00
Jasper St. Pierre
73cd595b73 volume: Implement new volume menu design
This is a part of the new system status design, see
https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
for design details.

Since the designs require that we have a custom layout for the slider
item, this means that the PopupSliderMenuItem is unused, so remove it
as well.

https://bugzilla.gnome.org/show_bug.cgi?id=704368
2013-07-19 05:35:54 -04:00
Jasper St. Pierre
fb0f9cd1a1 popupMenu: Add a status label and icon to submenu menu items
This will allow us to implement the new submenu designs in the
aggregate menu.

https://bugzilla.gnome.org/show_bug.cgi?id=704368
2013-07-19 05:34:17 -04:00
Jasper St. Pierre
3816db03f5 popupMenu: Remove combo boxes and child menus
They're no longer used with the removal of the avatar widget.

https://bugzilla.gnome.org/show_bug.cgi?id=704368
2013-07-19 05:34:17 -04:00
Lionel Landwerlin
185152a74a popMenu: Fix invalid allocation
https://bugzilla.gnome.org/show_bug.cgi?id=704453
2013-07-18 14:28:33 +01:00
Jasper St. Pierre
126f0ed95d popupMenu: Remove non-all-spanning versions of colspan in popup menus
This simplifies the code considerably, and makes 'expand' behave as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=704336
2013-07-17 12:52:22 -04:00
Jasper St. Pierre
a2b499c460 popupMenu: Fix closing submenus when clicking on the expander
We need to make sure that we reset the opened submenu when we close the
submenu, not trick the toplevel into thinking a closed submenu is the
currently opened menu.

https://bugzilla.gnome.org/show_bug.cgi?id=704336
2013-07-17 12:52:22 -04:00
Jasper St. Pierre
5a5b3bf291 popupMenu: Use the parent field for sensitivity chaining
Instead of a signal mess.

https://bugzilla.gnome.org/show_bug.cgi?id=704336
2013-07-17 12:52:22 -04:00
Jasper St. Pierre
a4a6e7cf53 popupMenu: Fix parenting implementation
I got confused between menus and menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=704336
2013-07-17 12:52:22 -04:00
Michael Wood
658db43ad3 popupMenu: Don't count the separator as an item when returning isEmpty
If we have a separator don't use it's possibly-unsynced visibility to
determine if the menu is empty or not.

https://bugzilla.gnome.org/show_bug.cgi?id=70386
2013-07-17 16:40:51 +01:00
Jasper St. Pierre
dab8c5ea56 popupMenu: Fix bad syntax error 2013-07-15 12:57:51 -04:00
Jasper St. Pierre
4b889eac32 popupMenu: Ensure that submenus are properly hidden when insensitive
We don't actually propagate sensitivity information to submenus; we
simply make sure that they can never be open when the parent is
insensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:23 -04:00
Jasper St. Pierre
86835db8f2 popupMenu: Propagate sensitivity to menu children
This way, if a parent is insensitive, all children will be, too.
Though PopupSubMenus will be forced closed, PopupMenuSection needs
the propagation.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:23 -04:00
Jasper St. Pierre
bc317bf3f2 popupMenu: Remove 'sensitive' input param
It's hard to implement properly, was broken, and unused. If somebody
really wants it, they can call setSensitive after constructing the item.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Jasper St. Pierre
5c036eadf9 popupMenu: Only allow one submenu to be open at a time
When the user opens another submenu, close the first one.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Jasper St. Pierre
263474705b popupMenu: Emit open-state-changed at the start of animating a submenu
Doing it at the end has confusing semantics, especially as there is
this point where isOpen is true, but the corresponding open-state-changed
has not been emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Jasper St. Pierre
1e781ec78f popupMenu: Remove connectSubMenuSignals
The code here is a bit messy, as the signal disconnection is handled
in two different places. Share code in a better, different way.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Jasper St. Pierre
ef1eabf033 popupMenu: Ignore submenus when getting the column widths
The new designs don't want these to be aligned the same way.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Jasper St. Pierre
2fa40555e6 popupMenu: Simplify allocation code
Use ClutterActor.allocate_align_fill() so we don't have to do
this math ourselves. At the same time, clean up the RTL handling
so that it's easier to follow.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:34:22 -04:00
Jasper St. Pierre
2aae272d86 popupMenu: Don't close submenus when the toplevel container is closed
It seems this behavior at one time was intentional, but I (along with
the designers) think it looks ugly having the menu having its insides
shrinking and shifting around while fading out of existence.

There's two cases where we currently explicitly try to animate the
submenu closed -- when an item is clicked inside the submenu, and
when the toplevel closes. This removes both of those.

The user expectation is that submenus will be closed the next time the
toplevel is open even if they were open before, so force submenus closed
when the toplevel finishes fading out, without any animation.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:24:27 -04:00
Jasper St. Pierre
7db0900cc8 popupMenu: Introduce a way of closing toplevels from sections
As the aggregate menu will be built out of sections from each
of the menus, we need to ensure that activating an item in one
of these sections can close the main menu, even when it is not
a menu item. The new API also needs to be flexible enough to
ensure that animations can be controlled, like the buttons that
lock the screen or launch a new session.

Port the user menu to use this new API as well.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:01:07 -04:00
Jasper St. Pierre
c1e2d66abd popupMenu: Add a simple way to get the toplevel for a submenu / section
This will be used to avoid some nasty signal propagation when wanting to
rework how sections / submenus work.

https://bugzilla.gnome.org/show_bug.cgi?id=702539
2013-07-15 12:01:07 -04:00
Jasper St. Pierre
393577ee78 grabHelper: Remove explicitly having to select modal
https://bugzilla.gnome.org/show_bug.cgi?id=700735
2013-07-08 16:51:51 -04:00
Adel Gadllah
5c25497e16 PopupSliderMenuItem: Add scroll method
This fixes fallout from 847cb5b972

https://bugzilla.gnome.org/show_bug.cgi?id=702849
2013-06-24 00:00:40 +02:00
Jasper St. Pierre
e645edbda7 popupMenu: Fix PopupSliderMenuItem
It seems a bad rebase took this away.
2013-06-06 15:49:20 -04:00
Jasper St. Pierre
847cb5b972 slider: Separate PopupSliderMenuItem into its own widget
https://bugzilla.gnome.org/show_bug.cgi?id=701755
2013-06-06 14:00:38 -04:00
Jasper St. Pierre
cc64091f9c popupMenu: Fix bubbling in the slider widget
https://bugzilla.gnome.org/show_bug.cgi?id=701755
2013-06-06 14:00:38 -04:00
Florian Müllner
bbb23b515f popupMenu: Allow for an optional border for slider handle
While the default style works well will a solid handle, using both
border and fill color would be desirable in classic mode. Add the
necessary (optional) style properties to allow this.

https://bugzilla.gnome.org/show_bug.cgi?id=697917
2013-05-22 18:46:34 +02:00