NSBrowser column and horizontal scroller widths fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19606 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-06-23 21:43:54 +00:00
parent 4e135076b8
commit 25fe6d035e
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2004-06-23 Serg Stoyan <stoyan255@ukr.net>
* Source/NSBrowser.m: (frameOfColumn:): Fixed calculating of last
visible column width when columns are separated.
(drawRect:): Draw horizontal scroller border only when columns are
separated. Fixed calculating of horizontal scroller width.
2004-06-22 Adrian Robert <arobert@cogsci.ucsd.edu> 2004-06-22 Adrian Robert <arobert@cogsci.ucsd.edu>
* Documentation/manual: Beginnings of programming manual for GUI like * Documentation/manual: Beginnings of programming manual for GUI like

View file

@ -1551,8 +1551,7 @@ static NSTextFieldCell *titleCell;
if (_separatesColumns) if (_separatesColumns)
r.size.width = _frame.size.width - r.origin.x; r.size.width = _frame.size.width - r.origin.x;
else else
r.size.width = _frame.size.width r.size.width = _frame.size.width - (r.origin.x + bs.width);
- (r.origin.x + (2 * bs.width) + ([self numberOfVisibleColumns] - 1));
} }
if (r.size.width < 0) if (r.size.width < 0)
@ -2061,14 +2060,14 @@ static NSTextFieldCell *titleCell;
} }
// Draws scroller border // Draws scroller border
if (_hasHorizontalScroller) if (_hasHorizontalScroller && _separatesColumns)
{ {
NSRect scrollerBorderRect = _scrollerRect; NSRect scrollerBorderRect = _scrollerRect;
NSSize bs = _sizeForBorderType (NSBezelBorder); NSSize bs = _sizeForBorderType (NSBezelBorder);
scrollerBorderRect.origin.x = 0; scrollerBorderRect.origin.x = 0;
scrollerBorderRect.origin.y = 0; scrollerBorderRect.origin.y = 0;
scrollerBorderRect.size.width += 2 * bs.width - 1; scrollerBorderRect.size.width += 2 * bs.width;
scrollerBorderRect.size.height += (2 * bs.height) - 1; scrollerBorderRect.size.height += (2 * bs.height) - 1;
if ((NSIntersectsRect (scrollerBorderRect, rect) == YES) && _window) if ((NSIntersectsRect (scrollerBorderRect, rect) == YES) && _window)