mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 00:00:43 +00:00
* Source/GSThemeDrawing.m (-drawScrollViewRect:inView:): Use
NSRectFill() instead of line drawing to get sharper separator lines. * Source/GSThemeDrawing.m (-drawScrollerRect:...): Don't fill with window background colour. * Source/NSScroller.m (-drawRect:): Draw only the knob slot when disabled. * Source/NSScroller.m (-mouseDown:): Don't handle mouse down event when disabled. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37428 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b0bf0e98c6
commit
ab576bf677
3 changed files with 45 additions and 25 deletions
|
@ -2364,8 +2364,10 @@ typedef enum {
|
|||
rectForPartDecrementLine = [scroller rectForPart: NSScrollerDecrementLine];
|
||||
rectForPartKnobSlot = [scroller rectForPart: NSScrollerKnobSlot];
|
||||
|
||||
/*
|
||||
[[[view window] backgroundColor] set];
|
||||
NSRectFill (rect);
|
||||
*/
|
||||
|
||||
if (NSIntersectsRect (rect, rectForPartKnobSlot) == YES)
|
||||
{
|
||||
|
@ -2560,7 +2562,6 @@ typedef enum {
|
|||
inView: (NSView *)view
|
||||
{
|
||||
NSScrollView *scrollView = (NSScrollView *)view;
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
GSTheme *theme = [GSTheme theme];
|
||||
NSColor *color;
|
||||
NSString *name;
|
||||
|
@ -2616,45 +2617,41 @@ typedef enum {
|
|||
CGFloat scrollerWidth = [NSScroller scrollerWidth];
|
||||
|
||||
[color set];
|
||||
DPSsetlinewidth(ctxt, 1);
|
||||
|
||||
if ([scrollView hasVerticalScroller])
|
||||
{
|
||||
NSInterfaceStyle style;
|
||||
CGFloat xpos;
|
||||
|
||||
style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil);
|
||||
if (style == NSMacintoshInterfaceStyle
|
||||
|| style == NSWindows95InterfaceStyle)
|
||||
{
|
||||
DPSmoveto(ctxt, [vertScroller frame].origin.x - 1,
|
||||
[vertScroller frame].origin.y - 1);
|
||||
xpos = [vertScroller frame].origin.x - 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPSmoveto(ctxt, [vertScroller frame].origin.x + scrollerWidth,
|
||||
[vertScroller frame].origin.y - 1);
|
||||
xpos = [vertScroller frame].origin.x + scrollerWidth;
|
||||
}
|
||||
DPSrlineto(ctxt, 0, [vertScroller frame].size.height + 1);
|
||||
DPSstroke(ctxt);
|
||||
NSRectFill(NSMakeRect(xpos, [vertScroller frame].origin.y - 1.0,
|
||||
1.0, [vertScroller frame].size.height + 1.0));
|
||||
}
|
||||
|
||||
if ([scrollView hasHorizontalScroller])
|
||||
{
|
||||
float ypos;
|
||||
float scrollerY = [horizScroller frame].origin.y;
|
||||
CGFloat ypos;
|
||||
CGFloat scrollerY = [horizScroller frame].origin.y;
|
||||
|
||||
if ([scrollView isFlipped])
|
||||
{
|
||||
ypos = scrollerY - 1;
|
||||
ypos = scrollerY - 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ypos = scrollerY + scrollerWidth + 1;
|
||||
ypos = scrollerY + scrollerWidth + 1.0;
|
||||
}
|
||||
|
||||
DPSmoveto(ctxt, [horizScroller frame].origin.x - 1, ypos);
|
||||
DPSrlineto(ctxt, [horizScroller frame].size.width + 1, 0);
|
||||
DPSstroke(ctxt);
|
||||
NSRectFill(NSMakeRect([horizScroller frame].origin.x - 1.0, ypos,
|
||||
[horizScroller frame].size.width + 1.0, 1.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue