refactor(color-picker): use closure callbacks
This commit is contained in:
@@ -219,7 +219,7 @@ local function renderRecentItem(color: string, index: number)
|
||||
fill = color,
|
||||
radius = swatch_radius / 2.5,
|
||||
border = "outline",
|
||||
onClick = "onHistoryColorClicked" .. index,
|
||||
onClick = function() handleHistoryClick(index) end,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -320,13 +320,6 @@ function handleHistoryClick(index: number)
|
||||
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)
|
||||
--==============================================
|
||||
|
||||
@@ -3,8 +3,8 @@ id = "oldirtty/color_picker"
|
||||
name = "Color Picker"
|
||||
description = "Pick a color from your screen with hyprpicker."
|
||||
license = "MIT"
|
||||
version = "1.0.4"
|
||||
plugin_api = 3
|
||||
version = "1.0.5"
|
||||
plugin_api = 9
|
||||
icon = "palette"
|
||||
dependencies = ["hyprpicker"]
|
||||
tags = ["theming", "utility", "bar", "panel"]
|
||||
|
||||
Reference in New Issue
Block a user