本文整理汇总了Golang中github.com/cshapeshifter/wingo/wini.Key.Name方法的典型用法代码示例。如果您正苦于以下问题:Golang Key.Name方法的具体用法?Golang Key.Name怎么用?Golang Key.Name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cshapeshifter/wingo/wini.Key
的用法示例。
在下文中一共展示了Key.Name方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: loadSlimOption
func loadSlimOption(theme *ThemeConfig, k wini.Key) {
switch k.Name() {
case "border_size":
setInt(k, &theme.Slim.borderSize)
case "a_border_color":
setNoGradient(k, &theme.Slim.aBorderColor)
case "i_border_color":
setNoGradient(k, &theme.Slim.iBorderColor)
}
}
示例2: loadBorderOption
func loadBorderOption(theme *ThemeConfig, k wini.Key) {
switch k.Name() {
case "border_size":
setInt(k, &theme.Borders.borderSize)
case "a_thin_color":
setNoGradient(k, &theme.Borders.aThinColor)
case "i_thin_color":
setNoGradient(k, &theme.Borders.iThinColor)
case "a_border_color":
setGradient(k, &theme.Borders.aBorderColor)
case "i_border_color":
setGradient(k, &theme.Borders.iBorderColor)
}
}
示例3: loadFullOption
func loadFullOption(theme *ThemeConfig, k wini.Key) {
switch k.Name() {
case "font":
setFont(k, &theme.Full.font)
case "font_size":
setFloat(k, &theme.Full.fontSize)
case "a_font_color":
setNoGradient(k, &theme.Full.aFontColor)
case "i_font_color":
setNoGradient(k, &theme.Full.iFontColor)
case "title_size":
setInt(k, &theme.Full.titleSize)
case "title_top_margin":
logger.Warning.Printf("title_top_margin option has been removed.")
case "a_title_color":
setGradient(k, &theme.Full.aTitleColor)
case "i_title_color":
setGradient(k, &theme.Full.iTitleColor)
case "close":
setImage(k, &theme.Full.aCloseButton)
setImage(k, &theme.Full.iCloseButton)
case "a_close_color":
setNoGradient(k, &theme.Full.aCloseColor)
case "i_close_color":
setNoGradient(k, &theme.Full.iCloseColor)
case "maximize":
setImage(k, &theme.Full.aMaximizeButton)
setImage(k, &theme.Full.iMaximizeButton)
case "a_maximize_color":
setNoGradient(k, &theme.Full.aMaximizeColor)
case "i_maximize_color":
setNoGradient(k, &theme.Full.iMaximizeColor)
case "minimize":
setImage(k, &theme.Full.aMinimizeButton)
setImage(k, &theme.Full.iMinimizeButton)
case "a_minimize_color":
setNoGradient(k, &theme.Full.aMinimizeColor)
case "i_minimize_color":
setNoGradient(k, &theme.Full.iMinimizeColor)
case "border_size":
setInt(k, &theme.Full.borderSize)
case "a_border_color":
setNoGradient(k, &theme.Full.aBorderColor)
case "i_border_color":
setNoGradient(k, &theme.Full.iBorderColor)
}
}
示例4: loadPromptOption
func loadPromptOption(theme *ThemeConfig, k wini.Key) {
switch k.Name() {
case "bg_color":
setNoGradient(k, &theme.Prompt.bgColor)
case "border_color":
setNoGradient(k, &theme.Prompt.borderColor)
case "border_size":
setInt(k, &theme.Prompt.borderSize)
case "padding":
setInt(k, &theme.Prompt.padding)
case "font":
setFont(k, &theme.Prompt.font)
case "font_size":
setFloat(k, &theme.Prompt.fontSize)
case "font_color":
setNoGradient(k, &theme.Prompt.fontColor)
case "cycle_icon_size":
setInt(k, &theme.Prompt.cycleIconSize)
case "cycle_icon_border_size":
setInt(k, &theme.Prompt.cycleIconBorderSize)
case "cycle_icon_transparency":
setInt(k, &theme.Prompt.cycleIconTransparency)
// naughty!
if theme.Prompt.cycleIconTransparency < 0 ||
theme.Prompt.cycleIconTransparency > 100 {
logger.Warning.Printf("Illegal value '%s' provided for " +
"'cycle_icon_transparency'. Transparency " +
"values must be in the range [0, 100], " +
"inclusive. Using 100 by default.")
theme.Prompt.cycleIconTransparency = 100
}
case "select_active_font_color":
setNoGradient(k, &theme.Prompt.selectActiveFontColor)
case "select_active_bg_color":
setNoGradient(k, &theme.Prompt.selectActiveBgColor)
case "select_group_bg_color":
setNoGradient(k, &theme.Prompt.selectGroupBgColor)
case "select_group_font":
setFont(k, &theme.Prompt.selectGroupFont)
case "select_group_font_size":
setFloat(k, &theme.Prompt.selectGroupFontSize)
case "select_group_font_color":
setNoGradient(k, &theme.Prompt.selectGroupFontColor)
}
}
示例5: loadMiscOption
func loadMiscOption(theme *ThemeConfig, k wini.Key) {
switch k.Name() {
case "default_icon":
setImage(k, &theme.DefaultIcon)
}
}