* Source/GSThemeDrawing.m (drawScrollViewRect:inView:):

Use [self sizeForBorderType: borderType] to determine border width.
This commit is contained in:
Sergii Stoian 2019-12-17 13:29:30 +02:00
parent 5c96e8ba02
commit 20db33e008
2 changed files with 2 additions and 4 deletions

View file

@ -2,6 +2,7 @@
* Source/GSThemeDrawing.m (drawScrollViewRect:inView:): fixed scroller
border positionning and length - do not overlap border if any.
Use [self sizeForBorderType: borderType] to determine border width.
2019-12-12 Sergii Stoian <stoyan255@gmail.com>

View file

@ -2597,7 +2597,6 @@ typedef enum {
NSColor *color;
NSString *name;
NSBorderType borderType = [scrollView borderType];
CGFloat borderWidth = 0;
NSRect bounds = [view bounds];
BOOL hasInnerBorder = ![[NSUserDefaults standardUserDefaults]
boolForKey: @"GSScrollViewNoInnerBorder"];
@ -2625,17 +2624,14 @@ typedef enum {
case NSLineBorder:
[color set];
NSFrameRect(bounds);
borderWidth = 1;
break;
case NSBezelBorder:
[theme drawGrayBezel: bounds withClip: rect];
borderWidth = 2;
break;
case NSGrooveBorder:
[theme drawGroove: bounds withClip: rect];
borderWidth = 2;
break;
}
}
@ -2650,6 +2646,7 @@ typedef enum {
NSScroller *vertScroller = [scrollView verticalScroller];
NSScroller *horizScroller = [scrollView horizontalScroller];
CGFloat scrollerWidth = [NSScroller scrollerWidth];
CGFloat borderWidth = [self sizeForBorderType: borderType].width;
[color set];