mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +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
2a9ac3d0ce
commit
2aa4feb8ac
1 changed files with 25 additions and 7 deletions
|
@ -241,8 +241,9 @@
|
||||||
_takesTitleFromPreviousColumn = YES;
|
_takesTitleFromPreviousColumn = YES;
|
||||||
_isTitled = YES;
|
_isTitled = YES;
|
||||||
_hasHorizontalScroller = YES;
|
_hasHorizontalScroller = YES;
|
||||||
_scrollerRect.origin = NSZeroPoint;
|
_scrollerRect.origin.x = bs.width;
|
||||||
_scrollerRect.size.width = frame.size.width;
|
_scrollerRect.origin.y = bs.height;
|
||||||
|
_scrollerRect.size.width = frame.size.width - (2 * bs.width);
|
||||||
_scrollerRect.size.height = [NSScroller scrollerWidth];
|
_scrollerRect.size.height = [NSScroller scrollerWidth];
|
||||||
_horizontalScroller = [[NSScroller alloc] initWithFrame: _scrollerRect];
|
_horizontalScroller = [[NSScroller alloc] initWithFrame: _scrollerRect];
|
||||||
[_horizontalScroller setTarget: self];
|
[_horizontalScroller setTarget: self];
|
||||||
|
@ -1235,6 +1236,7 @@
|
||||||
{
|
{
|
||||||
NSRect r = NSZeroRect;
|
NSRect r = NSZeroRect;
|
||||||
int n;
|
int n;
|
||||||
|
NSSize bs = [NSCell sizeForBorderType: NSBezelBorder];
|
||||||
|
|
||||||
// Number of columns over from the first
|
// Number of columns over from the first
|
||||||
n = column - _firstVisibleColumn;
|
n = column - _firstVisibleColumn;
|
||||||
|
@ -1248,7 +1250,7 @@
|
||||||
|
|
||||||
// Adjust for horizontal scroller
|
// Adjust for horizontal scroller
|
||||||
if (_hasHorizontalScroller)
|
if (_hasHorizontalScroller)
|
||||||
r.origin.y = [NSScroller scrollerWidth] + 4;
|
r.origin.y = [NSScroller scrollerWidth] + (2 * bs.height) + 4;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -1399,6 +1401,7 @@
|
||||||
- (void)tile
|
- (void)tile
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
|
NSSize bs = [NSCell sizeForBorderType: NSBezelBorder];
|
||||||
|
|
||||||
// It is assumed the frame/bounds are set appropriately
|
// It is assumed the frame/bounds are set appropriately
|
||||||
// before calling this method
|
// before calling this method
|
||||||
|
@ -1415,10 +1418,11 @@
|
||||||
// Horizontal scroller
|
// Horizontal scroller
|
||||||
if (_hasHorizontalScroller)
|
if (_hasHorizontalScroller)
|
||||||
{
|
{
|
||||||
_scrollerRect.origin = NSZeroPoint;
|
_scrollerRect.origin.x = bs.width;
|
||||||
_scrollerRect.size.width = frame.size.width;
|
_scrollerRect.origin.y = bs.height;
|
||||||
_scrollerRect.size.height = [NSScroller scrollerWidth] + 4;
|
_scrollerRect.size.width = frame.size.width - (2* bs.width);
|
||||||
_columnSize.height -= _scrollerRect.size.height;
|
_scrollerRect.size.height = [NSScroller scrollerWidth];
|
||||||
|
_columnSize.height -= _scrollerRect.size.height + 4 + (2 * bs.height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_scrollerRect = NSZeroRect;
|
_scrollerRect = NSZeroRect;
|
||||||
|
@ -1453,6 +1457,20 @@
|
||||||
if (! NSIsEmptyRect(r))
|
if (! NSIsEmptyRect(r))
|
||||||
[self displayColumn: i];
|
[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…
Add table
Add a link
Reference in a new issue