From c9af00d21e67b4dee15ec54655d30cb9f9139972 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Thu, 19 Aug 2010 20:29:07 +0000 Subject: Fix numerous alignment problems, both horizontal and vertical, in drawing the browser chrome. This doesn't fix problems with the NTP background image offsets (see bug 51853). This also makes sure the OTR avatar is reversed in RTL mode, and clipped as usefully as possible when there isn't enough room for the full image. BUG=44157 TEST=Frame, toolbar, bookmark bar, and find bar all look lined up with default and custom themes, restored and maximized, LTR and RTL, side tabs and normal tabs, and in popup and app windows Review URL: http://codereview.chromium.org/3137019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56737 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/frame/browser_view.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'chrome/browser/views/frame/browser_view.h') diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h index a56bbb3..1d77dff 100644 --- a/chrome/browser/views/frame/browser_view.h +++ b/chrome/browser/views/frame/browser_view.h @@ -116,7 +116,10 @@ class BrowserView : public BrowserBubbleHost, // initiated. void WindowMoveOrResizeStarted(); - // Returns the bounds of the toolbar, in BrowserView coordinates. + // Returns the apparent bounds of the toolbar, in BrowserView coordinates. + // These differ from |toolbar_.bounds()| in that they match where the toolbar + // background image is drawn -- slightly outside the "true" bounds + // horizontally, and, when using vertical tabs, behind the tab column. gfx::Rect GetToolbarBounds() const; // Returns the bounds of the content area, in the coordinates of the @@ -140,9 +143,11 @@ class BrowserView : public BrowserBubbleHost, // avatar icon. int GetTabStripHeight() const; - // Returns the bounds of the TabStrip. Used by themed views to determine the - // offset of IDR_THEME_TOOLBAR. - gfx::Rect GetTabStripBounds() const; + // Takes some view's origin (relative to this BrowserView) and offsets it such + // that it can be used as the source origin for seamlessly tiling the toolbar + // background image over that view. + gfx::Point OffsetPointForToolbarBackgroundImage( + const gfx::Point& point) const; // Returns the width of the currently displayed sidebar or 0. int GetSidebarWidth() const; -- cgit v1.1