mirror of
https://github.com/airstruck/luigi.git
synced 2025-11-18 12:25:06 +00:00
minor tweaks
This commit is contained in:
@@ -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...',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user