Change default clamp script a bit. Cleanup Appearance.lua a bit.
Scott Sibley [08-04-11 - 10:52]
Change default clamp script a bit. Cleanup Appearance.lua a bit.
diff --git a/Modules/Appearance/Appearance.lua b/Modules/Appearance/Appearance.lua
index f585773..be65db1 100644
--- a/Modules/Appearance/Appearance.lua
+++ b/Modules/Appearance/Appearance.lua
@@ -392,12 +392,6 @@ function mod:OnEnable()
self:SetBackdrop()
self:SetBackdropColor(true)
StarTip:SetOptionsDisabled(options, false)
- local cleft = self.db.profile.clampLeft
- local cright = self.db.profile.clampRight
- local ctop = self.db.profile.clampTop
- local cbottom = self.db.profile.clampBottom
- --StarTip.tooltipMain:SetClampRectInsets(cleft, cright, ctop, cbottom)
- --StarTip.tooltipMain:SetClampedToScreen(true)
end
function mod:OnDisable()
@@ -406,7 +400,6 @@ function mod:OnDisable()
self:SetBackdrop(true)
self:SetBackdropColor(true)
StarTip:SetOptionsDisabled(options, true)
- StarTip.tooltipMain:SetClampRectInsets(0, 0, 0, 0)
end
function mod:GetOptions()
diff --git a/Modules/Clamp/Clamp.lua b/Modules/Clamp/Clamp.lua
index 44583b3..e8bcceb 100644
--- a/Modules/Clamp/Clamp.lua
+++ b/Modules/Clamp/Clamp.lua
@@ -11,8 +11,9 @@ local Evaluator = LibStub("LibScriptableUtilsEvaluator-1.0")
local defaults = {
profile = {
script = [[
-local clampLeft, clampRight, clampTop, clampBottom = 0, 10, 10, 0
-return clampLeft, clampRight, clampTop, clampBottom
+local mod = StarTip:GetModule("Appearance")
+local db = mod.db.profile
+return db.clampLeft, db.clampRight, db.clampTop, db.clampBottom
]],
}
}
@@ -30,7 +31,7 @@ local options = {
name = L["Script"],
desc = L["This will be ran when the tooltip shows."],
type = "input",
- width = "half",
+ width = "full",
multiline = true,
get = get,
set = set,