-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy paththemedtestapp_test.go
108 lines (80 loc) · 1.74 KB
/
themedtestapp_test.go
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package theme_test
import (
"net/url"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
)
type themedApp struct {
primaryColor string
theme fyne.Theme
variant fyne.ThemeVariant
}
func (t *themedApp) CloudProvider() fyne.CloudProvider {
return nil
}
func (t *themedApp) BuildType() fyne.BuildType {
return fyne.BuildStandard
}
func (t *themedApp) NewWindow(title string) fyne.Window {
return nil
}
func (t *themedApp) OpenURL(url *url.URL) error {
return nil
}
func (t *themedApp) Icon() fyne.Resource {
return nil
}
func (t *themedApp) SetIcon(fyne.Resource) {
}
func (t *themedApp) Run() {
}
func (t *themedApp) Quit() {
}
func (t *themedApp) Driver() fyne.Driver {
return nil
}
func (t *themedApp) UniqueID() string {
return ""
}
func (t *themedApp) SendNotification(notification *fyne.Notification) {
}
func (t *themedApp) Settings() fyne.Settings {
return t
}
func (t *themedApp) Storage() fyne.Storage {
return nil
}
func (t *themedApp) Preferences() fyne.Preferences {
return nil
}
func (t *themedApp) Lifecycle() fyne.Lifecycle {
return nil
}
func (t *themedApp) Metadata() fyne.AppMetadata {
return fyne.AppMetadata{}
}
func (t *themedApp) PrimaryColor() string {
if t.primaryColor != "" {
return t.primaryColor
}
return theme.ColorBlue
}
func (t *themedApp) Theme() fyne.Theme {
return t.theme
}
func (t *themedApp) SetTheme(theme fyne.Theme) {
t.theme = theme
}
func (t *themedApp) ThemeVariant() fyne.ThemeVariant {
return t.variant // The null value is theme.VariantDark
}
func (t *themedApp) SetCloudProvider(fyne.CloudProvider) {
}
func (t *themedApp) Scale() float32 {
return 1.0
}
func (t *themedApp) ShowAnimations() bool {
return true
}
func (t *themedApp) AddChangeListener(chan fyne.Settings) {
}