This commit is contained in:
Manuel Simon Hirsig
2016-08-08 21:19:26 +02:00
parent b3e2662d7f
commit e8144efbc5
4 changed files with 25 additions and 15 deletions
+11 -2
View File
@@ -910,8 +910,17 @@ function private.remove_post_filter()
m.update_filter_display()
end
function private.update_filter_display()
m.filter_display:SetText(aux.filter.indented_post_query_string(m.post_components))
do
function private.update_filter_display()
local text = aux.filter.indented_post_query_string(m.post_components)
local widest_line = 0
for line in string.gfind(text, '<p>(.-)</p>') do
m.filter_display.measure:SetText(line)
widest_line = max(widest_line, m.filter_display.measure:GetStringWidth())
end
m.filter_display:SetWidth(widest_line)
m.filter_display:SetText(text)
end
end
function private.new_recent_search(filter_string, prettified)
+9 -8
View File
@@ -535,6 +535,7 @@ do
scroll_frame:SetScript('OnMouseWheel', function()
local child = this:GetScrollChild()
child:SetScale(max(.3, min(1, child:GetScale() + arg1/10)))
m.update_filter_display()
end)
scroll_frame:RegisterForDrag('LeftButton')
scroll_frame:SetScript('OnDragStart', function()
@@ -555,16 +556,16 @@ do
this:SetScript('OnUpdate', nil)
end)
aux.gui.set_content_style(scroll_frame)
local scroll_child = CreateFrame('Frame', nil, scroll_frame)
local scroll_child = CreateFrame('SimpleHTML', nil, scroll_frame)
scroll_frame:SetScrollChild(scroll_child)
scroll_child:SetFont('p', [[Fonts\ARIALN.TTF]], 26)
scroll_child:SetWidth(1)
scroll_child:SetHeight(1)
scroll_frame:SetScrollChild(scroll_child)
local display = aux.gui.label(scroll_child, 24)
display:SetPoint('TOPLEFT', 0, 0)
display:SetJustifyH('LEFT')
display:SetJustifyV('TOP')
display.scale_frame = scale_frame
private.filter_display = display
scroll_child:SetScript('OnHyperlinkClick', function()
end)
scroll_child.measure = scroll_child:CreateFontString()
scroll_child.measure:SetFont([[Fonts\ARIALN.TTF]], 26)
private.filter_display = scroll_child
end
private.status_bars = {}