Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: chrome/browser/ui/views/bookmark_editor_view.cc

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/bookmark_editor_view.h" 5 #include "chrome/browser/ui/views/bookmark_editor_view.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 void BookmarkEditorView::Layout() { 133 void BookmarkEditorView::Layout() {
134 // Let the grid layout manager lay out most of the dialog... 134 // Let the grid layout manager lay out most of the dialog...
135 GetLayoutManager()->Layout(this); 135 GetLayoutManager()->Layout(this);
136 136
137 if (!show_tree_) 137 if (!show_tree_)
138 return; 138 return;
139 139
140 // Manually lay out the New Folder button in the same row as the OK/Cancel 140 // Manually lay out the New Folder button in the same row as the OK/Cancel
141 // buttons... 141 // buttons...
142 gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); 142 gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
143 gfx::Size prefsize = new_group_button_->GetPreferredSize(); 143 gfx::Size prefsize = new_group_button_->GetPreferredSize();
144 int button_y = 144 int button_y =
145 parent_bounds.bottom() - prefsize.height() - views::kButtonVEdgeMargin; 145 parent_bounds.bottom() - prefsize.height() - views::kButtonVEdgeMargin;
146 new_group_button_->SetBounds(kPanelHorizMargin, button_y, prefsize.width(), 146 new_group_button_->SetBounds(kPanelHorizMargin, button_y, prefsize.width(),
147 prefsize.height()); 147 prefsize.height());
148 } 148 }
149 149
150 gfx::Size BookmarkEditorView::GetPreferredSize() { 150 gfx::Size BookmarkEditorView::GetPreferredSize() {
151 if (!show_tree_) 151 if (!show_tree_)
152 return views::View::GetPreferredSize(); 152 return views::View::GetPreferredSize();
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 break; 579 break;
580 } 580 }
581 } 581 }
582 DCHECK(child_bb_node); 582 DCHECK(child_bb_node);
583 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle()); 583 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle());
584 } 584 }
585 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node, 585 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node,
586 parent_b_node, parent_bb_node); 586 parent_b_node, parent_bb_node);
587 } 587 }
588 } 588 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698