clean up rendering, allow configurable themes

This commit is contained in:
airstruck
2015-10-23 00:13:58 -04:00
parent e490e2899f
commit 03f0a48ff8
6 changed files with 200 additions and 145 deletions

View File

@@ -1,39 +1,53 @@
local backColor = { 240, 240, 240 }
local lineColor = { 220, 220, 220 }
local highlightColor = { 220, 220, 240 }
return function (config)
config = config or {}
return {
panel = {
background = backColor,
padding = 4,
},
button = {
type = 'panel',
align = 'center middle',
outline = lineColor,
bend = 0.1,
margin = 4,
},
button_hovered = {
bend = 0.2,
},
button_pressed = {
bend = -0.1,
},
text = {
align = 'left middle',
background = { 255, 255, 255 },
outline = lineColor,
bend = -0.1,
margin = 4,
padding = 4,
},
sash = {
background = highlightColor
},
slider = {
type = 'panel',
outline = lineColor,
bend = 0.1,
},
}
local backColor = config.backColor or { 240, 240, 240 }
local lineColor = config.lineColor or { 220, 220, 220 }
local white = config.white or { 255, 255, 255 }
local highlight = config.highlight or { 180, 180, 255 }
return {
panel = {
background = backColor,
padding = 4,
},
button = {
type = 'panel',
align = 'center middle',
outline = lineColor,
bend = 0.1,
margin = 4,
},
button_hovered = {
background = white,
outline = highlight,
},
button_pressed = {
background = highlight,
outline = highlight,
},
text = {
align = 'left middle',
background = { 255, 255, 255 },
outline = lineColor,
bend = -0.1,
margin = 4,
padding = 4,
},
sash = {
background = lineColor
},
sash_hovered = {
background = highlight
},
slider = {
type = 'panel',
outline = lineColor,
background = white,
},
slider_hovered = {
outline = highlight,
},
}
end