From 17100c8b5f1b9e48dcbbbd9e1b532dc8c5c7c718 Mon Sep 17 00:00:00 2001 From: cleanlock Date: Wed, 29 Nov 2023 22:28:15 +0100 Subject: [PATCH] Fixed name alignment when Level for Unitframes is disabled --- Modules/UnitFrames/_Target.lua | 16 ++++++++++++++++ SUI.toc | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Modules/UnitFrames/_Target.lua b/Modules/UnitFrames/_Target.lua index 67411f57..bf9da862 100644 --- a/Modules/UnitFrames/_Target.lua +++ b/Modules/UnitFrames/_Target.lua @@ -31,6 +31,14 @@ function Module:OnEnable() -- Adjust Target Name position TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints() TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -45, -26) + elseif UnitLevel(self.unit) < 10 then + -- Adjust Target Name position + TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints() + TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -37.5, -26) + else + -- Adjust Target Name position + TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints() + TargetFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -30, -26) end end end) @@ -47,6 +55,14 @@ function Module:OnEnable() -- Adjust Focus Name position FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints() FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -45, -26) + elseif UnitLevel(self.unit) < 10 then + -- Adjust Target Name position + FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints() + FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -37.5, -26) + else + -- Adjust Target Name position + FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:ClearAllPoints() + FocusFrame.TargetFrameContent.TargetFrameContentMain.Name:SetPoint("TOP", self, "TOP", -30, -26) end end end) diff --git a/SUI.toc b/SUI.toc index 23d5edbd..3261587c 100644 --- a/SUI.toc +++ b/SUI.toc @@ -1,6 +1,6 @@ ## Interface: 100200 ## Author: Syiana & Muleyo -## Version: 10.2.06 +## Version: 10.2.07 ## Title: |cffea00ffS|r|cff00a2ffUI|r ## SavedVariables: SUIDB ## IconTexture: Interface\AddOns\SUI\Media\Icons\SUI