From 5567f048bebc97b98e170388ec1bf1d7a2e61e2a Mon Sep 17 00:00:00 2001 From: fafaraway Date: Mon, 13 Mar 2023 19:24:11 +0800 Subject: [PATCH] feat(tooltip, gui): add option to adjust the scaling value of tooltip --- src/gui/configs.lua | 1 + src/gui/options.lua | 7 +++++++ src/modules/tooltip/style.lua | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/configs.lua b/src/gui/configs.lua index 215be44d..67e57341 100644 --- a/src/gui/configs.lua +++ b/src/gui/configs.lua @@ -410,6 +410,7 @@ C.CharacterSettings = { }, Tooltip = { Enable = true, + Scale = 1, BackdropAlpha = 0.65, FollowCursor = false, Icon = true, diff --git a/src/gui/options.lua b/src/gui/options.lua index 239358a9..a32a71d3 100644 --- a/src/gui/options.lua +++ b/src/gui/options.lua @@ -1734,7 +1734,14 @@ GUI.OptionsList = { 'Tooltip', 'HideInCombat', L['Hide in Combat'], + }, + { + 3, + 'Tooltip', + 'Scale', + L['Scale'], true, + { 0.5, 2, 0.1 }, }, {}, { 1, 'Tooltip', 'ShowId', L['Show IDs'] }, diff --git a/src/modules/tooltip/style.lua b/src/modules/tooltip/style.lua index 23c5f313..24fd02c4 100644 --- a/src/modules/tooltip/style.lua +++ b/src/modules/tooltip/style.lua @@ -13,7 +13,7 @@ function TOOLTIP:ReskinTooltip() return end - self:SetScale(_G.UIParent:GetScale()) + self:SetScale(C.DB.Tooltip.Scale) if not self.tipStyled then self:HideBackdrop()