summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 08:19:05 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 08:19:05 +0000
commit9ea053e87d2141867ee3429d8917809fe2e33c80 (patch)
tree1e3131c3d6ed6bc867973089241546f8fa179a72 /chrome
parent5643766f0fed86c472d22827c41e5b436a70e1e0 (diff)
downloadchromium_src-9ea053e87d2141867ee3429d8917809fe2e33c80.zip
chromium_src-9ea053e87d2141867ee3429d8917809fe2e33c80.tar.gz
chromium_src-9ea053e87d2141867ee3429d8917809fe2e33c80.tar.bz2
Relayout content pref page properly upon sync status changes.
This fixes a layouting problem that resulted in the "Stop syncing this account" button not being sized properly after setting up sync. BUG=48807 TEST=Open options dialog in non-synced state, configure sync, check "Stop syncing this account" button after setup. Review URL: http://codereview.chromium.org/2980005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52463 0039d316-1c4b-4281-b951-d872f2087c98
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_) {