Grid2

Grid2

9M Downloads

Can you add small steps for icons border?

hobulian opened this issue ยท 2 comments

commented

At my resolution(2560 x 1440) fraction for border size needed to achieve pixel perfect.

Will be very grateful if you add this one. Thanks!

Grid2Options\modules\indicators\Indicator.lua

function Grid2Options:MakeIndicatorAuraIconsBorderOptions(indicator, options, optionParams)
self:MakeIndicatorBorderOptions(indicator, options)
options.color1.hidden = function() return indicator.dbx.useStatusColor end
options.borderOpacity = {
type = "range",
order = 20.5,
name = L["Opacity"],
desc = L["Set the opacity."],
min = 0,
max = 1,
step = 0.01,
bigStep = 0.05,
get = function () return indicator.dbx.borderOpacity or 1 end,
set = function (, v)
indicator.dbx.borderOpacity = v
self:RefreshIndicator(indicator, "Layout")
end,
}
options.useStatusColor = {
type = "toggle",
name = L["Use Status Color"],
desc = L["Always use the status color for the border"],
order = 25,
tristate = false,
get = function () return indicator.dbx.useStatusColor end,
set = function (
, v)
indicator.dbx.useStatusColor = v or nil
self:RefreshIndicator(indicator, "Layout")
end,
}
end

commented

The coded pasted is not related to indicators border, what fraction value for steps is necessary ?

commented

Oh Sorry It was 431 line of
Grid2Options\modules\indicators\Indicator.lua

-- Grid2Options:MakeIndicatorBorderSizeOptions()
function Grid2Options:MakeIndicatorBorderSizeOptions(indicator, options, optionParams)
options.borderSize = {
type = "range",
order = 20,
name = L["Border Size"],
desc = L["Adjust the border size of the indicator."],
min = 0,
max = 20,
step = 0.01,
bigStep = 0.05,
get = function () return indicator.dbx.borderSize or 0 end,
set = function (_, v)
if v == 0 then v = nil end
indicator.dbx.borderSize = v
self:RefreshIndicator(indicator, "Layout")
end,
}
end

Cuz when step is 1 then it makes some borders of square are thicker than other borders in my resolution.
Like in SC
https://imgur.com/a/wRi9fD2