mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +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
d537e4dea2
commit
a93a1e4f8a
6 changed files with 22 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
common_TabUnSelectedJunction.tiff
|
common_TabUnSelectedJunction.tiff
|
||||||
common_TabUnSelectedLeft.tiff
|
common_TabUnSelectedLeft.tiff
|
||||||
common_TabUnSelectedRight.tiff: all tiffs needed to draw NSTabs.
|
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
|
* Source/NSTabView.m: lots of work on drawing. Should draw correct
|
||||||
in almost all cases. However, without event code I can't test it
|
in almost all cases. However, without event code I can't test it
|
||||||
yet.
|
yet.
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
@interface NSPopUpButtonMatrix : NSMenuMatrix
|
@interface NSPopUpButtonMatrix : NSMenuMatrix
|
||||||
{
|
{
|
||||||
|
BOOL pull_down;
|
||||||
int selected_cell;
|
int selected_cell;
|
||||||
NSPopUpButton *popup_button;
|
NSPopUpButton *popup_button;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ imagedir = $(GNUSTEP_RESOURCES)/Images
|
||||||
|
|
||||||
IMAGE_FILES = \
|
IMAGE_FILES = \
|
||||||
GNUstep_Images_Copyright \
|
GNUstep_Images_Copyright \
|
||||||
|
common_3DArrowDown.tiff \
|
||||||
common_ArrowDown.tiff \
|
common_ArrowDown.tiff \
|
||||||
common_ArrowUp.tiff \
|
common_ArrowUp.tiff \
|
||||||
common_ArrowRight.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);
|
ASSIGN(popup_button, popb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setPullsDown:(BOOL)pull
|
||||||
|
{
|
||||||
|
pull_down = pull;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)pullsDown
|
||||||
|
{
|
||||||
|
return pull_down;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -121,6 +131,7 @@
|
||||||
[super initWithFrame:frameRect];
|
[super initWithFrame:frameRect];
|
||||||
list_items = [[NSPopUpButtonMatrix alloc] initWithFrame:frameRect];
|
list_items = [[NSPopUpButtonMatrix alloc] initWithFrame:frameRect];
|
||||||
[list_items setPopUpButton:self];
|
[list_items setPopUpButton:self];
|
||||||
|
[list_items setPullsDown:flag];
|
||||||
is_up = NO;
|
is_up = NO;
|
||||||
pulls_down = flag;
|
pulls_down = flag;
|
||||||
selected_item = 0;
|
selected_item = 0;
|
||||||
|
@ -159,7 +170,10 @@
|
||||||
|
|
||||||
- (void)buttonSelected:(id)sender
|
- (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];
|
[self synchronizeTitleAndSelectedItem];
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,10 @@
|
||||||
|
|
||||||
if ([(NSPopUpButton *)view titleOfSelectedItem] == contents)
|
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
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue