-
Notifications
You must be signed in to change notification settings - Fork 2
/
discord_theme.go
90 lines (82 loc) · 2.44 KB
/
discord_theme.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
// Code generated by fyne-theme-generator
package main
import (
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
)
type discordTheme struct{}
func (discordTheme) Color(c fyne.ThemeColorName, v fyne.ThemeVariant) color.Color {
switch c {
case theme.ColorNameBackground:
return color.NRGBA{R: 0x31, G: 0x33, B: 0x38, A: 0xff}
case theme.ColorNameButton:
return color.NRGBA{R: 0x58, G: 0x65, B: 0xf2, A: 0xff}
case theme.ColorNameDisabledButton:
return color.NRGBA{R: 0x28, G: 0x29, B: 0x2e, A: 0xff}
case theme.ColorNameDisabled:
return color.NRGBA{R: 0x39, G: 0x39, B: 0x3a, A: 0xff}
case theme.ColorNameError:
return color.NRGBA{R: 0xf4, G: 0x43, B: 0x36, A: 0xff}
case theme.ColorNameFocus:
return color.NRGBA{R: 0x58, G: 0x65, B: 0xf2, A: 0xff}
case theme.ColorNameForeground:
return color.NRGBA{R: 0xf3, G: 0xf3, B: 0xf3, A: 0xff}
case theme.ColorNameHover:
return color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xf}
case theme.ColorNameInputBackground:
return color.NRGBA{R: 0x1e, G: 0x1f, B: 0x22, A: 0xff}
case theme.ColorNamePlaceHolder:
return color.NRGBA{R: 0xb2, G: 0xb2, B: 0xb2, A: 0xff}
case theme.ColorNamePressed:
return color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0x66}
case theme.ColorNamePrimary:
return color.NRGBA{R: 0x58, G: 0x65, B: 0xf2, A: 0xff}
case theme.ColorNameScrollBar:
return color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0x99}
case theme.ColorNameShadow:
return color.NRGBA{R: 0x0, G: 0x0, B: 0x0, A: 0x66}
default:
return theme.DarkTheme().Color(c, v) // This is deprecated in Fyne! Cool, I don't care.
}
}
func (discordTheme) Font(s fyne.TextStyle) fyne.Resource {
if s.Monospace {
return theme.DefaultTheme().Font(s)
}
if s.Bold {
if s.Italic {
return theme.DefaultTheme().Font(s)
}
return theme.DefaultTheme().Font(s)
}
if s.Italic {
return theme.DefaultTheme().Font(s)
}
return theme.DefaultTheme().Font(s)
}
func (discordTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
return theme.DefaultTheme().Icon(n)
}
func (discordTheme) Size(s fyne.ThemeSizeName) float32 {
switch s {
case theme.SizeNameCaptionText:
return 11
case theme.SizeNameInlineIcon:
return 20
case theme.SizeNamePadding:
return 6
case theme.SizeNameScrollBar:
return 16
case theme.SizeNameScrollBarSmall:
return 3
case theme.SizeNameSeparatorThickness:
return 1
case theme.SizeNameText:
return 13
case theme.SizeNameInputBorder:
return 1
default:
return theme.DefaultTheme().Size(s)
}
}