Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1onar committed Nov 9, 2024
1 parent 4897ced commit acff781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion KeyUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ function addon:SetKey(button)

-- Calculate the maximum allowed characters based on button width
local max_allowed_chars = math.floor(button:GetWidth() / 9)
local combined_text = button.short_key:GetText() or "" -- Use empty string if GetText() returns nil
local combined_text = button.short_key:GetText() or "" -- Combined text with modifiers if present / Use empty string if GetText() returns nil

-- Use Condensed font if the combined text exceeds max_allowed_chars
if string.len(combined_text) > max_allowed_chars then
Expand Down

0 comments on commit acff781

Please sign in to comment.