diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 23:50:09 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 23:50:09 +0000 |
commit | 5471c7aacd182997567ee7ee5c78328b98b933ab (patch) | |
tree | 087017d241eda1faab0747b8bf7d115c82186111 /chrome | |
parent | 4dac48244af21f52caf6c7d8a2e1ced248070719 (diff) | |
download | chromium_src-5471c7aacd182997567ee7ee5c78328b98b933ab.zip chromium_src-5471c7aacd182997567ee7ee5c78328b98b933ab.tar.gz chromium_src-5471c7aacd182997567ee7ee5c78328b98b933ab.tar.bz2 |
[Mac] Minor tweaks to the Wrench menu.
* Swap the +/- zoom buttons so that minus is first.
* Invert the fullscreen arrows when in fullscreen mode.
BUG=49449
TEST=Visual
TEST=Wrench menu --> Enter full screen. Wrench menu now has inverted arrows to exit full screen.
Review URL: http://codereview.chromium.org/3008010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/nibs/Toolbar.xib | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/wrench_menu_controller.mm | 7 | ||||
-rw-r--r-- | chrome/browser/wrench_menu_model.h | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/chrome/app/nibs/Toolbar.xib b/chrome/app/nibs/Toolbar.xib index bebc253..d74c9f2 100644 --- a/chrome/app/nibs/Toolbar.xib +++ b/chrome/app/nibs/Toolbar.xib @@ -380,7 +380,7 @@ <object class="NSButton" id="529291232"> <reference key="NSNextResponder" ref="1015660087"/> <int key="NSvFlags">265</int> - <string key="NSFrame">{{3, 19}, {21, 21}}</string> + <string key="NSFrame">{{67, 19}, {21, 21}}</string> <reference key="NSSuperview" ref="1015660087"/> <int key="NSTag">38001</int> <bool key="NSEnabled">YES</bool> @@ -405,7 +405,7 @@ <object class="NSButton" id="977694438"> <reference key="NSNextResponder" ref="1015660087"/> <int key="NSvFlags">265</int> - <string key="NSFrame">{{67, 19}, {21, 21}}</string> + <string key="NSFrame">{{3, 19}, {21, 21}}</string> <reference key="NSSuperview" ref="1015660087"/> <reference key="NSNextKeyView" ref="545855108"/> <int key="NSTag">38003</int> diff --git a/chrome/browser/cocoa/wrench_menu_controller.mm b/chrome/browser/cocoa/wrench_menu_controller.mm index 0f31548..80ceed9 100644 --- a/chrome/browser/cocoa/wrench_menu_controller.mm +++ b/chrome/browser/cocoa/wrench_menu_controller.mm @@ -7,6 +7,8 @@ #include "app/menus/menu_model.h" #include "base/sys_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" +#include "chrome/browser/browser.h" +#include "chrome/browser/browser_window.h" #import "chrome/browser/cocoa/toolbar_controller.h" #include "chrome/browser/wrench_menu_model.h" @@ -71,6 +73,11 @@ NSString* title = base::SysUTF16ToNSString( [self wrenchMenuModel]->GetLabelForCommandId(IDC_ZOOM_PERCENT_DISPLAY)); [[zoomItem_ viewWithTag:IDC_ZOOM_PERCENT_DISPLAY] setTitle:title]; + + NSImage* icon = [self wrenchMenuModel]->browser()->window()->IsFullscreen() ? + [NSImage imageNamed:NSImageNameExitFullScreenTemplate] : + [NSImage imageNamed:NSImageNameEnterFullScreenTemplate]; + [zoomFullScreen_ setImage:icon]; } // Used to dispatch commands from the Wrench menu. The custom items within the diff --git a/chrome/browser/wrench_menu_model.h b/chrome/browser/wrench_menu_model.h index b7dc724..473888d 100644 --- a/chrome/browser/wrench_menu_model.h +++ b/chrome/browser/wrench_menu_model.h @@ -78,6 +78,9 @@ class WrenchMenuModel : public menus::SimpleMenuModel, const NotificationSource& source, const NotificationDetails& details); + // Getters. + Browser* browser() const { return browser_; } + private: // Testing constructor used for mocking. friend class ::MockWrenchMenuModel; |