Mercurial > wow > buffalo2
diff ObjectiveStyle.lua @ 21:d5ee940de273
use hardcoded aesthetic manipulations over loadstring cramming
author | Nenue |
---|---|
date | Fri, 08 Apr 2016 06:12:05 -0400 |
parents | 605e8f0e46db |
children |
line wrap: on
line diff
--- a/ObjectiveStyle.lua Wed Apr 06 07:54:19 2016 -0400 +++ b/ObjectiveStyle.lua Fri Apr 08 06:12:05 2016 -0400 @@ -53,11 +53,6 @@ Frame = { } }, - Wrapper = { - title = { - Font = {wrapperHeadFont, wrapperHeadSize, wrapperHeadOutline}, - Spacing = 4,} - }, Tracker = { Normal = { title = { @@ -74,7 +69,7 @@ Normal = { titlebg = { Indent = 2, - Gradient = { 'HORIZONTAL', MinColor = {0.7, 0, 0.9, 0}, MaxColor = {.7, 0, 0.9, .25}}, + Gradient = { 'HORIZONTAL', MinColor = {0.7, 0, 0.9, 1}, MaxColor = {.7, 0, 0.9, .1}}, }, title = { TextColor = {1,1,1,1}, @@ -87,15 +82,15 @@ Spacing = textSpacing, }, statusbg = { - Gradient = { 'HORIZONTAL', MinColor = {0.2, .4, 1, 0}, MaxColor = {.7, 0, 0.9, .11}}, + Gradient = { 'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, .1}}, } }, Daily = { titlebg = { - Gradient = {'HORIZONTAL', MinColor = {0, .4, 1, 0}, MaxColor = {0, 0.4, 1, .35}, }, + Gradient = {'HORIZONTAL', MinColor = {0, .4, 1, 1}, MaxColor = {0, 0.4, 1, .1}, }, }, statusbg = { - Gradient = {'HORIZONTAL', MinColor = {0, .4, 1, 0}, MaxColor = {0, 0.35, .90, .31}, }, + Gradient = {'HORIZONTAL', MinColor = {0, .4, 1, 1}, MaxColor = {0, 0.35, .90, .1}, }, }, title = { TextColor = {0.7,1,1,1}, @@ -115,7 +110,7 @@ Spacing = titleSpacing, BackgroundFullWidth = true }, titlebg = { - Gradient = { 'HORIZONTAL', MinColor = {0, .7, .6, 0}, MaxColor = {0, .7, .6, 0.23}}, + Gradient = { 'HORIZONTAL', MinColor = {0, .7, .6, 1}, MaxColor = {0, .7, .6, 1}}, }, status = { TextColor = {1,1,1,1}, @@ -123,7 +118,7 @@ Spacing = textSpacing, }, statusbg = { - Gradient = { 'HORIZONTAL', MinColor = {0, .7, .6, 0}, MaxColor = {0, .7, .6, 0.23} }, + Gradient = { 'HORIZONTAL', MinColor = {0, .7, .6, 1}, MaxColor = {0, .7, .6, 1} }, }, }, MouseDown = { @@ -132,14 +127,14 @@ Spacing = titleSpacing, }, titlebg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {0.2, .4, 1, .4}, }, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {0.2, .4, 1, 1}, }, }, status = { Font = {textFont, textSize, textOutline}, Spacing = textSpacing, }, statusbg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {0.2, .4, 1, .2}, }, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {0.2, .4, 1, 1}, }, } }, Complete = { @@ -148,21 +143,21 @@ Font = {titleFont, titleSize, titleOutline}, Spacing = titleSpacing, }, titlebg = { - Gradient = {'HORIZONTAL', MinColor = {0, 1, 0, 0}, MaxColor = {0, 1, 0, 0.34}, }, + Gradient = {'HORIZONTAL', MinColor = {0, 1, 0, 1}, MaxColor = {0, 1, 0, 1}, }, }, status = { TextColor = {1,1,1,1}, Font = {textFont, textSize, textOutline}, Spacing = textSpacing, }, statusbg = { - Gradient = {'HORIZONTAL', MinColor = {0, 1, 0, 0}, MaxColor = {0, 1, 0, .25}, }, + Gradient = {'HORIZONTAL', MinColor = {0, 1, 0, 1}, MaxColor = {0, 1, 0, 1}, }, } }, AutoQuest = { Normal = { titlebg = { Indent = 2, - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 0}, MaxColor = {.7, 0, 0.9, .14}}, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, 1}}, }, title = { TextColor = {1,1,1,1}, @@ -175,7 +170,7 @@ Spacing = textSpacing, }, statusbg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 0}, MaxColor = {.7, 0, 0.9, .11}}, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, 1}}, } }, }, @@ -187,7 +182,7 @@ Spacing = titleSpacing, }, titlebg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 0.45}, MaxColor = {.7, 0, 0.9, .19}}, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, 1}}, }, status = { @@ -195,7 +190,7 @@ Spacing = textSpacing, }, statusbg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 0.25}, MaxColor = {.7, 0, 0.9, .12}}, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, 1}}, }, }, Complete = { @@ -204,14 +199,14 @@ Spacing = titleSpacing, }, titlebg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 0.45}, MaxColor = {.7, 0, 0.9, .19}}, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, 1}}, }, status = { Font = {textFont, textSize, textOutline}, Spacing = textSpacing, }, statusbg = { - Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 0.25}, MaxColor = {.7, 0, 0.9, .12}}, + Gradient = {'HORIZONTAL', MinColor = {0.2, .4, 1, 1}, MaxColor = {.7, 0, 0.9, 1}}, }, }, } @@ -381,10 +376,12 @@ frame.width = defaultWidth frame.statusWidth = defaultWidth - normalSettings.status.Indent frame.titleWidth = defaultWidth - normalSettings.title.Indent + frame.attachmentHeight = frame.attachmentHeight or 0 if frame.title then frame.titleHeight = frame.title and frame.title:GetStringHeight() or 0 if frame.titleHeight > 0 then + print('add spacing to', frame.titleHeight) frame.titleHeight = frame.titleHeight + (frame.title.spacing or 0)*2 end @@ -397,28 +394,40 @@ frame.titlebg:SetWidth(frame.width) end print(' titleHeight', frame.titleHeight, 'indent', normalSettings.title.Indent, 'spacing', frame.title.spacing) + print(' -- text:', frame.title:GetSize()) + print(' -- bg:', frame.titlebg:GetSize()) + else frame.titleHeight = 0 end - if frame.status then + + if frame.status and (frame.status:GetText() or frame.attachmentHeight > 0) then frame.statusHeight = frame.status and frame.status:GetStringHeight() or 0 if frame.statusHeight > 0 then frame.statusHeight = frame.statusHeight + (frame.status.spacing or 0)*2 end frame.status.spacing = frame.status.spacing or frame.status:GetSpacing() + frame.status:SetWidth(frame.width) frame.status:SetPoint('LEFT', frame, 'LEFT', normalSettings.status.Indent, 0) frame.status:SetPoint('TOP', frame.titlebg, 'BOTTOM', 0, 0) - frame.status:SetHeight(frame.statusHeight) + --frame.status:SetHeight(frame.statusHeight) if frame.statusbg then - frame.statusbg:SetHeight(frame.statusHeight + (frame.attachmentHeight or 0)) + --frame.statusbg:SetHeight(frame.statusHeight + (frame.attachmentHeight or 0)) + --frame.statusbg:SetPoint('BOTTOM', frame, 'BOTTOM', 0, 0) frame.statusbg:SetWidth(frame.width) end print(' status tHeight', frame.statusHeight, 'indent', normalSettings.status.Indent, 'spacing', frame.status.spacing) else + if frame.status then + frame.status:Hide() + end + if frame.statusbg then + frame.statusbg:Hide() + end frame.statusHeight = 0 end