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

Side by Side Diff: chrome/browser/ui/views/about_chrome_view.cc

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/about_chrome_view.h" 5 #include "chrome/browser/ui/views/about_chrome_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 // Then the main_text_label. 385 // Then the main_text_label.
386 main_text_label_->SetBounds(kPanelHorizMargin, 386 main_text_label_->SetBounds(kPanelHorizMargin,
387 copyright_label_->y() + 387 copyright_label_->y() +
388 copyright_label_->height(), 388 copyright_label_->height(),
389 sz.width(), 389 sz.width(),
390 main_text_label_height_); 390 main_text_label_height_);
391 391
392 // Get the y-coordinate of our parent so we can position the text left of the 392 // Get the y-coordinate of our parent so we can position the text left of the
393 // buttons at the bottom. 393 // buttons at the bottom.
394 gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); 394 gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
395 395
396 sz = throbber_->GetPreferredSize(); 396 sz = throbber_->GetPreferredSize();
397 int throbber_topleft_x = kPanelHorizMargin; 397 int throbber_topleft_x = kPanelHorizMargin;
398 int throbber_topleft_y = 398 int throbber_topleft_y =
399 parent_bounds.bottom() - sz.height() - views::kButtonVEdgeMargin - 3; 399 parent_bounds.bottom() - sz.height() - views::kButtonVEdgeMargin - 3;
400 throbber_->SetBounds(throbber_topleft_x, throbber_topleft_y, 400 throbber_->SetBounds(throbber_topleft_x, throbber_topleft_y,
401 sz.width(), sz.height()); 401 sz.width(), sz.height());
402 402
403 // This image is hidden (see ViewHierarchyChanged) and displayed on demand. 403 // This image is hidden (see ViewHierarchyChanged) and displayed on demand.
404 sz = success_indicator_.GetPreferredSize(); 404 sz = success_indicator_.GetPreferredSize();
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 View* parent = GetParent(); 828 View* parent = GetParent();
829 parent->Layout(); 829 parent->Layout();
830 830
831 // Check button may have appeared/disappeared. We cannot call this during 831 // Check button may have appeared/disappeared. We cannot call this during
832 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. 832 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet.
833 if (window()) 833 if (window())
834 GetDialogClientView()->UpdateDialogButtons(); 834 GetDialogClientView()->UpdateDialogButtons();
835 } 835 }
836 836
837 #endif 837 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698