refactor(color-picker): use closure callbacks
This commit is contained in:
@@ -219,7 +219,7 @@ local function renderRecentItem(color: string, index: number)
|
|||||||
fill = color,
|
fill = color,
|
||||||
radius = swatch_radius / 2.5,
|
radius = swatch_radius / 2.5,
|
||||||
border = "outline",
|
border = "outline",
|
||||||
onClick = "onHistoryColorClicked" .. index,
|
onClick = function() handleHistoryClick(index) end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -320,13 +320,6 @@ function handleHistoryClick(index: number)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function onHistoryColorClicked1() handleHistoryClick(1) end
|
|
||||||
function onHistoryColorClicked2() handleHistoryClick(2) end
|
|
||||||
function onHistoryColorClicked3() handleHistoryClick(3) end
|
|
||||||
function onHistoryColorClicked4() handleHistoryClick(4) end
|
|
||||||
function onHistoryColorClicked5() handleHistoryClick(5) end
|
|
||||||
function onHistoryColorClicked6() handleHistoryClick(6) end
|
|
||||||
|
|
||||||
--==============================================
|
--==============================================
|
||||||
-- CALLBACKS: colorspace fields (pure UI, no service call)
|
-- CALLBACKS: colorspace fields (pure UI, no service call)
|
||||||
--==============================================
|
--==============================================
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ id = "oldirtty/color_picker"
|
|||||||
name = "Color Picker"
|
name = "Color Picker"
|
||||||
description = "Pick a color from your screen with hyprpicker."
|
description = "Pick a color from your screen with hyprpicker."
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
version = "1.0.4"
|
version = "1.0.5"
|
||||||
plugin_api = 3
|
plugin_api = 9
|
||||||
icon = "palette"
|
icon = "palette"
|
||||||
dependencies = ["hyprpicker"]
|
dependencies = ["hyprpicker"]
|
||||||
tags = ["theming", "utility", "bar", "panel"]
|
tags = ["theming", "utility", "bar", "panel"]
|
||||||
|
|||||||
Reference in New Issue
Block a user