From 88faee4c79f9ed47ea98cd98233e983bd5f96b2b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 24 Jun 2014 13:43:35 -0400 Subject: [PATCH] popupMenu: Use the standard arrow icons popup menu arrows Rather than our own theme asset. --- data/Makefile.am | 1 - data/theme/menu-arrow-symbolic.svg | 90 ------------------------------ js/ui/popupMenu.js | 17 ++---- 3 files changed, 6 insertions(+), 102 deletions(-) delete mode 100644 data/theme/menu-arrow-symbolic.svg diff --git a/data/Makefile.am b/data/Makefile.am index 46c337cca..c22dd1f97 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -35,7 +35,6 @@ dist_theme_DATA = \ theme/filter-selected-rtl.svg \ theme/gnome-shell.css \ theme/logged-in-indicator.svg \ - theme/menu-arrow-symbolic.svg \ theme/message-tray-background.png \ theme/more-results.svg \ theme/noise-texture.png \ diff --git a/data/theme/menu-arrow-symbolic.svg b/data/theme/menu-arrow-symbolic.svg deleted file mode 100644 index 07acaa8e0..000000000 --- a/data/theme/menu-arrow-symbolic.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index d7f3880c4..849341033 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -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; }