summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 21:02:59 +0000
committerkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 21:02:59 +0000
commita119bfb949d674cd89be08d77f74ba710b019b36 (patch)
tree6aa5e81c98de582271a3fb66e3e11d7eeb8366d2 /chrome
parentd726e3cb5de011ee97789fb8aeccd2c5cfcd432b (diff)
downloadchromium_src-a119bfb949d674cd89be08d77f74ba710b019b36.zip
chromium_src-a119bfb949d674cd89be08d77f74ba710b019b36.tar.gz
chromium_src-a119bfb949d674cd89be08d77f74ba710b019b36.tar.bz2
Change SetPosition() to SetBounds() in FullscreenExitView::Layout().
The code currently erroneously assumes that SetPosition() will calculate the preferred size and use that for the bounds, which causes all the elements in the popup to be zero size. Review URL: http://codereview.chromium.org/8310015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble_views.cc24
1 files changed, 16 insertions, 8 deletions
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
index 3fcb352..ceebc768 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.cc
@@ -188,15 +188,23 @@ void FullscreenExitBubbleViews::FullscreenExitView::Layout() {
link_size.width();
int link_y = insets.top() + (inner_height - link_size.height()) / 2;
- message_label_.SetPosition(gfx::Point(insets.left() + kPaddingPx,
- message_label_y));
- link_.SetPosition(gfx::Point(link_x, link_y));
+ message_label_.SetBounds(insets.left() + kPaddingPx,
+ message_label_y,
+ message_label_size.width(),
+ message_label_size.height());
+ link_.SetBounds(link_x,
+ link_y,
+ link_size.width(),
+ link_size.height());
if (show_buttons_) {
- accept_button_->SetPosition(gfx::Point(button_box_x,
- insets.top() + kPaddingPx));
- deny_button_->SetPosition(gfx::Point(
- button_box_x + accept_size.width() + kPaddingPx,
- insets.top() + kPaddingPx));
+ accept_button_->SetBounds(button_box_x,
+ insets.top() + kPaddingPx,
+ accept_size.width(),
+ accept_size.height());
+ deny_button_->SetBounds(button_box_x + accept_size.width() + kPaddingPx,
+ insets.top() + kPaddingPx,
+ deny_size.width(),
+ deny_size.height());
}
}