From 53652a1a78b85be0fb5b0a247949f4ab079e175b Mon Sep 17 00:00:00 2001 From: "stuart.morgan%alumni.case.edu" Date: Fri, 26 Oct 2007 17:59:11 +0000 Subject: [PATCH] Camino only - Bug 399731 - Fix tab background drawing under UI scaling. Patch by Ben Willmore . r=smorgan sr=pink git-svn-id: svn://10.0.0.236/trunk@238210 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/camino/src/browser/BrowserTabBarView.mm | 2 +- mozilla/camino/src/extensions/TabButtonCell.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/camino/src/browser/BrowserTabBarView.mm b/mozilla/camino/src/browser/BrowserTabBarView.mm index 3f056c460ee..c0ea76ab9bb 100644 --- a/mozilla/camino/src/browser/BrowserTabBarView.mm +++ b/mozilla/camino/src/browser/BrowserTabBarView.mm @@ -265,7 +265,7 @@ static const float kScrollButtonInterval = 0.15; // time (in seconds) between f { // draw tab bar background, omitting the selected Tab NSRect barFrame = [self bounds]; - NSPoint patternOrigin = [self convertPoint:NSMakePoint(0.0f, 0.0f) toView:nil]; + NSPoint patternOrigin = [self convertPoint:NSMakePoint(0.0f, 0.0f) toView:[[self window] contentView]]; NSRect fillRect; // first, fill to the left of the active tab diff --git a/mozilla/camino/src/extensions/TabButtonCell.mm b/mozilla/camino/src/extensions/TabButtonCell.mm index 5347e62b0d1..d6b02facd27 100644 --- a/mozilla/camino/src/extensions/TabButtonCell.mm +++ b/mozilla/camino/src/extensions/TabButtonCell.mm @@ -138,7 +138,7 @@ static NSImage* gTabButtonDividerImage = nil; [gTabButtonDividerImage compositeToPoint:NSMakePoint(NSMaxX(rect), rect.origin.y) operation:NSCompositeSourceOver]; } - NSPoint patternOrigin = [controlView convertPoint:NSMakePoint(0.0f, 0.0f) toView:nil]; + NSPoint patternOrigin = [controlView convertPoint:NSMakePoint(0.0f, 0.0f) toView:[[controlView window] contentView]]; NSWindow *window = [[mTabViewItem tabView] window]; if ([mTabViewItem tabState] == NSSelectedTab) { // move things down a little, to give the impression of being pulled forward