Skip to content

Commit

Permalink
Sync with UILibDropDownMenu from latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
hizuro committed Jan 27, 2023
1 parent 48fdf05 commit 0ff53b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions LibDropDownMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ function UIDropDownMenuButtonIcon_OnEnter(self)
local shouldShowIconTooltip = UIDropDownMenuButton_ShouldShowIconTooltip(button);

if shouldShowIconTooltip then

local tooltip = GetAppropriateTooltip();
tooltip:SetOwner(button, "ANCHOR_RIGHT");
if button.iconTooltipTitle then
Expand Down Expand Up @@ -1478,18 +1477,18 @@ function UIDropDownMenu_ClearAll(frame)
end
end

function UIDropDownMenu_JustifyText(frame, justification, customXOffset)
function UIDropDownMenu_JustifyText(frame, justification, customXOffset, customYOffset)
local frameName = frame:GetName();
local text = GetChild(frame, frameName, "Text");
text:ClearAllPoints();
if ( justification == "LEFT" ) then
text:SetPoint("LEFT", GetChild(frame, frameName, "Left"), "LEFT", customXOffset or 27, 2);
text:SetPoint("LEFT", GetChild(frame, frameName, "Left"), "LEFT", customXOffset or 27, customYOffset or 2);
text:SetJustifyH("LEFT");
elseif ( justification == "RIGHT" ) then
text:SetPoint("RIGHT", GetChild(frame, frameName, "Right"), "RIGHT", customXOffset or -43, 2);
text:SetPoint("RIGHT", GetChild(frame, frameName, "Right"), "RIGHT", customXOffset or -43, customYOffset or 2);
text:SetJustifyH("RIGHT");
elseif ( justification == "CENTER" ) then
text:SetPoint("CENTER", GetChild(frame, frameName, "Middle"), "CENTER", customXOffset or -5, 2);
text:SetPoint("CENTER", GetChild(frame, frameName, "Middle"), "CENTER", customXOffset or -5, customYOffset or 2);
text:SetJustifyH("CENTER");
end
end
Expand Down
2 changes: 1 addition & 1 deletion LibDropDownMenuTemplatesCreate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function Create_LargeDropDownMenu(name,parent)
menu.Middle:SetPoint("TOPLEFT",menu.Left,"TOPRIGHT");
menu.Middle:SetPoint("BOTTOMRIGHT",menu.Right,"BOTTOMLEFT");

menu.Text = menu:CreateFrontString("NumberFont_Small");
menu.Text = menu:CreateFrontString("GameFontHighlight");
menu.Text:SetNonSpaceWrap(false);
menu.Text:SetJustifyH("RIGHT");
menu.Text:SetPoint("RIGHT",menu.Button,"LEFT",-4,1);
Expand Down

0 comments on commit 0ff53b9

Please sign in to comment.