mirror of
https://github.com/airstruck/luigi.git
synced 2025-12-19 02:16:43 +00:00
clean up rendering, allow configurable themes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user