summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 02:32:02 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 02:32:02 +0000
commit10b26b02ac6c288e3d7167e19033fb2923395753 (patch)
tree3c072aa6acf93d502a888c28a84adce5ba6f1068 /ash
parent33a9780fa824f90f3103154c0600ef7e04dd4421 (diff)
downloadchromium_src-10b26b02ac6c288e3d7167e19033fb2923395753.zip
chromium_src-10b26b02ac6c288e3d7167e19033fb2923395753.tar.gz
chromium_src-10b26b02ac6c288e3d7167e19033fb2923395753.tar.bz2
Shorten the names in the application menus
BUG=178342 TEST=visual Review URL: https://chromiumcodereview.appspot.com/12381025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/launcher/launcher_view.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc
index 5745a5e..a105f01 100644
--- a/ash/launcher/launcher_view.cc
+++ b/ash/launcher/launcher_view.cc
@@ -77,6 +77,9 @@ const SkColor kActiveListItemBackgroundColor = SkColorSetRGB(203 , 219, 241);
const SkColor kFocusedActiveListItemBackgroundColor =
SkColorSetRGB(193, 211, 236);
+// The maximum allowable length of a menu line of an application menu in pixels.
+const int kMaximumAppMenuItemLength = 250;
+
namespace {
// An object which turns slow animations on during its lifetime.
@@ -109,6 +112,9 @@ class LauncherMenuModelAdapter
virtual bool GetBackgroundColor(int command_id,
bool is_hovered,
SkColor* override_color) const OVERRIDE;
+ virtual int GetMaxWidthForMenu(views::MenuItemView* menu) OVERRIDE;
+ virtual bool ShouldReserveSpaceForSubmenuIndicator() const OVERRIDE;
+
private:
DISALLOW_COPY_AND_ASSIGN(LauncherMenuModelAdapter);
};
@@ -148,6 +154,14 @@ void LauncherMenuModelAdapter::GetHorizontalIconMargins(
kHorizontalIconSpacing : -icon_size;
}
+int LauncherMenuModelAdapter::GetMaxWidthForMenu(views::MenuItemView* menu) {
+ return kMaximumAppMenuItemLength;
+}
+
+bool LauncherMenuModelAdapter::ShouldReserveSpaceForSubmenuIndicator() const {
+ return false;
+}
+
// Custom FocusSearch used to navigate the launcher in the order items are in
// the ViewModel.
class LauncherFocusSearch : public views::FocusSearch {