Documentation
¶
Index ¶
- func Clickable(gtx layout.Context, button *widget.Clickable, w layout.Widget) layout.Dimensions
- type AnchorStrategy
- type ButtonLayoutStyle
- type ButtonStyle
- type CheckBoxStyle
- type DecorationsStyle
- type EditorStyle
- type IconButtonStyle
- type LabelStyle
- func Body1(th *Theme, txt string) LabelStyle
- func Body2(th *Theme, txt string) LabelStyle
- func Caption(th *Theme, txt string) LabelStyle
- func H1(th *Theme, txt string) LabelStyle
- func H2(th *Theme, txt string) LabelStyle
- func H3(th *Theme, txt string) LabelStyle
- func H4(th *Theme, txt string) LabelStyle
- func H5(th *Theme, txt string) LabelStyle
- func H6(th *Theme, txt string) LabelStyle
- func Label(th *Theme, size unit.Sp, txt string) LabelStyle
- func Overline(th *Theme, txt string) LabelStyle
- func Subtitle1(th *Theme, txt string) LabelStyle
- func Subtitle2(th *Theme, txt string) LabelStyle
- type ListStyle
- type LoaderStyle
- type Palette
- type ProgressBarStyle
- type ProgressCircleStyle
- type RadioButtonStyle
- type ScrollIndicatorStyle
- type ScrollTrackStyle
- type ScrollbarStyle
- type SliderStyle
- type SwitchStyle
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ButtonLayoutStyle ¶
type ButtonLayoutStyle struct {
Background color.NRGBA
CornerRadius unit.Dp
Button *widget.Clickable
}
func ButtonLayout ¶
func ButtonLayout(th *Theme, button *widget.Clickable) ButtonLayoutStyle
func (ButtonLayoutStyle) Layout ¶
func (b ButtonLayoutStyle) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions
type ButtonStyle ¶
type ButtonStyle struct {
Text string
Color color.NRGBA
Font font.Font
TextSize unit.Sp
Background color.NRGBA
CornerRadius unit.Dp
Inset layout.Inset
Button *widget.Clickable
// contains filtered or unexported fields
}
func (ButtonStyle) Layout ¶
func (b ButtonStyle) Layout(gtx layout.Context) layout.Dimensions
type CheckBoxStyle ¶
func (CheckBoxStyle) Layout ¶
func (c CheckBoxStyle) Layout(gtx layout.Context) layout.Dimensions
type DecorationsStyle ¶
type DecorationsStyle struct {
Decorations *widget.Decorations
Actions system.Action
Title LabelStyle
Background color.NRGBA
Foreground color.NRGBA
}
func Decorations ¶
func Decorations(th *Theme, deco *widget.Decorations, actions system.Action, title string) DecorationsStyle
func (DecorationsStyle) Layout ¶
func (d DecorationsStyle) Layout(gtx layout.Context) layout.Dimensions
type EditorStyle ¶
type EditorStyle struct {
Font font.Font
LineHeight unit.Sp
LineHeightScale float32
TextSize unit.Sp
Color color.NRGBA
Hint string
HintColor color.NRGBA
SelectionColor color.NRGBA
Editor *widget.Editor
// contains filtered or unexported fields
}
func (EditorStyle) Layout ¶
func (e EditorStyle) Layout(gtx layout.Context) layout.Dimensions
type IconButtonStyle ¶
type IconButtonStyle struct {
Background color.NRGBA
Color color.NRGBA
Icon *widget.Icon
Size unit.Dp
Inset layout.Inset
Button *widget.Clickable
Description string
}
func IconButton ¶
func (IconButtonStyle) Layout ¶
func (b IconButtonStyle) Layout(gtx layout.Context) layout.Dimensions
type LabelStyle ¶
type LabelStyle struct {
Font font.Font
Color color.NRGBA
SelectionColor color.NRGBA
Alignment text.Alignment
MaxLines int
WrapPolicy text.WrapPolicy
Truncator string
Text string
TextSize unit.Sp
LineHeight unit.Sp
LineHeightScale float32
Shaper *text.Shaper
State *widget.Selectable
}
func Body1 ¶
func Body1(th *Theme, txt string) LabelStyle
func Body2 ¶
func Body2(th *Theme, txt string) LabelStyle
func Caption ¶
func Caption(th *Theme, txt string) LabelStyle
func H1 ¶
func H1(th *Theme, txt string) LabelStyle
func H2 ¶
func H2(th *Theme, txt string) LabelStyle
func H3 ¶
func H3(th *Theme, txt string) LabelStyle
func H4 ¶
func H4(th *Theme, txt string) LabelStyle
func H5 ¶
func H5(th *Theme, txt string) LabelStyle
func H6 ¶
func H6(th *Theme, txt string) LabelStyle
func Overline ¶
func Overline(th *Theme, txt string) LabelStyle
func Subtitle1 ¶
func Subtitle1(th *Theme, txt string) LabelStyle
func Subtitle2 ¶
func Subtitle2(th *Theme, txt string) LabelStyle
func (LabelStyle) Layout ¶
func (l LabelStyle) Layout(gtx layout.Context) layout.Dimensions
type ListStyle ¶
type ListStyle struct {
ScrollbarStyle
AnchorStrategy
// contains filtered or unexported fields
}
func (ListStyle) Layout ¶
func (l ListStyle) Layout(gtx layout.Context, length int, w layout.ListElement) layout.Dimensions
func (ListStyle) LayoutWidgets ¶
type LoaderStyle ¶
func Loader ¶
func Loader(th *Theme) LoaderStyle
func (LoaderStyle) Layout ¶
func (l LoaderStyle) Layout(gtx layout.Context) layout.Dimensions
type ProgressBarStyle ¶
type ProgressBarStyle struct {
Color color.NRGBA
Height unit.Dp
Radius unit.Dp
TrackColor color.NRGBA
Progress float32
}
func ProgressBar ¶
func ProgressBar(th *Theme, progress float32) ProgressBarStyle
func (ProgressBarStyle) Layout ¶
func (p ProgressBarStyle) Layout(gtx layout.Context) layout.Dimensions
type ProgressCircleStyle ¶
func ProgressCircle ¶
func ProgressCircle(th *Theme, progress float32) ProgressCircleStyle
func (ProgressCircleStyle) Layout ¶
func (p ProgressCircleStyle) Layout(gtx layout.Context) layout.Dimensions
type RadioButtonStyle ¶
type RadioButtonStyle struct {
Key string
Group *widget.Enum
// contains filtered or unexported fields
}
func RadioButton ¶
func RadioButton(th *Theme, group *widget.Enum, key, label string) RadioButtonStyle
func (RadioButtonStyle) Layout ¶
func (r RadioButtonStyle) Layout(gtx layout.Context) layout.Dimensions
type ScrollIndicatorStyle ¶
type ScrollTrackStyle ¶
type ScrollbarStyle ¶
type ScrollbarStyle struct {
Scrollbar *widget.Scrollbar
Track ScrollTrackStyle
Indicator ScrollIndicatorStyle
}
func (ScrollbarStyle) Layout ¶
func (s ScrollbarStyle) Layout(gtx layout.Context, axis layout.Axis, viewportStart, viewportEnd float32) layout.Dimensions
func (ScrollbarStyle) Width ¶
func (s ScrollbarStyle) Width() unit.Dp
type SliderStyle ¶
type SliderStyle struct {
Axis layout.Axis
Color color.NRGBA
Float *widget.Float
FingerSize unit.Dp
}
func (SliderStyle) Layout ¶
func (s SliderStyle) Layout(gtx layout.Context) layout.Dimensions
type SwitchStyle ¶
type SwitchStyle struct {
Description string
Color struct {
Enabled color.NRGBA
Disabled color.NRGBA
Track color.NRGBA
}
Switch *widget.Bool
}
func (SwitchStyle) Layout ¶
func (s SwitchStyle) Layout(gtx layout.Context) layout.Dimensions
Click to show internal directories.
Click to hide internal directories.