mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-28 10:50:46 +00:00
Fixed bug in horizontal scroller not being resized on resize
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5088 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4018766c42
commit
a666f4080b
1 changed files with 10 additions and 11 deletions
|
@ -222,7 +222,6 @@
|
||||||
- (id) initWithFrame: (NSRect)rect
|
- (id) initWithFrame: (NSRect)rect
|
||||||
{
|
{
|
||||||
NSSize bs;
|
NSSize bs;
|
||||||
NSRect scroller_rect;
|
|
||||||
|
|
||||||
[super initWithFrame: rect];
|
[super initWithFrame: rect];
|
||||||
|
|
||||||
|
@ -242,10 +241,10 @@
|
||||||
_takesTitleFromPreviousColumn = YES;
|
_takesTitleFromPreviousColumn = YES;
|
||||||
_isTitled = YES;
|
_isTitled = YES;
|
||||||
_hasHorizontalScroller = YES;
|
_hasHorizontalScroller = YES;
|
||||||
scroller_rect.origin = NSZeroPoint;
|
_scrollerRect.origin = NSZeroPoint;
|
||||||
scroller_rect.size.width = frame.size.width;
|
_scrollerRect.size.width = frame.size.width;
|
||||||
scroller_rect.size.height = [NSScroller scrollerWidth];
|
_scrollerRect.size.height = [NSScroller scrollerWidth];
|
||||||
_horizontalScroller = [[NSScroller alloc] initWithFrame: scroller_rect];
|
_horizontalScroller = [[NSScroller alloc] initWithFrame: _scrollerRect];
|
||||||
[_horizontalScroller setTarget: self];
|
[_horizontalScroller setTarget: self];
|
||||||
[_horizontalScroller setAction: @selector(scrollViaScroller:)];
|
[_horizontalScroller setAction: @selector(scrollViaScroller:)];
|
||||||
[self addSubview: _horizontalScroller];
|
[self addSubview: _horizontalScroller];
|
||||||
|
@ -1399,7 +1398,6 @@
|
||||||
//
|
//
|
||||||
- (void)tile
|
- (void)tile
|
||||||
{
|
{
|
||||||
NSRect scroller_rect;
|
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
// It is assumed the frame/bounds are set appropriately
|
// It is assumed the frame/bounds are set appropriately
|
||||||
|
@ -1417,13 +1415,13 @@
|
||||||
// Horizontal scroller
|
// Horizontal scroller
|
||||||
if (_hasHorizontalScroller)
|
if (_hasHorizontalScroller)
|
||||||
{
|
{
|
||||||
scroller_rect.origin = frame.origin;
|
_scrollerRect.origin = NSZeroPoint;
|
||||||
scroller_rect.size.width = frame.size.width;
|
_scrollerRect.size.width = frame.size.width;
|
||||||
scroller_rect.size.height = [NSScroller scrollerWidth] + 4;
|
_scrollerRect.size.height = [NSScroller scrollerWidth] + 4;
|
||||||
_columnSize.height -= scroller_rect.size.height;
|
_columnSize.height -= _scrollerRect.size.height;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
scroller_rect = NSZeroRect;
|
_scrollerRect = NSZeroRect;
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
if (_isTitled)
|
if (_isTitled)
|
||||||
|
@ -1708,6 +1706,7 @@
|
||||||
[super resizeSubviewsWithOldSize: oldSize];
|
[super resizeSubviewsWithOldSize: oldSize];
|
||||||
[self tile];
|
[self tile];
|
||||||
[self _adjustScrollerFrames: YES];
|
[self _adjustScrollerFrames: YES];
|
||||||
|
[_horizontalScroller setFrame: _scrollerRect];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue