mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
* Source/GSThemeDrawing.m (drawScrollViewRect:inView:): fixed scroller
border positionning and length - do not overlap border if any.
This commit is contained in:
parent
ec26b4e01b
commit
5c96e8ba02
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2019-12-17 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/GSThemeDrawing.m (drawScrollViewRect:inView:): fixed scroller
|
||||
border positionning and length - do not overlap border if any.
|
||||
|
||||
2019-12-12 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSFont.m (smallSystemFontSize): return 10 as default value.
|
||||
|
|
|
@ -2597,6 +2597,7 @@ typedef enum {
|
|||
NSColor *color;
|
||||
NSString *name;
|
||||
NSBorderType borderType = [scrollView borderType];
|
||||
CGFloat borderWidth = 0;
|
||||
NSRect bounds = [view bounds];
|
||||
BOOL hasInnerBorder = ![[NSUserDefaults standardUserDefaults]
|
||||
boolForKey: @"GSScrollViewNoInnerBorder"];
|
||||
|
@ -2624,14 +2625,17 @@ 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;
|
||||
}
|
||||
}
|
||||
|
@ -2665,8 +2669,8 @@ typedef enum {
|
|||
{
|
||||
xpos = [vertScroller frame].origin.x + scrollerWidth;
|
||||
}
|
||||
NSRectFill(NSMakeRect(xpos, [vertScroller frame].origin.y - 1.0,
|
||||
1.0, scrollerHeight + 1.0));
|
||||
NSRectFill(NSMakeRect(xpos, [vertScroller frame].origin.y,
|
||||
1.0, scrollerHeight - (borderWidth * 2)));
|
||||
}
|
||||
|
||||
if ([scrollView hasHorizontalScroller])
|
||||
|
@ -2688,8 +2692,8 @@ typedef enum {
|
|||
{
|
||||
ypos = scrollerY + scrollerWidth + 1.0;
|
||||
}
|
||||
NSRectFill(NSMakeRect([horizScroller frame].origin.x - 1.0, ypos,
|
||||
scrollerLength + 1.0, 1.0));
|
||||
NSRectFill(NSMakeRect([horizScroller frame].origin.x, ypos,
|
||||
scrollerLength - (borderWidth * 2), 1.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue