mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Implement -appearannce, -setAppearance: and -effectiveApperance for NSView
This commit is contained in:
parent
501e38db7f
commit
9202dfeece
1 changed files with 24 additions and 0 deletions
|
@ -5257,6 +5257,30 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Implement NSAppearanceCustomization */
|
||||
- (NSAppearance*) appearance {
|
||||
return _appearance;
|
||||
}
|
||||
|
||||
- (void) setAppearance: (NSAppearance*) appearance {
|
||||
ASSIGNCOPY(_appearance, appearance);
|
||||
}
|
||||
|
||||
- (NSAppearance*) effectiveAppearance {
|
||||
if (_appearance)
|
||||
{
|
||||
return _appearance;
|
||||
}
|
||||
else if ([self superview])
|
||||
{
|
||||
return [[self superview] effectiveAppearance];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [NSAppearance currentAppearance];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
|
||||
|
|
Loading…
Reference in a new issue