mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Fixed missing drawing of the horizontal scroller border
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5096 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
867be115f0
commit
7b6c3a3c31
1 changed files with 25 additions and 7 deletions
|
@ -241,8 +241,9 @@
|
|||
_takesTitleFromPreviousColumn = YES;
|
||||
_isTitled = YES;
|
||||
_hasHorizontalScroller = YES;
|
||||
_scrollerRect.origin = NSZeroPoint;
|
||||
_scrollerRect.size.width = frame.size.width;
|
||||
_scrollerRect.origin.x = bs.width;
|
||||
_scrollerRect.origin.y = bs.height;
|
||||
_scrollerRect.size.width = frame.size.width - (2 * bs.width);
|
||||
_scrollerRect.size.height = [NSScroller scrollerWidth];
|
||||
_horizontalScroller = [[NSScroller alloc] initWithFrame: _scrollerRect];
|
||||
[_horizontalScroller setTarget: self];
|
||||
|
@ -1235,6 +1236,7 @@
|
|||
{
|
||||
NSRect r = NSZeroRect;
|
||||
int n;
|
||||
NSSize bs = [NSCell sizeForBorderType: NSBezelBorder];
|
||||
|
||||
// Number of columns over from the first
|
||||
n = column - _firstVisibleColumn;
|
||||
|
@ -1248,7 +1250,7 @@
|
|||
|
||||
// Adjust for horizontal scroller
|
||||
if (_hasHorizontalScroller)
|
||||
r.origin.y = [NSScroller scrollerWidth] + 4;
|
||||
r.origin.y = [NSScroller scrollerWidth] + (2 * bs.height) + 4;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
@ -1399,6 +1401,7 @@
|
|||
- (void)tile
|
||||
{
|
||||
int num;
|
||||
NSSize bs = [NSCell sizeForBorderType: NSBezelBorder];
|
||||
|
||||
// It is assumed the frame/bounds are set appropriately
|
||||
// before calling this method
|
||||
|
@ -1415,10 +1418,11 @@
|
|||
// Horizontal scroller
|
||||
if (_hasHorizontalScroller)
|
||||
{
|
||||
_scrollerRect.origin = NSZeroPoint;
|
||||
_scrollerRect.size.width = frame.size.width;
|
||||
_scrollerRect.size.height = [NSScroller scrollerWidth] + 4;
|
||||
_columnSize.height -= _scrollerRect.size.height;
|
||||
_scrollerRect.origin.x = bs.width;
|
||||
_scrollerRect.origin.y = bs.height;
|
||||
_scrollerRect.size.width = frame.size.width - (2* bs.width);
|
||||
_scrollerRect.size.height = [NSScroller scrollerWidth];
|
||||
_columnSize.height -= _scrollerRect.size.height + 4 + (2 * bs.height);
|
||||
}
|
||||
else
|
||||
_scrollerRect = NSZeroRect;
|
||||
|
@ -1453,6 +1457,20 @@
|
|||
if (! NSIsEmptyRect(r))
|
||||
[self displayColumn: i];
|
||||
}
|
||||
|
||||
if (_hasHorizontalScroller)
|
||||
{
|
||||
NSRect scrollerBorderRect = _scrollerRect;
|
||||
NSSize bs = [NSCell sizeForBorderType: NSBezelBorder];
|
||||
|
||||
scrollerBorderRect.origin.x = 0;
|
||||
scrollerBorderRect.origin.y = 0;
|
||||
scrollerBorderRect.size.width += 2 * bs.width;
|
||||
scrollerBorderRect.size.height += 2 * bs.height;
|
||||
|
||||
// Draw the horizontal scroller border
|
||||
NSDrawGrayBezel (scrollerBorderRect, rect);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue