-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSYFlatButton.h
More file actions
31 lines (27 loc) · 2.14 KB
/
Copy pathSYFlatButton.h
File metadata and controls
31 lines (27 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// SYFlatButton.h
// SYFlatButton
//
// Created by Sunnyyoung on 2016/11/17.
// Copyright © 2016年 Sunnyyoung. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
#import <CoreGraphics/CoreGraphics.h>
IB_DESIGNABLE
@interface SYFlatButton : NSButton
@property (nonatomic, assign) IBInspectable BOOL momentary; // Default:NO - Restore button state when mouse up
@property (nonatomic, assign) IBInspectable CGFloat onAnimateDuration; // Default:0.0 - The animation duration from NSOffState to NSOnState
@property (nonatomic, assign) IBInspectable CGFloat offAnimateDuration; // Default:0.0 - The animation duration from NSOnState to NSOffState
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius; // Default:0.0 - Button's border corner radius
@property (nonatomic, assign) IBInspectable CGFloat borderWidth; // Default:0.0 - Button's border width
@property (nonatomic, assign) IBInspectable CGFloat spacing; // Default:0.0 - Button's spacint between image and title
@property (nonatomic, strong) IBInspectable NSColor *borderNormalColor; // Default:nil - Button's border color when state off
@property (nonatomic, strong) IBInspectable NSColor *borderHighlightColor; // Default:nil - Button's border color when state on
@property (nonatomic, strong) IBInspectable NSColor *backgroundNormalColor; // Default:nil - Button's background color when state off
@property (nonatomic, strong) IBInspectable NSColor *backgroundHighlightColor; // Default:nil - Button's background color when state on
@property (nonatomic, strong) IBInspectable NSColor *imageNormalColor; // Default:nil - Button's image color when state off
@property (nonatomic, strong) IBInspectable NSColor *imageHighlightColor; // Default:nil - Button's image color when state on
@property (nonatomic, strong) IBInspectable NSColor *titleNormalColor; // Default:nil - Button's title color when state off
@property (nonatomic, strong) IBInspectable NSColor *titleHighlightColor; // Default:nil - Button's title color when state on
@end