Commit 95a9c21c authored by nevcairiel's avatar nevcairiel
Browse files

AceGUI-3.0: Frame: Restore resizing by default, in case it was disabled

git-svn-id: https://repos.wowace.com/wow/ace3/trunk@1044 5debad98-a965-4143-8383-f471b3509dcf
parent 0d1dd50a
......@@ -15,7 +15,7 @@ REQUIRES: AceConsole-3.0 for command registration (loaded on demand)
-- TODO: plugin args
local MAJOR, MINOR = "AceConfigCmd-3.0", 13
local MAJOR, MINOR = "AceConfigCmd-3.0", 12
local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigCmd then return end
......@@ -642,14 +642,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
local r, g, b, a
local hasAlpha = tab.hasAlpha
if type(hasAlpha) == "function" or type(hasAlpha) == "string" then
info.hasAlpha = hasAlpha
hasAlpha = callmethod(info, inputpos, tab, 'hasAlpha')
info.hasAlpha = nil
end
if hasAlpha then
if tab.hasAlpha then
if str:len() == 8 and str:find("^%x*$") then
--parse a hex string
r,g,b,a = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255, tonumber(str:sub(7, 8), 16) / 255
......
......@@ -4,7 +4,7 @@
-- @release $Id$
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 55
local MAJOR, MINOR = "AceConfigDialog-3.0", 54
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigDialog then return end
......@@ -1315,7 +1315,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
elseif v.type == "color" then
control = gui:Create("ColorPicker")
control:SetLabel(name)
control:SetHasAlpha(GetOptionsMemberValue("hasAlpha",v, options, path, appName))
control:SetHasAlpha(v.hasAlpha)
control:SetColor(GetOptionsMemberValue("get",v, options, path, appName))
control:SetCallback("OnValueChanged",ActivateControl)
control:SetCallback("OnValueConfirmed",ActivateControl)
......
......@@ -9,7 +9,7 @@
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id$
local MAJOR, MINOR = "AceConfigRegistry-3.0", 14
local MAJOR, MINOR = "AceConfigRegistry-3.0", 13
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigRegistry then return end
......@@ -162,7 +162,7 @@ local typedkeys={
dropdownControl=optstring,
},
color={
hasAlpha=optmethodbool,
hasAlpha=optbool,
},
keybinding={
-- TODO
......
local Type, Version = "MultiLineEditBox", 26
local Type, Version = "MultiLineEditBox", 25
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -17,23 +17,6 @@ local _G = _G
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
if not AceGUIMultiLineEditBoxInsertLink then
-- upgradeable hook
hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIMultiLineEditBoxInsertLink(...) end)
end
function _G.AceGUIMultiLineEditBoxInsertLink(text)
for i = 1, AceGUI:GetWidgetCount(Type) do
local editbox = _G[("MultiLineEditBox%uEdit"):format(i)]
if editbox and editbox:IsVisible() and editbox:HasFocus() then
editbox:Insert(text)
return true
end
end
end
local function Layout(self)
self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
......@@ -318,7 +301,7 @@ local function Constructor()
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
local editBox = CreateFrame("EditBox", nil, scrollFrame)
editBox:SetAllPoints()
editBox:SetFontObject(ChatFontNormal)
editBox:SetMultiLine(true)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment