From bbfd47efe37be511c62664cb604cb6b42c0a40b8 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Sat, 7 Dec 2013 20:40:47 +0000 Subject: [PATCH] * Source/GSThemeDrawing.m (-drawScrollViewRect:inView:): Use the scrollview bounds instead of the scroller frame for drawing the border. Patch by Jeff Teunissen . git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37438 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/GSThemeDrawing.m | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ec880d97..8fe3c653d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-12-07 Fred Kiefer + + * Source/GSThemeDrawing.m (-drawScrollViewRect:inView:): Use the + scrollview bounds instead of the scroller frame for drawing the border. + Patch by Jeff Teunissen . + 2013-12-06 Fred Kiefer * Source/NSBitmapImageRep+JPEG.m: Remove CYGWIN specific define as diff --git a/Source/GSThemeDrawing.m b/Source/GSThemeDrawing.m index e3dc62836..f9441075f 100644 --- a/Source/GSThemeDrawing.m +++ b/Source/GSThemeDrawing.m @@ -2622,6 +2622,7 @@ typedef enum { { NSInterfaceStyle style; CGFloat xpos; + CGFloat scrollerHeight = bounds.size.height; style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil); if (style == NSMacintoshInterfaceStyle @@ -2634,14 +2635,20 @@ typedef enum { xpos = [vertScroller frame].origin.x + scrollerWidth; } NSRectFill(NSMakeRect(xpos, [vertScroller frame].origin.y - 1.0, - 1.0, [vertScroller frame].size.height + 1.0)); + 1.0, scrollerHeight + 1.0)); } if ([scrollView hasHorizontalScroller]) { CGFloat ypos; CGFloat scrollerY = [horizScroller frame].origin.y; + CGFloat scrollerLength = bounds.size.width; + if ([scrollView hasVerticalScroller]) + { + scrollerLength -= [NSScroller scrollerWidth]; + } + if ([scrollView isFlipped]) { ypos = scrollerY - 1.0; @@ -2651,7 +2658,7 @@ typedef enum { ypos = scrollerY + scrollerWidth + 1.0; } NSRectFill(NSMakeRect([horizScroller frame].origin.x - 1.0, ypos, - [horizScroller frame].size.width + 1.0, 1.0)); + scrollerLength + 1.0, 1.0)); } } }