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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 10821002: Makes the min window size include the OTR image and caption buttons on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 5 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/frame/browser_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index 35dbd56e3af16668c2a9ae21ef97a9bc74775a72..0bc08d4091cc254c03e698787ed3f9ba75f5533b 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -21,7 +21,6 @@
#include "ui/gfx/size.h"
#include "ui/views/controls/single_split_view.h"
-
namespace {
// The visible height of the shadow above the tabs. Clicks in this area are
@@ -67,11 +66,11 @@ BrowserViewLayout::~BrowserViewLayout() {
}
gfx::Size BrowserViewLayout::GetMinimumSize() {
- // TODO(noname): In theory the tabstrip width should probably be
- // (OTR + tabstrip + caption buttons) width.
gfx::Size tabstrip_size(
browser()->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) ?
tabstrip_->GetMinimumSize() : gfx::Size());
+ BrowserNonClientFrameView::TabStripInsets tab_strip_insets(
+ browser_view_->frame()->GetTabStripInsets(false));
gfx::Size toolbar_size(
(browser()->SupportsWindowFeature(Browser::FEATURE_TOOLBAR) ||
browser()->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) ?
@@ -90,8 +89,11 @@ gfx::Size BrowserViewLayout::GetMinimumSize() {
int min_height = tabstrip_size.height() + toolbar_size.height() +
bookmark_bar_size.height() + contents_size.height();
- int widths[] = { tabstrip_size.width(), toolbar_size.width(),
- bookmark_bar_size.width(), contents_size.width() };
+ int widths[] = {
+ tabstrip_size.width() + tab_strip_insets.left + tab_strip_insets.right,
+ toolbar_size.width(),
+ bookmark_bar_size.width(),
+ contents_size.width() };
int min_width = *std::max_element(&widths[0], &widths[arraysize(widths)]);
return gfx::Size(min_width, min_height);
}
@@ -257,7 +259,7 @@ void BrowserViewLayout::Layout(views::View* host) {
if (browser_view_->IsTabStripVisible()) {
tabstrip_->SetBackgroundOffset(gfx::Point(
tabstrip_->GetMirroredX() + browser_view_->GetMirroredX(),
- browser_view_->frame()->GetHorizontalTabStripVerticalOffset(false)));
+ browser_view_->frame()->GetTabStripInsets(false).top));
}
top = LayoutToolbar(top);
top = LayoutBookmarkAndInfoBars(top);
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698