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

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

Issue 13925019: fix GridLayout::CreatePanel for new style dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bookmarks/bookmark_editor_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 tree_view_->set_context_menu_controller(this); 282 tree_view_->set_context_menu_controller(this);
283 283
284 new_folder_button_.reset(new views::LabelButton(this, 284 new_folder_button_.reset(new views::LabelButton(this,
285 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON))); 285 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON)));
286 new_folder_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); 286 new_folder_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
287 new_folder_button_->set_owned_by_client(); 287 new_folder_button_->set_owned_by_client();
288 new_folder_button_->SetEnabled(false); 288 new_folder_button_->SetEnabled(false);
289 } 289 }
290 290
291 GridLayout* layout = GridLayout::CreatePanel(this); 291 GridLayout* layout = GridLayout::CreatePanel(this);
292 if (views::DialogDelegate::UseNewStyle())
293 layout->SetInsets(gfx::Insets());
294 SetLayoutManager(layout); 292 SetLayoutManager(layout);
295 293
296 const int labels_column_set_id = 0; 294 const int labels_column_set_id = 0;
297 const int single_column_view_set_id = 1; 295 const int single_column_view_set_id = 1;
298 const int buttons_column_set_id = 2; 296 const int buttons_column_set_id = 2;
299 297
300 views::ColumnSet* column_set = layout->AddColumnSet(labels_column_set_id); 298 views::ColumnSet* column_set = layout->AddColumnSet(labels_column_set_id);
301 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, 299 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
302 GridLayout::USE_PREF, 0, 0); 300 GridLayout::USE_PREF, 0, 0);
303 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); 301 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM); 622 IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM);
625 } 623 }
626 return context_menu_model_.get(); 624 return context_menu_model_.get();
627 } 625 }
628 626
629 void BookmarkEditorView::EditorTreeModel::SetTitle(ui::TreeModelNode* node, 627 void BookmarkEditorView::EditorTreeModel::SetTitle(ui::TreeModelNode* node,
630 const string16& title) { 628 const string16& title) {
631 if (!title.empty()) 629 if (!title.empty())
632 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); 630 ui::TreeNodeModel<EditorNode>::SetTitle(node, title);
633 } 631 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698