mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4445 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bd2f314275
commit
5dc712706c
6 changed files with 22 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
common_TabUnSelectedJunction.tiff
|
||||
common_TabUnSelectedLeft.tiff
|
||||
common_TabUnSelectedRight.tiff: all tiffs needed to draw NSTabs.
|
||||
* Images/common_3DArrowDown.tiff: for NSPopUp in pulldown mode.
|
||||
* Source/NSTabView.m: lots of work on drawing. Should draw correct
|
||||
in almost all cases. However, without event code I can't test it
|
||||
yet.
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
@interface NSPopUpButtonMatrix : NSMenuMatrix
|
||||
{
|
||||
BOOL pull_down;
|
||||
int selected_cell;
|
||||
NSPopUpButton *popup_button;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ imagedir = $(GNUSTEP_RESOURCES)/Images
|
|||
|
||||
IMAGE_FILES = \
|
||||
GNUstep_Images_Copyright \
|
||||
common_3DArrowDown.tiff \
|
||||
common_ArrowDown.tiff \
|
||||
common_ArrowUp.tiff \
|
||||
common_ArrowRight.tiff \
|
||||
|
|
BIN
Images/common_3DArrowDown.tiff
Normal file
BIN
Images/common_3DArrowDown.tiff
Normal file
Binary file not shown.
|
@ -82,6 +82,16 @@
|
|||
{
|
||||
ASSIGN(popup_button, popb);
|
||||
}
|
||||
|
||||
- (void)setPullsDown:(BOOL)pull
|
||||
{
|
||||
pull_down = pull;
|
||||
}
|
||||
|
||||
- (BOOL)pullsDown
|
||||
{
|
||||
return pull_down;
|
||||
}
|
||||
@end
|
||||
|
||||
//
|
||||
|
@ -121,6 +131,7 @@
|
|||
[super initWithFrame:frameRect];
|
||||
list_items = [[NSPopUpButtonMatrix alloc] initWithFrame:frameRect];
|
||||
[list_items setPopUpButton:self];
|
||||
[list_items setPullsDown:flag];
|
||||
is_up = NO;
|
||||
pulls_down = flag;
|
||||
selected_item = 0;
|
||||
|
@ -159,7 +170,10 @@
|
|||
|
||||
- (void)buttonSelected:(id)sender
|
||||
{
|
||||
selected_item = [self indexOfItemWithTitle:[sender title]];
|
||||
if (!pulls_down)
|
||||
selected_item = [self indexOfItemWithTitle:[sender title]];
|
||||
else
|
||||
selected_item = 0;
|
||||
|
||||
[self synchronizeTitleAndSelectedItem];
|
||||
|
||||
|
|
|
@ -62,7 +62,10 @@
|
|||
|
||||
if ([(NSPopUpButton *)view titleOfSelectedItem] == contents)
|
||||
{
|
||||
[super _drawImage:[NSImage imageNamed:@"common_Nibble"] inFrame:rect];
|
||||
if ([(NSPopUpButton *)view pullsDown] == NO)
|
||||
[super _drawImage:[NSImage imageNamed:@"common_Nibble"] inFrame:rect];
|
||||
else
|
||||
[super _drawImage:[NSImage imageNamed:@"common_3DArrowDown"] inFrame:rect];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue