diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 18:05:17 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 18:05:17 +0000 |
commit | 562dc9544aa2668b51a35793a90ad5cffec97c8f (patch) | |
tree | 9bc9eef579afa8105c1c69d92e2ff135db3a2381 /chrome/browser/cocoa/bookmark_bar_controller.mm | |
parent | d2ee25b6cb2cd1dd4267eb2a8972ef4a951caa29 (diff) | |
download | chromium_src-562dc9544aa2668b51a35793a90ad5cffec97c8f.zip chromium_src-562dc9544aa2668b51a35793a90ad5cffec97c8f.tar.gz chromium_src-562dc9544aa2668b51a35793a90ad5cffec97c8f.tar.bz2 |
Fix bookmark bar chevron not being pinned to right when launch with bar open.
TEST=\
Make browser window thin (e.g. 400pix wide).
Show bookmark bar. Quit. Relaunch.
Make sure the "off the side" chevron on the bookmark bar is pinned to the right of the window.
Resize width wider and thinner a little; make sure chevron stays pinned.
Make browser window wide (e.g. 1000pix wide).
Quit. Relaunch.
Make sure chevron is pinned to the right of the window.
Repeat all these tests but close the bookmark bar before quitting so it starts life closed.
Review URL: http://codereview.chromium.org/165207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22926 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm index 8fede00..ebba2f3 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.mm +++ b/chrome/browser/cocoa/bookmark_bar_controller.mm @@ -72,10 +72,8 @@ const CGFloat kBookmarkHorizontalPadding = 1.0; // expects. We will resize ourselves open later if needed. [[self view] setFrame:NSMakeRect(0, 0, initialWidth_, 0)]; - // Be sure to enable the bar before trying to show it... + // We are enabled by default. barIsEnabled_ = YES; - if (profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar)) - [self showBookmarkBar:YES immediately:YES]; // Don't pass ourself along (as 'self') until our init is completely // done. Thus, this call is (almost) last. @@ -91,6 +89,11 @@ const CGFloat kBookmarkHorizontalPadding = 1.0; object:[self view]]; } +- (void)showIfNeeded { + if (profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar)) + [self showBookmarkBar:YES immediately:YES]; +} + // Check if we should enable the off-the-side button. // TODO(jrg): when we are smarter about creating buttons (e.g. don't // bother creating buttons which aren't visible), we'll have to be |