Skip to content

Commit

Permalink
Minor visual adjustments: make ms grey, and sorting by addon name i…
Browse files Browse the repository at this point in the history
…gnores colors
  • Loading branch information
Numynum committed Dec 22, 2024
1 parent e5f4bfa commit 5cbaea8
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions AddonProfiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ function NAP:InitUI()
local ORDER_ASC = 1;
local ORDER_DESC = -1;

local TIME_FORMAT = "|cfff8f8f2%.3f|r|cfff92672ms|r";
local ROUND_TIME_FORMAT = "|cfff8f8f2%d|r|cfff92672ms|r";
local TIME_FORMAT = "|cfff8f8f2%.3f|r|cff808080ms|r";
local ROUND_TIME_FORMAT = "|cfff8f8f2%d|r|cff808080ms|r";
local COLUMN_INFO = {
{
title = "Addon Name",
Expand All @@ -189,16 +189,12 @@ function NAP:InitUI()
---@param a NAP_ElementData
---@param b NAP_ElementData
[ORDER_ASC] = function(a, b)
return a.addonTitle > b.addonTitle
or a.addonTitle == b.addonTitle
and a.addonName > b.addonName;
return strcmputf8i(StripHyperlinks(a.addonTitle), StripHyperlinks(b.addonTitle)) > 0
end,
---@param a NAP_ElementData
---@param b NAP_ElementData
[ORDER_DESC] = function(a, b)
return a.addonTitle < b.addonTitle
or a.addonTitle == b.addonTitle
and a.addonName < b.addonName;
return strcmputf8i(StripHyperlinks(a.addonTitle), StripHyperlinks(b.addonTitle)) < 0
end,
}
},
Expand Down Expand Up @@ -281,7 +277,7 @@ function NAP:InitUI()
title = "Over " .. ms .. "ms",
width = 85,
order = ORDER_ASC,
textFormat = "|cfff8f8f2%d|r",
textFormat = "|cfff8f8f2%d|r|cff808080x|r",
textKey = "over" .. ms .. "Ms",
tooltip = "How many times the addon took longer than " .. ms .. "ms per frame.",
sortMethods = {
Expand Down Expand Up @@ -580,8 +576,7 @@ function NAP:InitUI()
---@type NAP_ElementData
local data = self:GetElementData()
if data then
GameTooltip:SetOwner(self, "ANCHOR_NONE")
GameTooltip:SetPoint("TOPLEFT", self, "TOPRIGHT", 26, 2)
GameTooltip:SetOwner(self, "ANCHOR_CURSOR_RIGHT", 5, 5)
GameTooltip:AddLine(data.addonTitle)
GameTooltip:AddLine(data.addonName, 1, 1, 1)
local notes = NAP.addons[data.addonName] and NAP.addons[data.addonName].notes
Expand Down

0 comments on commit 5cbaea8

Please sign in to comment.