Quantcast

daily updates

Munglunch [04-13-15 - 15:47]
daily updates
Filename
SVUI_!Core/system/api.lua
SVUI_Skins/components/addons/Details.lua
SVUI_Skins/components/docklet.lua
diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua
index e018c35..296c084 100644
--- a/SVUI_!Core/system/api.lua
+++ b/SVUI_!Core/system/api.lua
@@ -146,7 +146,8 @@ local function ScreenUpdate()

         gxScale = BASE_MOD;
     else
-        if(SV.db.screen.autoScale or (GetCVar("useUiScale") ~= 1)) then
+        -- local default_autoscale = (GetCVar("useUiScale") == 0) or false;
+        if(SV.db.screen.autoScale) then
             gxScale = max(0.64, min(1.15, gxMod));
         else
             gxScale = max(0.64, min(1.15, GetCVar("uiScale") or UIParent:GetScale() or gxMod));
diff --git a/SVUI_Skins/components/addons/Details.lua b/SVUI_Skins/components/addons/Details.lua
index 74821a1..5e98ce5 100644
--- a/SVUI_Skins/components/addons/Details.lua
+++ b/SVUI_Skins/components/addons/Details.lua
@@ -14,8 +14,8 @@ local SV = _G['SVUI'];
 local L = SV.L;
 local MOD = SV.Skins;
 local Schema = MOD.Schema;
---[[
-##########################################################
+--[[
+##########################################################
 STYLE
 ##########################################################
 ]]--
@@ -23,93 +23,15 @@ local function StyleDetails()
 	assert(_detalhes, "AddOn Not Loaded")

 	local _detalhes = _G._detalhes
-	local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
-
-	local reset_tooltip = function()
-		_detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {1, 1, 1, 1})
-		_detalhes:DelayOptionsRefresh()
-	end
-
-	_detalhes:InstallSkin ("Comics Style", {
-		file = [[Interface\AddOns\Details\images\skins\elvui.tga]],
-		author = "SVUI",
-		version = "1.0",
-		site = "unknown",
-		desc = "Style to match SVUI!",
-
-		--general
-		can_change_alpha_head = true,
+	local Loc = LibStub ("AceLocale-3.0"):GetLocale("Details")

-		--icon anchors
-		icon_anchor_main = {-4, -5},
-		icon_anchor_plugins = {-7, -13},
-		icon_plugins_size = {19, 18},
-
-		--micro frames
-		micro_frames = {color = {0.525490, 0.525490, 0.525490, 1}, font = "SVUI Caps Font", size = 11},
-
-		-- the four anchors (for when the toolbar is on the top side)
-		icon_point_anchor = {-35, -0.5},
-		left_corner_anchor = {-107, 0},
-		right_corner_anchor = {96, 0},
-
-		-- the four anchors (for when the toolbar is on the bottom side)
-		icon_point_anchor_bottom = {-37, 12},
-		left_corner_anchor_bottom = {-107, 0},
-		right_corner_anchor_bottom = {96, 0},
-		callback = function (self, instance) end,
-		control_script_on_start = nil,
-		control_script = nil,
-		instance_cprops = {
-			menu_icons_size = 0.90,
-			menu_anchor = {16, 2, side = 2},
-			menu_anchor_down = {16, -2},
-			plugins_grow_direction = 1,
-			menu_icons = {shadow = true},
-			attribute_text = {enabled = true, anchor = {-20, 5}, text_face = "SVUI Default Font", text_size = 12, text_color = {1, 1, 1, .7}, side = 1, shadow = true},
-			hide_icon = true,
-			desaturated_menu = false,
-			bg_alpha = 0.51,
-			bg_r = 0.3294,
-			bg_g = 0.3294,
-			bg_b = 0.3294,
-			show_statusbar = false,
-
-			row_info = {
-					texture = "Skyline",
-					texture_class_colors = true,
-					alpha = 0.80,
-					texture_background_class_color = false,
-					texture_background = "Details D'ictum",
-					fixed_texture_color = {0, 0, 0},
-					fixed_texture_background_color = {0, 0, 0, 0.471},
-					space = {left = 1, right = -2, between = 0},
-					backdrop = {enabled = true, size = 4, color = {0, 0, 0, 1}, texture = "Details BarBorder 2"},
-					icon_file = [[Interface\AddOns\Details\images\classes_small_alpha]],
-					start_after_icon = false,
-			},
-
-			wallpaper = {
-				overlay = {1, 1,	1},
-				width = 256,
-				texcoord = {49/1024, 305/1024, 774/1024, 646/1024},
-				enabled = true,
-				anchor = "all",
-				height = 128,
-				alpha = 0.8,
-				texture = [[Interface\AddOns\Details\images\skins\elvui]],
-			}
-		},
-
-		skin_options = {
-			{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2_DESC"]},
-			{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3_DESC"]},
-		}
-	})
-end
---[[
-##########################################################
+	local details_frame = _detalhes.baseframe;
+	details_frame:RemoveTextures();
+	details_frame:SetStyle("Frame", "Transparent");
+end
+--[[
+##########################################################
 MOD LOADING
 ##########################################################
 ]]--
-MOD:SaveAddonStyle("Details", StyleDetails)
\ No newline at end of file
+MOD:SaveAddonStyle("Details", StyleDetails)
diff --git a/SVUI_Skins/components/docklet.lua b/SVUI_Skins/components/docklet.lua
index 4eec1bc..6fd7e54 100644
--- a/SVUI_Skins/components/docklet.lua
+++ b/SVUI_Skins/components/docklet.lua
@@ -1,7 +1,7 @@
 --[[
 ##########################################################
 S V U I   By: Munglunch
-##########################################################
+##########################################################
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
@@ -26,8 +26,8 @@ local floor = math.floor;
 local twipe, tcopy = table.wipe, table.copy;
 local IsAddOnLoaded = _G.IsAddOnLoaded;
 local LoadAddOn = _G.LoadAddOn;
---[[
-##########################################################
+--[[
+##########################################################
 GET ADDON DATA
 ##########################################################
 ]]--
@@ -36,15 +36,15 @@ local L = SV.L;
 local MOD = SV.Skins;
 local Schema = MOD.Schema;
 local Librarian = _G.Librarian;
---[[
-##########################################################
+--[[
+##########################################################
 LOCALS
 ##########################################################
 ]]--
 local TIP_RIGHT_PATTERN = " and %s";
 local DOCK_EMBEDS = {};
---[[
-##########################################################
+--[[
+##########################################################
 HELPERS
 ##########################################################
 ]]--
@@ -53,19 +53,19 @@ local function RequestEmbedded(addon)
 	local embed2 = SV.private.Docks.Embed2 or "None";
 	local enabled1 = (embed1 ~= "None")
 	local enabled2 = ((embed2 ~= "None") and (embed2 ~= embed1))
-
+
 	if(addon) then
 		local valid = false;
 		if(embed1:find(addon) or embed2:find(addon)) then
-			valid = true
+			valid = true
 		end
 		return valid, enabled1, enabled2
 	end
-
+
 	return embed1, embed2, enabled1, enabled2
 end
---[[
-##########################################################
+--[[
+##########################################################
 SKADA
 ##########################################################
 ]]--
@@ -73,11 +73,11 @@ local Skada_PointLock = function(self, a1, p, a2, x, y)
 	if((x ~= 0) or (y ~= 0)) then
 		self:ClearAllPoints()
 		self:SetPoint("BOTTOM", p, "BOTTOM", 0, 0)
-	end
+	end
 end

 local Skada_PointTest = function(self, p1, p2, p3, p4, p5)
-	print(p1 .. ", " .. p2:GetName() .. ", " .. p3 .. ", " .. p4 .. ", " .. p5)
+	print(p1 .. ", " .. p2:GetName() .. ", " .. p3 .. ", " .. p4 .. ", " .. p5)
 end

 DOCK_EMBEDS["Skada"] = function(self)
@@ -98,8 +98,8 @@ DOCK_EMBEDS["Skada"] = function(self)

 					if(db) then
 						local curHeight = 0
-						if(db.enabletitle) then
-							curHeight = db.title.height
+						if(db.enabletitle) then
+							curHeight = db.title.height
 						end
 						db.barspacing = 1;
 						db.barwidth = width - 10;
@@ -117,7 +117,7 @@ DOCK_EMBEDS["Skada"] = function(self)
 					hooksecurefunc(window.bargroup, "SetPoint", Skada_PointLock)

 					local bgroup = window.bargroup.backdrop;
-					if(bgroup) then
+					if(bgroup) then
 						bgroup:Show()
 						if(not bgroup.Panel) then
 							bgroup:SetStyle("!_Frame", 'Transparent', true)
@@ -136,16 +136,16 @@ DOCK_EMBEDS["Skada"] = function(self)
 			end
 		end
 	end
-
+
 	return false
 end
---[[
-##########################################################
+--[[
+##########################################################
 RECOUNT
 ##########################################################
 ]]--
 DOCK_EMBEDS["Recount"] = function(self)
-	if((not IsAddOnLoaded("Recount")) or (not _G.Recount)) then return false end
+	if((not IsAddOnLoaded("Recount")) or (not _G.Recount)) then return false end

 	local width = self:GetWidth()
 	local height = SV.Dock.BottomRight.Window:GetHeight();
@@ -168,8 +168,8 @@ DOCK_EMBEDS["Recount"] = function(self)
 	self.Framelink = Recount.MainWindow
 	return true
 end
---[[
-##########################################################
+--[[
+##########################################################
 OMEN
 ##########################################################
 ]]--
@@ -201,7 +201,7 @@ DOCK_EMBEDS["Omen"] = function(self)
 	db.profile.Bar.Spacing = 1;
 	db.profile.Bar.Texture = "SVUI MultiColorBar";

-	--[[ Titlebar Settings ]]--
+	--[[ Titlebar Settings ]]--
 	db.profile.TitleBar.BorderColor.g = 0;
 	db.profile.TitleBar.BorderColor.r = 0;
 	db.profile.TitleBar.BorderTexture = "None";
@@ -232,13 +232,13 @@ DOCK_EMBEDS["Omen"] = function(self)
 	self.Framelink = OmenAnchor
 	return true
 end
---[[
-##########################################################
+--[[
+##########################################################
 ALDAMAGEMETER
 ##########################################################
 ]]--
 DOCK_EMBEDS["alDamageMeter"] = function(self)
-	if((not IsAddOnLoaded("alDamageMeter")) or (not _G.alDamagerMeterFrame)) then return false end
+	if((not IsAddOnLoaded("alDamageMeter")) or (not _G.alDamagerMeterFrame)) then return false end

 	local w,h = self:GetSize();
 	local count = dmconf.maxbars or 10;
@@ -256,8 +256,8 @@ DOCK_EMBEDS["alDamageMeter"] = function(self)
 	self.Framelink = alDamageMeterFrame
 	return true
 end
---[[
-##########################################################
+--[[
+##########################################################
 TINYDPS
 ##########################################################
 ]]--
@@ -275,8 +275,27 @@ DOCK_EMBEDS["TinyDPS"] = function(self)
 	self.Framelink = tdpsFrame
 	return true
 end
---[[
-##########################################################
+--[[
+##########################################################
+!DETAILS
+##########################################################
+]]--
+-- DOCK_EMBEDS["!Details"] = function(self)
+-- 	if((not IsAddOnLoaded("!Details")) or (not _G._detalhes)) then return false end
+--
+-- 	local width = self:GetWidth()
+-- 	local height = SV.Dock.BottomRight.Window:GetHeight();
+-- 	local _detalhes = _G._detalhes;
+-- 	local details_window = _detalhes.baseframe;
+-- 	details_window:ClearAllPoints()
+-- 	details_window:SetParent(self)
+-- 	details_window:SetSize(width, height)
+-- 	details_window:SetPoint("BOTTOM", self, "BOTTOM", 0, 0)
+-- 	self.Framelink = details_window
+-- 	return true
+-- end
+--[[
+##########################################################
 DOCK EMBED METHODS
 ##########################################################
 ]]--
@@ -329,8 +348,8 @@ local PARENT_UpdateEmbeds = function(self, ...)
 		end
 	end
 end
---[[
-##########################################################
+--[[
+##########################################################
 CORE FUNCTIONS
 ##########################################################
 ]]--
@@ -342,7 +361,7 @@ function MOD:SetEmbedHandlers()
 	MOD.Docklet.Dock1.Embedded   = "NONE";
 	MOD.Docklet.Dock1.EmbedAddon = DOCK_EmbedAddon;
 	MOD.Docklet.Dock1.EmbedCheck = DOCK_EmbedCheck;
-
+
 	MOD.Docklet.Dock2.EmbedKey   = "Embed2";
 	MOD.Docklet.Dock2.Embedded   = "NONE";
 	MOD.Docklet.Dock2.EmbedAddon = DOCK_EmbedAddon;
@@ -401,7 +420,7 @@ function MOD:RegisterAddonDocklets()

 		self.Docklet.Parent.Bar:UnsetDefault();
 		--Librarian:UnlockLibrary('LibWindow');
-	end
+	end
 end

 function MOD:GetDockables()
@@ -422,11 +441,11 @@ function MOD:GetDockables()
 				    tinsert(t,{text = name, func = function() SV.private.Docks.Embed1 = key; MOD:RegisterAddonDocklets() end});
 				end
 			else
-				if IsAddOnLoaded(addon) or IsAddOnLoaded(addon) then
+				if IsAddOnLoaded(addon) or IsAddOnLoaded(addon) then
 					tinsert(t,{text = addon, func = function() SV.private.Docks.Embed1 = addon; MOD:RegisterAddonDocklets() end});
 				end
 			end
 		end
 	end
 	return t;
-end
\ No newline at end of file
+end