mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:30:48 +00:00
Added new graphics for NSOutlineView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12958 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3201155367
commit
cf88575ea4
2 changed files with 20 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2002-03-02 Gregory Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Images/common_outlineExpanded.tiff added.
|
||||||
|
* Images/common_outlineCollapsed.tiff added.
|
||||||
|
* Images/GNUmakefile modified to install images
|
||||||
|
* Source/NSOutlineView.m modified to use new images
|
||||||
|
|
||||||
2002-03-01 Richard Frith-Macdonald <rfm@gnu.org>
|
2002-03-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Headers/AppKit/NSEvent.h: Rename 'middle' mouse to 'other' as
|
* Headers/AppKit/NSEvent.h: Rename 'middle' mouse to 'other' as
|
||||||
|
|
|
@ -47,8 +47,8 @@ static NSNotificationCenter *nc = nil;
|
||||||
static const int current_version = 1;
|
static const int current_version = 1;
|
||||||
|
|
||||||
// Cache the arrow images...
|
// Cache the arrow images...
|
||||||
static NSImage *rightArrow = nil;
|
static NSImage *collapsed = nil;
|
||||||
static NSImage *downArrow = nil;
|
static NSImage *expanded = nil;
|
||||||
|
|
||||||
// Some necessary things which should not become ivars....
|
// Some necessary things which should not become ivars....
|
||||||
static float widest = 0.0;
|
static float widest = 0.0;
|
||||||
|
@ -221,9 +221,9 @@ _selectionChange (NSOutlineView *ov, id delegate, int numberOfRows,
|
||||||
{
|
{
|
||||||
[self setVersion: current_version];
|
[self setVersion: current_version];
|
||||||
nc = [NSNotificationCenter defaultCenter];
|
nc = [NSNotificationCenter defaultCenter];
|
||||||
rightArrow = [NSImage imageNamed: @"common_ArrowRight.tiff"];
|
collapsed = [NSImage imageNamed: @"common_outlineCollapsed.tiff"];
|
||||||
downArrow = [NSImage imageNamed: @"common_ArrowDown.tiff"];
|
expanded = [NSImage imageNamed: @"common_outlineExpanded.tiff"];
|
||||||
NSLog(@"%@ %@",rightArrow, downArrow);
|
// NSLog(@"%@ %@",rightArrow, downArrow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1742,7 +1742,7 @@ byExtendingSelection: (BOOL)flag
|
||||||
|
|
||||||
if(tb == _outlineTableColumn)
|
if(tb == _outlineTableColumn)
|
||||||
{
|
{
|
||||||
NSImage *arrow = nil;
|
NSImage *image = nil;
|
||||||
int level = 0;
|
int level = 0;
|
||||||
float indentationFactor = 0.0;
|
float indentationFactor = 0.0;
|
||||||
float originalWidth = drawingRect.size.width;
|
float originalWidth = drawingRect.size.width;
|
||||||
|
@ -1750,17 +1750,17 @@ byExtendingSelection: (BOOL)flag
|
||||||
// display the correct arrow...
|
// display the correct arrow...
|
||||||
if([self isItemExpanded: item])
|
if([self isItemExpanded: item])
|
||||||
{
|
{
|
||||||
arrow = downArrow;
|
image = expanded;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
arrow = rightArrow;
|
image = collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
level = [self levelForItem: item];
|
level = [self levelForItem: item];
|
||||||
// NSLog(@"outlineColumn: %@ level = %d", item, level);
|
// NSLog(@"outlineColumn: %@ level = %d", item, level);
|
||||||
indentationFactor = _indentationPerLevel * level;
|
indentationFactor = _indentationPerLevel * level;
|
||||||
imageCell = [[NSCell alloc] initImageCell: arrow];
|
imageCell = [[NSCell alloc] initImageCell: image];
|
||||||
|
|
||||||
if(_indentationMarkerFollowsCell)
|
if(_indentationMarkerFollowsCell)
|
||||||
{
|
{
|
||||||
|
@ -1773,8 +1773,8 @@ byExtendingSelection: (BOOL)flag
|
||||||
imageRect.origin.y = drawingRect.origin.y;
|
imageRect.origin.y = drawingRect.origin.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
imageRect.size.width = [arrow size].width;
|
imageRect.size.width = [image size].width;
|
||||||
imageRect.size.height = [arrow size].height;
|
imageRect.size.height = [image size].height;
|
||||||
|
|
||||||
// Draw the arrow if the item is expandable..
|
// Draw the arrow if the item is expandable..
|
||||||
if([self isExpandable: item])
|
if([self isExpandable: item])
|
||||||
|
@ -1782,8 +1782,8 @@ byExtendingSelection: (BOOL)flag
|
||||||
[imageCell drawWithFrame: imageRect inView: self];
|
[imageCell drawWithFrame: imageRect inView: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
drawingRect.origin.x += indentationFactor + [arrow size].width + 1;
|
drawingRect.origin.x += indentationFactor + [image size].width + 1;
|
||||||
drawingRect.size.width -= indentationFactor + [arrow size].width + 1;
|
drawingRect.size.width -= indentationFactor + [image size].width + 1;
|
||||||
|
|
||||||
if (widest < (drawingRect.origin.x + originalWidth))
|
if (widest < (drawingRect.origin.x + originalWidth))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue