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

Side by Side Diff: ui/views/bubble/bubble_frame_view.cc

Issue 2845593002: Updates Zoom bubble layout and adds +/- buttons (Closed)
Patch Set: Updates Zoom bubble layout and adds +/- buttons (comments) Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/bubble/bubble_frame_view.h" 5 #include "ui/views/bubble/bubble_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 title_bar_width += close_->width() + 1; 526 title_bar_width += close_->width() + 1;
527 527
528 gfx::Size size(client_size); 528 gfx::Size size(client_size);
529 gfx::Insets client_insets = GetInsets(); 529 gfx::Insets client_insets = GetInsets();
530 size.Enlarge(client_insets.width(), client_insets.height()); 530 size.Enlarge(client_insets.width(), client_insets.height());
531 size.SetToMax(gfx::Size(title_bar_width, 0)); 531 size.SetToMax(gfx::Size(title_bar_width, 0));
532 532
533 if (footnote_container_) 533 if (footnote_container_)
534 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); 534 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width()));
535 535
536 if (GetWidget()->widget_delegate()->AsDialogDelegate()) 536 DialogDelegate* dialog_delegate =
537 GetWidget()->widget_delegate()->AsDialogDelegate();
538 if (dialog_delegate && dialog_delegate->ShouldSnapFrameWidth())
537 size.set_width(LayoutProvider::Get()->GetSnappedDialogWidth(size.width())); 539 size.set_width(LayoutProvider::Get()->GetSnappedDialogWidth(size.width()));
538 540
539 return size; 541 return size;
540 } 542 }
541 543
542 } // namespace views 544 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698