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

Unified Diff: chrome/browser/views/frame/opaque_non_client_view.cc

Issue 6349: Attempt to fix more standard non-client painting by extending the client area... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | « chrome/browser/views/frame/browser_view2.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/opaque_non_client_view.cc
===================================================================
--- chrome/browser/views/frame/opaque_non_client_view.cc (revision 3010)
+++ chrome/browser/views/frame/opaque_non_client_view.cc (working copy)
@@ -458,12 +458,14 @@
}
gfx::Rect OpaqueNonClientView::GetBoundsForTabStrip(TabStrip* tabstrip) {
- int tabstrip_height = tabstrip->GetPreferredHeight();
int tabstrip_x = otr_avatar_bounds_.right();
+ int tabstrip_y = CalculateNonClientTopHeight();
+ int tabstrip_height =
+ browser_view_->IsTabStripVisible() ? tabstrip->GetPreferredHeight() : 0;
int tabstrip_width = minimize_button_->x() - tabstrip_x;
if (frame_->IsMaximized())
tabstrip_width -= kNewTabIconWindowControlsSpacing;
- return gfx::Rect(tabstrip_x, 0, tabstrip_width, tabstrip_height);
+ return gfx::Rect(tabstrip_x, tabstrip_y, tabstrip_width, tabstrip_height);
}
void OpaqueNonClientView::UpdateWindowIcon() {
@@ -502,10 +504,9 @@
gfx::Rect OpaqueNonClientView::CalculateClientAreaBounds(int width,
int height) const {
- int top_margin = CalculateNonClientTopHeight();
- return gfx::Rect(kWindowHorizontalBorderSize, top_margin,
+ return gfx::Rect(kWindowHorizontalBorderSize, 0,
std::max(0, width - (2 * kWindowHorizontalBorderSize)),
- std::max(0, height - top_margin - kWindowVerticalBorderBottomSize));
+ std::max(0, height - kWindowVerticalBorderBottomSize));
}
gfx::Size OpaqueNonClientView::CalculateWindowSizeForClientSize(
« no previous file with comments | « chrome/browser/views/frame/browser_view2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698