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

Unified Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 13925019: fix GridLayout::CreatePanel for new style dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | ui/views/controls/message_box_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/task_manager_view.cc
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 9d27124305434b376145a29b37d50bf9057246e4..43656015c83eca868cd0fb65dc1976a8af9249da 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -497,9 +497,12 @@ void TaskManagerView::Layout() {
bool new_style = views::DialogDelegate::UseNewStyle();
gfx::Size size = kill_button_->GetPreferredSize();
gfx::Rect parent_bounds = parent()->GetContentsBounds();
- int x = width() - size.width() - (new_style ? 0 : views::kPanelHorizMargin);
- int y_buttons = new_style ? GetLocalBounds().bottom() - size.height() :
- parent_bounds.bottom() - size.height() - views::kButtonVEdgeMargin;
+ const int horizontal_margin =
+ new_style ? views::kButtonHEdgeMarginNew : views::kPanelHorizMargin;
+ const int vertical_margin =
+ new_style ? views::kButtonVEdgeMarginNew : views::kButtonVEdgeMargin;
+ int x = width() - size.width() - horizontal_margin;
+ int y_buttons = parent_bounds.bottom() - size.height() - vertical_margin;
kill_button_->SetBounds(x, y_buttons, size.width(), size.height());
if (purge_memory_button_) {
@@ -511,13 +514,13 @@ void TaskManagerView::Layout() {
}
size = about_memory_link_->GetPreferredSize();
- about_memory_link_->SetBounds(new_style ? 0 : views::kPanelHorizMargin,
+ about_memory_link_->SetBounds(
+ horizontal_margin,
y_buttons + (kill_button_->height() - size.height()) / 2,
size.width(), size.height());
gfx::Rect rect = GetLocalBounds();
- if (!new_style)
- rect.Inset(views::kPanelHorizMargin, views::kPanelVertMargin);
+ rect.Inset(horizontal_margin, views::kPanelVertMargin);
rect.Inset(0, 0, 0,
kill_button_->height() + views::kUnrelatedControlVerticalSpacing);
tab_table_parent_->SetBoundsRect(rect);
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | ui/views/controls/message_box_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698