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

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

Issue 3137019: Fix numerous alignment problems, both horizontal and vertical, in drawing the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/views/frame/browser_frame_win.cc
===================================================================
--- chrome/browser/views/frame/browser_frame_win.cc (revision 56452)
+++ chrome/browser/views/frame/browser_frame_win.cc (working copy)
@@ -67,15 +67,6 @@
BrowserFrameWin::~BrowserFrameWin() {
}
-int BrowserFrameWin::GetTitleBarHeight() {
- RECT caption = { 0 };
- if (DwmGetWindowAttribute(GetNativeView(), DWMWA_CAPTION_BUTTON_BOUNDS,
- &caption, sizeof(RECT)) == S_OK) {
- return caption.bottom;
- }
- return GetSystemMetrics(SM_CYCAPTION);
-}
-
views::Window* BrowserFrameWin::GetWindow() {
return this;
}
@@ -96,6 +87,10 @@
return browser_frame_view_->GetBoundsForTabStrip(tabstrip);
}
+int BrowserFrameWin::GetHorizontalTabStripVerticalOffset(bool restored) const {
+ return browser_frame_view_->GetHorizontalTabStripVerticalOffset(restored);
+}
+
void BrowserFrameWin::UpdateThrobber(bool running) {
browser_frame_view_->UpdateThrobber(running);
}
@@ -311,13 +306,10 @@
// In maximized mode, we only have a titlebar strip of glass, no side/bottom
// borders.
if (!browser_view_->IsFullscreen()) {
- if (browser_view_->UseVerticalTabs()) {
- margins.cyTopHeight = GetTitleBarHeight();
- } else {
- margins.cyTopHeight =
- GetBoundsForTabStrip(browser_view_->tabstrip()).bottom() +
- kDWMFrameTopOffset;
- }
+ gfx::Rect tabstrip_bounds(
+ GetBoundsForTabStrip(browser_view_->tabstrip()));
+ margins.cyTopHeight = (browser_view_->UseVerticalTabs() ?
+ tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset;
}
} else {
// For popup and app windows we want to use the default margins.
« no previous file with comments | « chrome/browser/views/frame/browser_frame_win.h ('k') | chrome/browser/views/frame/browser_non_client_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698