Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultShortcut = "Ctrl+Alt+C"
DefaultShortcut is the pick shortcut a new library starts with.
View Source
const RecentLimit = 20
Variables ¶
View Source
var ErrInvalidState = errors.New("unsupported color data version or preferences")
View Source
var ErrReadOnly = errors.New("existing color data could not be read; preserving the original file")
Functions ¶
Types ¶
type State ¶
type State struct {
Version int `json:"version"`
Format colour.Format `json:"format"`
Shortcut string `json:"shortcut"`
Theme Theme `json:"theme"`
Language Language `json:"language"`
// MenuBarHidden is true once the user turns the menu bar icon off; the zero
// value keeps it, as files saved before the setting existed do.
MenuBarHidden bool `json:"menu_bar_hidden"`
// DockHidden is true once the user takes Dipo out of the Dock; the zero
// value keeps it there, as files saved before the setting existed do.
DockHidden bool `json:"dock_hidden"`
// NoAutoCopy is true once the user turns off copying a picked color; the zero
// value copies, as files saved before the setting existed do.
NoAutoCopy bool `json:"no_auto_copy"`
Recent []colour.Color `json:"recent"`
Favorites []colour.Color `json:"favorites"`
}
func (*State) ClearRecent ¶
func (state *State) ClearRecent()
func (*State) ToggleFavorite ¶
Click to show internal directories.
Click to hide internal directories.