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

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

Issue 10907038: alternate ntp: clip middle omnibox when resizing browser window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed david's comments Created 8 years, 3 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/location_bar/location_bar_container.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_container.cc b/chrome/browser/ui/views/location_bar/location_bar_container.cc
index f66f46456c04f38af326f20ee3bcbf59ff318890..fac53e9cae4b2b630e79c07ae3c0c7dd9fd548be 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_container.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_container.cc
@@ -32,7 +32,6 @@ LocationBarContainer::LocationBarContainer(views::View* parent,
view_parent_->set_background(
views::Background::CreateSolidBackground(GetBackgroundColor()));
}
- SetLayoutManager(new views::FillLayout);
}
LocationBarContainer::~LocationBarContainer() {
@@ -67,6 +66,14 @@ gfx::Size LocationBarContainer::GetPreferredSize() {
return location_bar_view_->GetPreferredSize();
}
+void LocationBarContainer::Layout() {
+ // |location_bar_view_| fills the entire width of the container, but retains
+ // its preferred height, so that it's not resized which, if shrunk, will
+ // squish the placeholder text within a smaller vertical space.
+ location_bar_view_->SetBounds(0, 0, bounds().width(),
+ location_bar_view_->GetPreferredSize().height());
+}
+
bool LocationBarContainer::SkipDefaultKeyEventProcessing(
const ui::KeyEvent& event) {
return location_bar_view_->SkipDefaultKeyEventProcessing(event);

Powered by Google App Engine
This is Rietveld 408576698