mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Merge pull request #40 from trunkmaster/master
Scroller border drawing fix in NSScrollView
This commit is contained in:
commit
d6ef33d805
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
Use [self sizeForBorderType: borderType] to determine border width.
|
||||
|
||||
2019-12-12 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSFont.m (smallSystemFontSize): return 10 as default value.
|
||||
|
|
|
@ -2646,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];
|
||||
|
||||
|
@ -2665,8 +2666,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 +2689,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