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

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: slight clean-up 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/layout/grid_layout.cc » ('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..a2c36d2786676d0f3c3b7dfe0a7552318cb9f19f 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -497,9 +497,13 @@ 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;
+ int horizontal_margin =
+ new_style ? views::kButtonHEdgeMarginNew : views::kPanelHorizMargin;
+ 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;
msw 2013/04/16 00:53:21 nit: fits on the line above.
kill_button_->SetBounds(x, y_buttons, size.width(), size.height());
if (purge_memory_button_) {
@@ -511,13 +515,14 @@ 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);
msw 2013/04/16 00:53:21 nit: fits on the line above.
Evan Stade 2013/04/16 01:39:39 Done.
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/layout/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698