Returns the overall scale factor of the frame. Unlike :GetScale() which returns the scale factor of the frame relative to its parent, this function returns the absolute scale factor of the frame, taking into account the relative scales of parent frames.

Signature:

scale = Frame:GetEffectiveScale()

Returns:

  • scale - Scale factor for the frame relative to its parent (number)

Examples:

CreateFrame("Frame","Frame1", UIParent)
Frame1:SetScale(0.5)
CreateFrame("Frame","Frame2", Frame1)
Frame2:SetScale(1.5)
CreateFrame("Frame","Frame3", Frame2)
Frame3:SetScale(0.25)

UIParent:GetEffectiveScale()
-- returns 1 (assuming the UI Scale setting in Video Options is not enabled)
Frame1:GetEffectiveScale()
-- returns 0.5
Frame2:GetEffectiveScale()
-- returns 0.75
Frame3:GetEffectiveScale()
-- returns 0.1875