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

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: remove instance of CreatePanel that doesn't seem to serve any purpose 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
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..8c0d1899387c51ac4e2f83510f2f9dd8b72b4e66 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -497,7 +497,8 @@ 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 x = width() - size.width() -
+ (new_style ? views::kPanelHorizMarginNewStyle : views::kPanelHorizMargin);
msw 2013/04/15 22:48:37 nit: make a local for this margin value to use her
Evan Stade 2013/04/16 00:20:37 Done.
int y_buttons = new_style ? GetLocalBounds().bottom() - size.height() :
parent_bounds.bottom() - size.height() - views::kButtonVEdgeMargin;
kill_button_->SetBounds(x, y_buttons, size.width(), size.height());
@@ -510,14 +511,17 @@ void TaskManagerView::Layout() {
y_buttons, size.width(), size.height());
}
+ // TODO(estade): This should use DialogDelegate::CreateExtraView.
size = about_memory_link_->GetPreferredSize();
- about_memory_link_->SetBounds(new_style ? 0 : views::kPanelHorizMargin,
+ about_memory_link_->SetBounds(
+ new_style ? views::kPanelHorizMarginNewStyle : views::kPanelHorizMargin,
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(new_style ? views::kPanelHorizMarginNewStyle :
+ views::kPanelHorizMargin,
+ views::kPanelVertMargin);
rect.Inset(0, 0, 0,
kill_button_->height() + views::kUnrelatedControlVerticalSpacing);
tab_table_parent_->SetBoundsRect(rect);

Powered by Google App Engine
This is Rietveld 408576698