minor tweaks

This commit is contained in:
airstruck
2015-10-31 15:32:48 -04:00
parent 1e668f8f09
commit 6c82e5f81d
7 changed files with 8 additions and 7 deletions

View File

@@ -23,9 +23,6 @@ local style = {
toolButton_not_hovered = {
slices = false,
},
toolButton_hovered = {
tint = { 200, 255, 200 },
},
statusbar = {
style = 'panel',
align = 'left middle',
@@ -88,7 +85,7 @@ local mainForm = { title = "Test window", id = 'mainWindow', type = 'panel',
local layout = Layout(mainForm)
layout:setStyle(style)
layout:setTheme(require 'luigi.theme.light' { highlight = { 150, 255, 150 } })
-- layout:setTheme(require 'luigi.theme.light')
layout.leftSideBox:addChild {
text = 'Alright man this is a great song\nwith a really long title...',

View File

@@ -14,7 +14,7 @@ local weakValueMeta = { __mode = 'v' }
function Layout:constructor (data)
self.accelerators = {}
self:setStyle()
self:setTheme()
self:setTheme(require(ROOT .. 'theme.light'))
self.isMousePressed = false
self.isManagingInput = false

View File

@@ -6,7 +6,7 @@ return function (config)
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 }
local highlight = config.highlight or { 0x19, 0xAE, 0xFF }
return {
button = {

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 485 B

View File

@@ -38,6 +38,8 @@ return function (self)
local function press (event)
local x1, y1, x2, y2 = self:getRectangle(true, true)
local halfThumb = thumb:getWidth() / 2
x1, x2 = x1 + halfThumb, x2 - halfThumb
self:setValue(clamp((event.x - x1) / (x2 - x1)))
self:reshape()
self.layout:tryFocus(thumb)
@@ -56,6 +58,8 @@ return function (self)
self:onReshape(function (event)
local x1, y1, x2, y2 = self:getRectangle(true, true)
spacer.width = self.value * (x2 - x1 - thumb:getWidth())
local halfThumb = thumb:getWidth() / 2
x1, x2 = x1 + halfThumb, x2 - halfThumb
spacer.width = self.value * (x2 - x1)
end)
end