From b32a48dc635c999e008aafc0be3503924fca48f8 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Fri, 30 Jul 2021 17:56:11 -0300 Subject: [PATCH] Added Details.all_switch_config.font_size and Details.all_switch_config.scale These entries configure the panel shown when right click the title bar of the window. --- frames/window_switch.lua | 11 ++++++++++- functions/profiles.lua | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/frames/window_switch.lua b/frames/window_switch.lua index 68c5aeac..9c15adf2 100644 --- a/frames/window_switch.lua +++ b/frames/window_switch.lua @@ -305,7 +305,7 @@ do button.attribute = attribute button.sub_attribute = sub_attribute button:SetPoint ("topleft", x, y) - _detalhes:SetFontSize (button.text, 10) + _detalhes:SetFontSize(button.text, _detalhes.all_switch_config.font_size) _detalhes:SetFontColor (button.text, text_color) button:SetScript ("OnClick", on_click_all_switch_button) @@ -348,7 +348,10 @@ do --> localized sub attribute name local loc_sub_attribute_name = _detalhes.sub_atributos [attribute].lista [i] local button = create_all_switch_button (attribute, i, x, y) + button.text:SetText (loc_sub_attribute_name) + _detalhes:SetFontSize(button.text, _detalhes.all_switch_config.font_size) + all_switch.check_text_size (button.text) button.texture:SetTexture (_detalhes.sub_atributos [attribute].icones [i] [1]) button.texture:SetTexCoord (unpack (_detalhes.sub_atributos [attribute].icones [i] [2])) @@ -416,6 +419,8 @@ do local custom = _detalhes.custom [i] button.text:SetText (custom.name) + _detalhes:SetFontSize(button.text, _detalhes.all_switch_config.font_size) + all_switch.check_text_size (button.text) button.texture:SetTexture (custom.icon) button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) @@ -457,6 +462,8 @@ do button.pluginName = ptable[4] button.text:SetText(ptable[1]) + _detalhes:SetFontSize(button.text, _detalhes.all_switch_config.font_size) + all_switch.check_text_size(button.text) button.texture:SetTexture (ptable[2]) button.texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) @@ -485,6 +492,8 @@ do all_switch:SetBackdrop (_detalhes.menu_backdrop_config.menus_backdrop) all_switch:SetBackdropColor (unpack (_detalhes.menu_backdrop_config.menus_backdropcolor)) all_switch:SetBackdropBorderColor (unpack (_detalhes.menu_backdrop_config.menus_bordercolor)) + + all_switch:SetScale(_detalhes.all_switch_config.scale) end) --------------------------------------------------------------------------------------------------------------------------- diff --git a/functions/profiles.lua b/functions/profiles.lua index b8fbd7a6..68f51171 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1251,6 +1251,12 @@ local default_global_data = { ["14"] = false, }, current_exp_raid_encounters = {}, + + --> all switch settings (panel shown when right click the title bar) + all_switch_config = { + scale = 1, + font_size = 10, + }, --> profile by spec profile_by_spec = {},