mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 07:20:38 +00:00
* Headers/Additions/GNUstepGUI/GSTheme.h:
* Source/NSScrollView.m: * Source/GSThemeDrawing.m: * Source/GSTheme.m: Add GSScrollViewUseBottomCorner default, which themes can set to NO to leave a square gap in the bottom- left (or bottom-right) corner where the horizontal and vertical scrollers meet. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37176 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
52f8843480
commit
3bbfcbaab2
5 changed files with 65 additions and 1 deletions
|
@ -545,6 +545,16 @@
|
|||
return defaultScrollerWidth;
|
||||
}
|
||||
|
||||
- (BOOL) scrolViewUseBottomCorner
|
||||
{
|
||||
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
||||
if ([defs objectForKey: @"GSScrollViewUseBottomCorner"] != nil)
|
||||
{
|
||||
return [defs boolForKey: @"GSScrollViewUseBottomCorner"];
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSColor *) toolbarBackgroundColor
|
||||
{
|
||||
NSColor *color;
|
||||
|
@ -2311,6 +2321,26 @@ static NSDictionary *titleTextAttributes[3] = {nil, nil, nil};
|
|||
DPSstroke(ctxt);
|
||||
}
|
||||
}
|
||||
|
||||
if (![self scrolViewUseBottomCorner]
|
||||
&& [scrollView hasHorizontalScroller]
|
||||
&& [scrollView hasVerticalScroller])
|
||||
{
|
||||
NSScroller *vertScroller = [scrollView verticalScroller];
|
||||
NSScroller *horizScroller = [scrollView horizontalScroller];
|
||||
|
||||
NSRect bottomCornerRect = NSMakeRect([vertScroller frame].origin.x,
|
||||
[horizScroller frame].origin.y,
|
||||
NSWidth([vertScroller frame]),
|
||||
NSHeight([horizScroller frame]));
|
||||
|
||||
GSDrawTiles *tiles = [self tilesNamed: GSScrollViewBottomCorner
|
||||
state: GSThemeNormalState];
|
||||
|
||||
[self fillRect: bottomCornerRect
|
||||
withTiles: tiles
|
||||
background: [NSColor clearColor]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) drawBarInside: (NSRect)rect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue