diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 20:29:07 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 20:29:07 +0000 |
commit | c9af00d21e67b4dee15ec54655d30cb9f9139972 (patch) | |
tree | 294e2fdc6a7f1b3ef2935b974345d2d24db97af6 /chrome/browser/views/frame/browser_view.h | |
parent | adb0428576b6cdbbc9542319b5af8309057a17d1 (diff) | |
download | chromium_src-c9af00d21e67b4dee15ec54655d30cb9f9139972.zip chromium_src-c9af00d21e67b4dee15ec54655d30cb9f9139972.tar.gz chromium_src-c9af00d21e67b4dee15ec54655d30cb9f9139972.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/views/frame/browser_view.h')
-rw-r--r-- | chrome/browser/views/frame/browser_view.h | 13 |
1 files changed, 9 insertions, 4 deletions
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; |