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

Unified Diff: chrome/browser/ui/views/location_bar/ev_bubble_view.cc

Issue 11648024: Clean-up positioning and spacing in chrome/browser/ui/views/location_bar/location_bar_view.cc (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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/location_bar/ev_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
index 5d651be560790a3debea00dd766281148e312982..e50f621d23e6afb834c19ee03ac78eafe5f3c54a 100644
--- a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
@@ -4,6 +4,13 @@
#include "chrome/browser/ui/views/location_bar/ev_bubble_view.h"
+namespace {
+
+// Set a minimum size for elided EV bubbles 150 px.
Peter Kasting 2012/12/21 19:17:01 Nit: Grammar
beaudoin 2013/01/03 03:30:45 Done.
+static const int kMinBubbleWidth = 150;
Peter Kasting 2012/12/21 19:17:01 Nit: Just declare this in the function where you u
beaudoin 2013/01/03 03:30:45 Done.
+
+} // namespace
+
EVBubbleView::EVBubbleView(const int background_images[],
int contained_image,
SkColor color,
@@ -16,6 +23,12 @@ EVBubbleView::EVBubbleView(const int background_images[],
EVBubbleView::~EVBubbleView() {
}
+gfx::Size EVBubbleView::GetMinimumSize() {
+ gfx::Size minimum(GetPreferredSize());
+ minimum.set_width(std::min(kMinBubbleWidth, minimum.width()));
+ return minimum;
+}
+
bool EVBubbleView::OnMousePressed(const ui::MouseEvent& event) {
// We want to show the dialog on mouse release; that is the standard behavior
// for buttons.

Powered by Google App Engine
This is Rietveld 408576698