summaryrefslogtreecommitdiffstats
path: root/chrome/views/chrome_menu.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 20:21:58 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-13 20:21:58 +0000
commit3803088091ca375b9dc4896ec5a3c85c5e99cbea (patch)
tree4a4c3b60eccae52d0dcb02f8d726663cc61c5920 /chrome/views/chrome_menu.h
parent760d03d9bdf2b69e9f526869a5513fbcae80017e (diff)
downloadchromium_src-3803088091ca375b9dc4896ec5a3c85c5e99cbea.zip
chromium_src-3803088091ca375b9dc4896ec5a3c85c5e99cbea.tar.gz
chromium_src-3803088091ca375b9dc4896ec5a3c85c5e99cbea.tar.bz2
Puts chrome menus on a slimfast diet: they are no longer chubby. I
added an option such that menus can be rendered in two ways, chubby or skinny. The only places that uses the taller menus is the bookmark bar. I also made the menus use the right font. BUG=1074332 TEST=none Review URL: http://codereview.chromium.org/10865 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/chrome_menu.h')
-rw-r--r--chrome/views/chrome_menu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/views/chrome_menu.h b/chrome/views/chrome_menu.h
index e1ed347..ec31e35 100644
--- a/chrome/views/chrome_menu.h
+++ b/chrome/views/chrome_menu.h
@@ -368,6 +368,12 @@ class MenuItemView : public View {
// doesn't have a mnemonic.
wchar_t GetMnemonic();
+ // Do we have icons? This only has effect on the top menu. Turning this on
+ // makes the menus slightly wider and taller.
+ void set_has_icons(bool has_icons) {
+ has_icons_ = has_icons;
+ }
+
protected:
// Creates a MenuItemView. This is used by the various AddXXX methods.
MenuItemView(MenuItemView* parent, int command, Type type);
@@ -419,6 +425,10 @@ class MenuItemView : public View {
// the windows used to display all descendants.
void DestroyAllMenuHosts();
+ // Returns the various margins.
+ int GetTopMargin();
+ int GetBottomMargin();
+
// The delegate. This is only valid for the root menu item. You shouldn't
// use this directly, instead use GetDelegate() which walks the tree as
// as necessary.
@@ -459,6 +469,8 @@ class MenuItemView : public View {
// Does the title have a mnemonic?
bool has_mnemonics_;
+ bool has_icons_;
+
DISALLOW_EVIL_CONSTRUCTORS(MenuItemView);
};