forked from AJet/DFeedback
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DFStyleSheet.m
79 lines (63 loc) · 2.82 KB
/
DFStyleSheet.m
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//-------------------------------------------------------------------------------------------------
// Copyright (c) 2008 DaisyDisk Team: <http://www.daisydiskapp.com>
// Some rights reserved: <http://opensource.org/licenses/mit-license.php>
//-------------------------------------------------------------------------------------------------
#import "DFStyleSheet.h"
//-------------------------------------------------------------------------------------------------
static BOOL _isInitialized = NO;
//-------------------------------------------------------------------------------------------------
// Bounce icon
NSTimeInterval DFBounceIcon_animationDuration = .25;
static void InitializeDFBounceIconStyles(void)
{
// do nothing
}
//-------------------------------------------------------------------------------------------------
// Placeholder text view
NSDictionary* DFPlaceholderTextView_placeholderTextAttributes = nil;
static void InitializeDFPlaceholderTextViewStyles(void)
{
DFPlaceholderTextView_placeholderTextAttributes = [@{NSForegroundColorAttributeName: [NSColor colorWithDeviceRed:128./255. green:128./255. blue:145./255. alpha:1.],
NSFontAttributeName: [NSFont userFontOfSize:12]} retain];
}
//-------------------------------------------------------------------------------------------------
// Feedback window
CGFloat DFFeedbackWindow_bottomBarHeight = 45.;
NSImage* DFFeedbackWindow_emailWarningImage = nil;
CGFloat DFFeedbackWindow_emailWarningImageZoomIncrement = 20.;
static void InitializeDFFeedbackWindow(void)
{
DFFeedbackWindow_emailWarningImage = [[NSImage imageNamed:@"DFWarning"] retain];
}
//-------------------------------------------------------------------------------------------------
// Crash report window
CGFloat DFCrashReportWindow_bottomBarHeight = 45.;
static void InitializeDFCrashReportWindow(void)
{
// do nothing
}
//-------------------------------------------------------------------------------------------------
// Link label
NSFont* DFLinkLabel_font = nil;
NSColor* DFLinkLabel_normalColor = nil;
NSColor* DFLinkLabel_linkColor = nil;
BOOL DFLinkLabel_linkUnderlined = YES;
static void InitializeDFLinkLabel(void)
{
DFLinkLabel_font = [[NSFont systemFontOfSize:12.] retain];
DFLinkLabel_normalColor = [[NSColor colorWithDeviceRed:0. green:0. blue:0. alpha:1.] retain];
DFLinkLabel_linkColor = [[NSColor colorWithDeviceRed:0. green:0. blue:1. alpha:1.] retain];
}
//-------------------------------------------------------------------------------------------------
void InitializeDFStyles(void)
{
if (!_isInitialized)
{
InitializeDFBounceIconStyles();
InitializeDFPlaceholderTextViewStyles();
InitializeDFFeedbackWindow();
InitializeDFCrashReportWindow();
InitializeDFLinkLabel();
_isInitialized = YES;
}
}