Add skeleton drawing method for switch to GSThemeDrawing.

This commit is contained in:
Gregory John Casamento 2020-04-16 12:16:30 -04:00
parent 8785a1307b
commit a1672a4605
3 changed files with 21 additions and 2 deletions

View file

@ -958,6 +958,12 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification;
*/
- (void) drawStepperHighlightDownButton: (NSRect)aRect;
// NSSwitch drawing methods
- (void) drawSwitchInRect: (NSRect)rect
forState: (NSControlStateValue)state
enabled: (BOOL)enabled;
// NSSegmentedControl drawing methods
- (void) drawSegmentedControlSegment: (NSCell *)cell

View file

@ -816,6 +816,14 @@
[self drawStepperDownButton: downRect];
}
// NSSwitch drawing methods
- (void) drawSwitchInRect: (NSRect)rect
forState: (NSControlStateValue)state
enabled: (BOOL)enabled
{
}
// NSSegmentedControl drawing methods
- (void) drawSegmentedControlSegment: (NSCell *)cell

View file

@ -22,8 +22,10 @@
Boston, MA 02110 USA.
*/
#import <AppKit/NSSwitch.h>
#import <AppKit/NSActionCell.h>
#import "AppKit/NSSwitch.h"
#import "AppKit/NSActionCell.h"
#import "GNUstepGUI/GSTheme.h"
@implementation NSSwitch
@ -48,6 +50,9 @@
- (void) drawRect: (NSRect)rect
{
[[GSTheme theme] drawSwitchInRect: rect
forState: _state
enabled: [self isEnabled]];
}
@end