summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 18:11:18 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 18:11:18 +0000
commitaf7db19695f0c4e33d4dadd1424a474639b42c0f (patch)
tree4ce12162aef18ec3e7aca0bb1bf17e4d275edb8d /chrome
parentc11ffb461a13c6635173991788ff7a50fc6a77f3 (diff)
downloadchromium_src-af7db19695f0c4e33d4dadd1424a474639b42c0f.zip
chromium_src-af7db19695f0c4e33d4dadd1424a474639b42c0f.tar.gz
chromium_src-af7db19695f0c4e33d4dadd1424a474639b42c0f.tar.bz2
Tweak layout of password manager views so the buttons don't
move around when resizing the window. BUG=11900 TEST=Open the 'Show saved passwords' dialog in the Minor Tweaks pane. Resize the window, the buttons (i.e Remove) should not move. Review URL: http://codereview.chromium.org/115393 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/options/exceptions_page_view.cc14
-rw-r--r--chrome/browser/views/options/passwords_page_view.cc31
2 files changed, 21 insertions, 24 deletions
diff --git a/chrome/browser/views/options/exceptions_page_view.cc b/chrome/browser/views/options/exceptions_page_view.cc
index ecc9884..1718484 100644
--- a/chrome/browser/views/options/exceptions_page_view.cc
+++ b/chrome/browser/views/options/exceptions_page_view.cc
@@ -131,19 +131,21 @@ void ExceptionsPageView::InitControlLayout() {
// Design the grid.
ColumnSet* column_set = layout->AddColumnSet(column_set_id);
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
- GridLayout::FIXED, 300, 0);
+ GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 0,
+ column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
// Fill the grid.
- layout->StartRow(0.05f, column_set_id);
- layout->AddView(table_view_, 1, 2);
+ layout->StartRow(0, column_set_id);
+ layout->AddView(table_view_, 1, 4, GridLayout::FILL,
+ GridLayout::FILL);
layout->AddView(&remove_button_);
- layout->StartRow(0.80f, column_set_id);
+ layout->StartRowWithPadding(0, column_set_id, 0,
+ kRelatedControlVerticalSpacing);
layout->SkipColumns(1);
layout->AddView(&remove_all_button_);
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
+ layout->AddPaddingRow(1, 0);
// Ask the database for exception data.
table_model_.GetAllExceptionsForProfile();
diff --git a/chrome/browser/views/options/passwords_page_view.cc b/chrome/browser/views/options/passwords_page_view.cc
index c057701..64da35b 100644
--- a/chrome/browser/views/options/passwords_page_view.cc
+++ b/chrome/browser/views/options/passwords_page_view.cc
@@ -249,40 +249,35 @@ void PasswordsPageView::InitControlLayout() {
// Do the layout thing.
const int top_column_set_id = 0;
- const int lower_column_set_id = 1;
GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
// Design the grid.
ColumnSet* column_set = layout->AddColumnSet(top_column_set_id);
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
- GridLayout::FIXED, 300, 0);
- column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 0,
- GridLayout::USE_PREF, 0, 0);
-
- column_set = layout->AddColumnSet(lower_column_set_id);
- column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 0,
GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(1, kRelatedControlHorizontalSpacing);
- column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 0,
+ column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
+ column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
- column_set->LinkColumnSizes(0, 2, -1);
// Fill the grid.
- layout->StartRow(0.05f, top_column_set_id);
- layout->AddView(table_view_, 1, 4);
+ layout->StartRow(0, top_column_set_id);
+ layout->AddView(table_view_, 1, 8, GridLayout::FILL,
+ GridLayout::FILL);
layout->AddView(&remove_button_);
- layout->StartRow(0.05f, top_column_set_id);
+ layout->StartRowWithPadding(0, top_column_set_id, 0,
+ kRelatedControlVerticalSpacing);
layout->SkipColumns(1);
layout->AddView(&remove_all_button_);
- layout->StartRow(0.05f, top_column_set_id);
+ layout->StartRowWithPadding(0, top_column_set_id, 0,
+ kRelatedControlVerticalSpacing);
layout->SkipColumns(1);
layout->AddView(&show_button_);
- layout->StartRow(0.80f, top_column_set_id);
+ layout->StartRowWithPadding(0, top_column_set_id, 0,
+ kRelatedControlVerticalSpacing);
layout->SkipColumns(1);
layout->AddView(&password_label_);
- layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
+ layout->AddPaddingRow(1, 0);
// Ask the database for saved password data.
table_model_.GetAllSavedLoginsForProfile();
@@ -315,7 +310,7 @@ void PasswordsPageView::SetupTable() {
views::TableColumn::LEFT, -1, 0.55f));
columns.back().sortable = true;
columns.push_back(views::TableColumn(
- IDS_PASSWORDS_PAGE_VIEW_USERNAME_COLUMN, views::TableColumn::RIGHT,
+ IDS_PASSWORDS_PAGE_VIEW_USERNAME_COLUMN, views::TableColumn::LEFT,
-1, 0.37f));
columns.back().sortable = true;
table_view_ = new views::TableView(&table_model_, columns, views::TEXT_ONLY,