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

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

Issue 8172010: Account for minimum tabstrip width in opaque browser frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
===================================================================
--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc (revision 104341)
+++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc (working copy)
@@ -302,6 +302,17 @@
close_button_->GetMinimumSize().width();
#endif
min_size.set_width(std::max(min_size.width(), min_titlebar_width));
+
+ // Ensure that the minimum width is enough to hold a tab strip with minimum
+ // width at its usual insets.
+ if (browser_view_->IsTabStripVisible()) {
+ AbstractTabStripView* tabstrip = browser_view_->tabstrip();
+ int min_tabstrip_width = tabstrip->GetMinimumSize().width();
+ int min_tabstrip_area_width =
+ width() - GetBoundsForTabStrip(tabstrip).width() + min_tabstrip_width;
Peter Kasting 2011/10/06 20:31:33 This worries me because it is flexible. For examp
+ min_size.set_width(std::max(min_tabstrip_area_width, min_size.width()));
+ }
+
return min_size;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698