mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 21:00:37 +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
c84655da3d
commit
31c0b939b2
5 changed files with 65 additions and 1 deletions
|
@ -1075,6 +1075,8 @@ static CGFloat scrollerWidth;
|
|||
CGFloat innerBorderWidth = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey: @"GSScrollViewNoInnerBorder"] ? 0.0 : 1.0;
|
||||
|
||||
BOOL useBottomCorner = [[GSTheme theme] scrolViewUseBottomCorner];
|
||||
|
||||
style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil);
|
||||
|
||||
if (style == NSMacintoshInterfaceStyle
|
||||
|
@ -1140,6 +1142,15 @@ static CGFloat scrollerWidth;
|
|||
NSDivideRect (contentRect, &vertScrollerRect, &contentRect,
|
||||
scrollerWidth, verticalScrollerEdge);
|
||||
|
||||
/* If the theme requests it, leave a square gap in the bottom-
|
||||
* left (or bottom-right) corner where the horizontal and vertical
|
||||
* scrollers meet. */
|
||||
if (_hasHorizScroller && !useBottomCorner)
|
||||
{
|
||||
NSDivideRect (vertScrollerRect, NULL, &vertScrollerRect,
|
||||
scrollerWidth, bottomEdge);
|
||||
}
|
||||
|
||||
[_vertScroller setFrame: vertScrollerRect];
|
||||
|
||||
/* Substract 1 for the line that separates the vertical scroller
|
||||
|
@ -1288,7 +1299,12 @@ static CGFloat scrollerWidth;
|
|||
|
||||
- (BOOL) isOpaque
|
||||
{
|
||||
return [_contentView isOpaque];
|
||||
// FIXME: Only needs to be NO in a corner case,
|
||||
// when [[GSTheme theme] scrolViewUseBottomCorner] is NO
|
||||
// and the theme tile for the bottom corner is transparent.
|
||||
// So maybe cache the value of
|
||||
// [[GSTheme theme] scrolViewUseBottomCorner] and check it here.
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSBorderType) borderType
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue