summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/frame/browser_view.cc5
-rw-r--r--chrome/browser/views/options/options_group_view.cc11
2 files changed, 7 insertions, 9 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 774eb73..7b019bb 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -420,7 +420,7 @@ BrowserView::BrowserView(Browser* browser)
devtools_container_(NULL),
contents_split_(NULL),
initialized_(false),
- ignore_layout_(false),
+ ignore_layout_(true),
#if defined(OS_WIN)
hung_window_detector_(&hung_plugin_action_),
ticker_(0),
@@ -1859,6 +1859,9 @@ void BrowserView::Init() {
#endif
browser_extender_.reset(new BrowserExtender());
+
+ // We're now initialized and ready to process Layout requests.
+ ignore_layout_ = false;
}
#if defined(OS_WIN)
diff --git a/chrome/browser/views/options/options_group_view.cc b/chrome/browser/views/options/options_group_view.cc
index 39cb18e2..1e742b4 100644
--- a/chrome/browser/views/options/options_group_view.cc
+++ b/chrome/browser/views/options/options_group_view.cc
@@ -119,17 +119,12 @@ void OptionsGroupView::Init() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, two_column_layout_id);
- // We need to do this so that the label can calculate an appropriate
- // preferred size (width * height) based on this width constraint. Otherwise
- // Label::GetPreferredSize will return 0,0 as the preferred size.
- title_label_->SetBounds(0, 0, left_column_width, 0);
- layout->AddView(title_label_);
+ layout->AddView(title_label_, 1, 1, GridLayout::FILL, GridLayout::LEADING);
layout->AddView(contents_, 1, 3, GridLayout::FILL, GridLayout::FILL);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(1, two_column_layout_id);
- // See comment above for title_label_.
- description_label_->SetBounds(0, 0, left_column_width, 0);
- layout->AddView(description_label_);
+ layout->AddView(description_label_, 1, 1,
+ GridLayout::FILL, GridLayout::LEADING);
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
if (show_separator_) {