PageRenderTime 48ms CodeModel.GetById 41ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/skins/macosx.lua

http://github.com/Asphyxia/Tukui
Lua | 58 lines | 42 code | 10 blank | 6 comment | 1 complexity | ab5c4526dcae4e90264078c442bf2024 MD5 | raw file
 1local T, C, L = unpack(select(2, ...))
 2
 3local function LoadSkin()
 4	-- mac menu/option panel, made by affli.
 5	if IsMacClient() then
 6		-- Skin main frame and reposition the header
 7		MacOptionsFrame:SetTemplate("Transparent", true)
 8		MacOptionsFrameHeader:SetTexture("")
 9		MacOptionsFrameHeader:ClearAllPoints()
10		MacOptionsFrameHeader:SetPoint("TOP", MacOptionsFrame, 0, 0)
11
12		--Skin internal frames
13		MacOptionsFrameMovieRecording:SetTemplate("Transparent", true)
14		MacOptionsITunesRemote:SetTemplate("Transparent", true)
15
16		--Skin buttons
17		T.SkinButton(_G["MacOptionsFrameCancel"])
18		T.SkinButton(_G["MacOptionsFrameOkay"])
19		T.SkinButton(_G["MacOptionsButtonKeybindings"])
20		T.SkinButton(_G["MacOptionsFrameDefaults"])
21		T.SkinButton(_G["MacOptionsButtonCompress"])
22
23		--Reposition and resize buttons
24		local tPoint, tRTo, tRP, tX, tY =  _G["MacOptionsButtonCompress"]:GetPoint()
25		_G["MacOptionsButtonCompress"]:SetWidth(136)
26		_G["MacOptionsButtonCompress"]:ClearAllPoints()
27		_G["MacOptionsButtonCompress"]:SetPoint(tPoint, tRTo, tRP, T.Scale(4), tY)
28
29		_G["MacOptionsFrameCancel"]:SetWidth(96)
30		_G["MacOptionsFrameCancel"]:SetHeight(22)
31		tPoint, tRTo, tRP, tX, tY =  _G["MacOptionsFrameCancel"]:GetPoint()
32		_G["MacOptionsFrameCancel"]:ClearAllPoints()
33		_G["MacOptionsFrameCancel"]:SetPoint(tPoint, tRTo, tRP, T.Scale(-14), tY)
34
35		_G["MacOptionsFrameOkay"]:ClearAllPoints()
36		_G["MacOptionsFrameOkay"]:SetWidth(96)
37		_G["MacOptionsFrameOkay"]:SetHeight(22)
38		_G["MacOptionsFrameOkay"]:SetPoint("LEFT",_G["MacOptionsFrameCancel"],T.Scale(-99),0)
39
40		_G["MacOptionsButtonKeybindings"]:ClearAllPoints()
41		_G["MacOptionsButtonKeybindings"]:SetWidth(96)
42		_G["MacOptionsButtonKeybindings"]:SetHeight(22)
43		_G["MacOptionsButtonKeybindings"]:SetPoint("LEFT",_G["MacOptionsFrameOkay"],T.Scale(-99),0)
44
45		_G["MacOptionsFrameDefaults"]:SetWidth(96)
46		_G["MacOptionsFrameDefaults"]:SetHeight(22)
47
48		-- why these buttons is using game menu template? oO
49		_G["MacOptionsButtonCompressLeft"]:SetAlpha(0)
50		_G["MacOptionsButtonCompressMiddle"]:SetAlpha(0)
51		_G["MacOptionsButtonCompressRight"]:SetAlpha(0)
52		_G["MacOptionsButtonKeybindingsLeft"]:SetAlpha(0)
53		_G["MacOptionsButtonKeybindingsMiddle"]:SetAlpha(0)
54		_G["MacOptionsButtonKeybindingsRight"]:SetAlpha(0)
55	end
56end
57
58tinsert(T.SkinFuncs["Tukui"], LoadSkin)