/
size.go
161 lines (132 loc) · 4.41 KB
/
size.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
package theme
import "fyne.io/fyne/v2"
const (
// SizeNameCaptionText is the name of theme lookup for helper text size, normally smaller than regular text size.
//
// Since: 2.0
SizeNameCaptionText fyne.ThemeSizeName = "helperText"
// SizeNameInlineIcon is the name of theme lookup for inline icons size.
//
// Since: 2.0
SizeNameInlineIcon fyne.ThemeSizeName = "iconInline"
// SizeNameInnerPadding is the name of theme lookup for internal widget padding size.
//
// Since: 2.3
SizeNameInnerPadding fyne.ThemeSizeName = "innerPadding"
// SizeNameLineSpacing is the name of theme lookup for between text line spacing.
//
// Since: 2.3
SizeNameLineSpacing fyne.ThemeSizeName = "lineSpacing"
// SizeNamePadding is the name of theme lookup for padding size.
//
// Since: 2.0
SizeNamePadding fyne.ThemeSizeName = "padding"
// SizeNameScrollBar is the name of theme lookup for the scrollbar size.
//
// Since: 2.0
SizeNameScrollBar fyne.ThemeSizeName = "scrollBar"
// SizeNameScrollBarSmall is the name of theme lookup for the shrunk scrollbar size.
//
// Since: 2.0
SizeNameScrollBarSmall fyne.ThemeSizeName = "scrollBarSmall"
// SizeNameSeparatorThickness is the name of theme lookup for the thickness of a separator.
//
// Since: 2.0
SizeNameSeparatorThickness fyne.ThemeSizeName = "separator"
// SizeNameText is the name of theme lookup for text size.
//
// Since: 2.0
SizeNameText fyne.ThemeSizeName = "text"
// SizeNameHeadingText is the name of theme lookup for text size of a heading.
//
// Since: 2.1
SizeNameHeadingText fyne.ThemeSizeName = "headingText"
// SizeNameSubHeadingText is the name of theme lookup for text size of a sub-heading.
//
// Since: 2.1
SizeNameSubHeadingText fyne.ThemeSizeName = "subHeadingText"
// SizeNameInputBorder is the name of theme lookup for input border size.
//
// Since: 2.0
SizeNameInputBorder fyne.ThemeSizeName = "inputBorder"
// SizeNameInputRadius is the name of theme lookup for input corner radius.
//
// Since: 2.4
SizeNameInputRadius fyne.ThemeSizeName = "inputRadius"
// SizeNameSelectionRadius is the name of theme lookup for selection corner radius.
//
// Since: 2.4
SizeNameSelectionRadius fyne.ThemeSizeName = "selectionRadius"
)
// CaptionTextSize returns the size for caption text.
func CaptionTextSize() float32 {
return current().Size(SizeNameCaptionText)
}
// IconInlineSize is the standard size of icons which appear within buttons, labels etc.
func IconInlineSize() float32 {
return current().Size(SizeNameInlineIcon)
}
// InnerPadding is the standard gap between element content and the outside edge of a widget.
//
// Since: 2.3
func InnerPadding() float32 {
return current().Size(SizeNameInnerPadding)
}
// InputBorderSize returns the input border size (or underline size for an entry).
//
// Since: 2.0
func InputBorderSize() float32 {
return current().Size(SizeNameInputBorder)
}
// InputRadiusSize returns the input radius size.
//
// Since: 2.4
func InputRadiusSize() float32 {
return current().Size(SizeNameInputRadius)
}
// LineSpacing is the default gap between multiple lines of text.
//
// Since: 2.3
func LineSpacing() float32 {
return current().Size(SizeNameLineSpacing)
}
// Padding is the standard gap between elements and the border around interface elements.
func Padding() float32 {
return current().Size(SizeNamePadding)
}
// ScrollBarSize is the width (or height) of the bars on a ScrollContainer.
func ScrollBarSize() float32 {
return current().Size(SizeNameScrollBar)
}
// ScrollBarSmallSize is the width (or height) of the minimized bars on a ScrollContainer.
func ScrollBarSmallSize() float32 {
return current().Size(SizeNameScrollBarSmall)
}
// SelectionRadiusSize returns the selection highlight radius size.
//
// Since: 2.4
func SelectionRadiusSize() float32 {
return current().Size(SizeNameSelectionRadius)
}
// SeparatorThicknessSize is the standard thickness of the separator widget.
//
// Since: 2.0
func SeparatorThicknessSize() float32 {
return current().Size(SizeNameSeparatorThickness)
}
// TextHeadingSize returns the text size for header text.
//
// Since: 2.1
func TextHeadingSize() float32 {
return current().Size(SizeNameHeadingText)
}
// TextSize returns the standard text size.
func TextSize() float32 {
return current().Size(SizeNameText)
}
// TextSubHeadingSize returns the text size for sub-header text.
//
// Since: 2.1
func TextSubHeadingSize() float32 {
return current().Size(SizeNameSubHeadingText)
}