diff --git a/classes/class_damage.lua b/classes/class_damage.lua index b62c4422..07a7f211 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -753,7 +753,7 @@ end GameCooltip:SetOption("AlignAsBlizzTooltip", false) GameCooltip:SetOption("AlignAsBlizzTooltipFrameHeightOffset", -6) GameCooltip:SetOption("YSpacingMod", -6) - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() for index, t in ipairs(Targets) do GameCooltip:AddLine(Details:GetOnlyName(t[1]), Details:ToK(t[2]) .. " (" .. format("%.1f", t[2]/total*100) .. "%)") @@ -1182,7 +1182,7 @@ end GameCooltip:SetOption("AlignAsBlizzTooltip", false) GameCooltip:SetOption("AlignAsBlizzTooltipFrameHeightOffset", -6) GameCooltip:SetOption("YSpacingMod", -6) - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() --Details:AddTooltipSpellHeaderText (Loc ["STRING_DAMAGE_FROM"], headerColor, #damage_taken_table, [[Interface\Addons\Details\images\icons]], 0.126953125, 0.1796875, 0, 0.0546875) --Details:AddTooltipHeaderStatusbar (1, 1, 1, 0.5) @@ -1617,7 +1617,7 @@ end GameCooltip:SetOption("AlignAsBlizzTooltip", false) GameCooltip:SetOption("AlignAsBlizzTooltipFrameHeightOffset", -6) GameCooltip:SetOption("YSpacingMod", -6) - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() --local lineHeight = Details.tooltip.line_height diff --git a/core/control.lua b/core/control.lua index 6048cc39..56789b10 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1674,11 +1674,17 @@ end end - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() GameCooltip:ShowCooltip() end end + function Details:AddRoundedCornerToTooltip() + if (Details.tooltip.rounded_corner) then + GameCooltip:ShowRoundedCorner() + end + end + function Details.gump:UpdateTooltip(whichRowLine, esta_barra, instancia) if (IsShiftKeyDown()) then return instancia:MontaTooltip(esta_barra, whichRowLine, "shift") diff --git a/frames/window_main.lua b/frames/window_main.lua index 7db66521..8e5e3426 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -2281,7 +2281,7 @@ local iconFrame_OnEnter = function(self) GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_skyline]]) GameCooltip:SetOption("FixedHeight", height+11) GameCooltip:SetOption("LineHeightSizeOffset", -8) - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() GameCooltip:ShowCooltip() self.unitname = name @@ -6066,7 +6066,7 @@ local build_mode_list = function(self, deltaTime) gameCooltip:AddMenu(1, function() instance:SetMode(4) end) gameCooltip:AddIcon([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*3, 32/256*4, 0, 1) - gameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() --build raid plugins list local raidPlugins = Details.RaidTables:GetAvailablePlugins() @@ -6376,7 +6376,7 @@ local buildSegmentTooltip = function(self, deltaTime) gameCooltip:SetOption("RightTextHeight", 12) gameCooltip:SetOption("SubFollowButton", true) - gameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() local menuIndex = 0 Details.segments_amount = floor(Details.segments_amount) @@ -9091,7 +9091,7 @@ end Details:SetMenuOwner(self, self.instance) - gameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() gameCooltip:ShowCooltip() end @@ -9248,7 +9248,7 @@ local reportButton_OnEnter = function(self, motion, forced) Details:SetTooltipMinWidth() - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() Details:CheckLastReportsIntegrity() @@ -9354,7 +9354,7 @@ local attributeButton_OnEnter = function(self, motion, forced, from_click) GameCooltip:SetOption("TextSize", Details.font_sizes.menus) Details:SetMenuOwner(self, instancia) - GameCooltip:ShowRoundedCorner() + Details:AddRoundedCornerToTooltip() GameCooltip:ShowCooltip() end diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index fbad7666..7dc2e1f7 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -4417,6 +4417,17 @@ do desc = "Divisor Color", }, + {--rounded corner + type = "toggle", + get = function() return Details.tooltip.rounded_corner end, + set = function(self, fixedparam, value) + Details.tooltip.rounded_corner = value + afterUpdate() + end, + name = "Show Rounded Border", + desc = "Show Rounded Border", + }, + {type = "blank"}, {--show amount diff --git a/functions/profiles.lua b/functions/profiles.lua index 3307111c..7bacf53c 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1116,6 +1116,8 @@ local default_profile = { header_statusbar = {0.3, 0.3, 0.3, 0.8, false, false, "WorldState Score"}, submenu_wallpaper = true, + rounded_corner = true, + anchored_to = 1, anchor_screen_pos = {507.700, -350.500}, anchor_point = "bottom",