popupMenu: Use the standard arrow icons popup menu arrows

Rather than our own theme asset.
This commit is contained in:
Jasper St. Pierre
2014-06-24 13:43:35 -04:00
parent 66f5e4b44d
commit 88faee4c79
3 changed files with 6 additions and 102 deletions

View File

@ -46,33 +46,28 @@ function isPopupMenuItemVisible(child) {
* @side Side to which the arrow points.
*/
function arrowIcon(side) {
let rotation;
let iconName;
switch (side) {
case St.Side.TOP:
rotation = 180;
iconName = 'pan-up-symbolic';
break;
case St.Side.RIGHT:
rotation = - 90;
iconName = 'pan-end-symbolic';
break;
case St.Side.BOTTOM:
rotation = 0;
iconName = 'pan-down-symbolic';
break;
case St.Side.LEFT:
rotation = 90;
iconName = 'pan-start-symbolic';
break;
}
let gicon = new Gio.FileIcon({ file: Gio.File.new_for_path(global.datadir +
'/theme/menu-arrow-symbolic.svg') });
let arrow = new St.Icon({ style_class: 'popup-menu-arrow',
gicon: gicon,
icon_name: 'pan-end-symbolic',
accessible_role: Atk.Role.ARROW,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
arrow.rotation_angle_z = rotation;
return arrow;
}