mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 00:20:49 +00:00
Fix some bugs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2516 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
18b1cf147c
commit
578e55e628
5 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Thu Oct 16 12:28:00 1997 Scott Christley <scottc@stetson.net-community.com>
|
||||||
|
|
||||||
|
* config.mak.in: Delete.
|
||||||
|
* Headers/gnustep/gui/NSScrollView.h: Correct datatype.
|
||||||
|
* Headers/gnustep/gui/NSWindow.h: Declare NSMutableArray.
|
||||||
|
* Source/NSMenu.m (-drawRect:): Handle rounding errors.
|
||||||
|
* Source/NSScrollView.m: Correct datatype.
|
||||||
|
|
||||||
Mon Oct 13 16:17:45 1997 Ovidiu Predescu <ovidiu@net-community.com>
|
Mon Oct 13 16:17:45 1997 Ovidiu Predescu <ovidiu@net-community.com>
|
||||||
|
|
||||||
* Source/NSMatrix.m: Removed commented out portions of code.
|
* Source/NSMatrix.m: Removed commented out portions of code.
|
||||||
|
|
|
@ -77,8 +77,8 @@
|
||||||
- (NSBorderType)borderType;
|
- (NSBorderType)borderType;
|
||||||
|
|
||||||
/* Managing the scrolled views */
|
/* Managing the scrolled views */
|
||||||
- (void)setContentView:(NSClipView*)aView;
|
- (void)setContentView:(NSView*)aView;
|
||||||
- (NSClipView*)contentView;
|
- (NSView*)contentView;
|
||||||
- (void)setDocumentView:(NSView*)aView;
|
- (void)setDocumentView:(NSView*)aView;
|
||||||
- (id)documentView;
|
- (id)documentView;
|
||||||
- (void)setDocumentCursor:(NSCursor*)aCursor;
|
- (void)setDocumentCursor:(NSCursor*)aCursor;
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSArray;
|
@class NSArray;
|
||||||
|
@class NSMutableArray;
|
||||||
@class NSData;
|
@class NSData;
|
||||||
@class NSDictionary;
|
@class NSDictionary;
|
||||||
@class NSNotification;
|
@class NSNotification;
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <AppKit/NSEvent.h>
|
#include <AppKit/NSEvent.h>
|
||||||
#include <AppKit/NSFont.h>
|
#include <AppKit/NSFont.h>
|
||||||
#include <AppKit/NSMenu.h>
|
#include <AppKit/NSMenu.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define ASSIGN(variable, value) \
|
#define ASSIGN(variable, value) \
|
||||||
[value retain]; \
|
[value retain]; \
|
||||||
|
@ -207,12 +208,15 @@ static NSFont* menuFont = nil;
|
||||||
int max, howMany;
|
int max, howMany;
|
||||||
NSRect intRect = {{0, 0}, {0, 0}};
|
NSRect intRect = {{0, 0}, {0, 0}};
|
||||||
|
|
||||||
max = count - rect.origin.y / (cellSize.height + INTERCELL_SPACE);
|
// If there are no cells then just return
|
||||||
howMany = rect.size.height / (cellSize.height + INTERCELL_SPACE);
|
if (count == 0) return;
|
||||||
|
|
||||||
|
max = ceil((float)count - rect.origin.y / (cellSize.height + INTERCELL_SPACE));
|
||||||
|
howMany = ceil(rect.size.height / (cellSize.height + INTERCELL_SPACE));
|
||||||
|
|
||||||
intRect.origin.y = (count - max) * (cellSize.height + INTERCELL_SPACE);
|
intRect.origin.y = (count - max) * (cellSize.height + INTERCELL_SPACE);
|
||||||
intRect.size = cellSize;
|
intRect.size = cellSize;
|
||||||
for (i = max - 1; howMany >= 0; i--, howMany--) {
|
for (i = max - 1; howMany > 0; i--, howMany--) {
|
||||||
id aCell = [cells objectAtIndex:i];
|
id aCell = [cells objectAtIndex:i];
|
||||||
|
|
||||||
[aCell drawWithFrame:intRect inView:self];
|
[aCell drawWithFrame:intRect inView:self];
|
||||||
|
|
|
@ -117,7 +117,7 @@ static Class rulerViewClass = nil;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setContentView:(NSClipView*)aView
|
- (void)setContentView:(NSView*)aView
|
||||||
{
|
{
|
||||||
ASSIGN(_contentView, aView);
|
ASSIGN(_contentView, aView);
|
||||||
[self addSubview:_contentView];
|
[self addSubview:_contentView];
|
||||||
|
@ -407,7 +407,7 @@ static Class rulerViewClass = nil;
|
||||||
- (BOOL)hasVerticalScroller { return _hasVertScroller; }
|
- (BOOL)hasVerticalScroller { return _hasVertScroller; }
|
||||||
- (BOOL)hasHorizontalRuler { return _hasHorizRuler; }
|
- (BOOL)hasHorizontalRuler { return _hasHorizRuler; }
|
||||||
- (NSSize)contentSize { return [_contentView bounds].size; }
|
- (NSSize)contentSize { return [_contentView bounds].size; }
|
||||||
- (NSClipView*)contentView { return _contentView; }
|
- (NSView*)contentView { return _contentView; }
|
||||||
- (NSRulerView*)horizontalRulerView { return _horizRuler; }
|
- (NSRulerView*)horizontalRulerView { return _horizRuler; }
|
||||||
- (BOOL)hasVerticalRuler { return _hasVertRuler; }
|
- (BOOL)hasVerticalRuler { return _hasVertRuler; }
|
||||||
- (NSRulerView*)verticalRulerView { return _vertRuler; }
|
- (NSRulerView*)verticalRulerView { return _vertRuler; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue