bugfix, filter display improvement

This commit is contained in:
Manuel Simon Hirsig
2016-08-09 04:50:03 +02:00
parent c19d73ba26
commit d1d55603f0
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -928,7 +928,7 @@ do
width = max(width, m.filter_display.measure:GetStringWidth())
end
return width, lines*font_size
return width, lines * (font_size + .5)
end
end
@@ -936,10 +936,10 @@ function private.set_filter_display_offset(x_offset, y_offset)
local scroll_frame = m.filter_display:GetParent()
x_offset, y_offset = x_offset or scroll_frame:GetHorizontalScroll(), y_offset or scroll_frame:GetVerticalScroll()
local width, height = m.filter_display_size()
local x_lower_bound = min(0, scroll_frame:GetWidth() - width - 2)
local x_lower_bound = min(0, scroll_frame:GetWidth() - width - 10)
local x_upper_bound = 0
local y_lower_bound = 0
local y_upper_bound = max(0, height - scroll_frame:GetHeight() + 2)
local y_upper_bound = max(0, height - scroll_frame:GetHeight())
scroll_frame:SetHorizontalScroll(aux.util.bound(x_lower_bound, x_upper_bound, x_offset))
scroll_frame:SetVerticalScroll(aux.util.bound(y_lower_bound, y_upper_bound, y_offset))
end
+2 -1
View File
@@ -557,7 +557,7 @@ function private.create_frames()
scroll_frame:SetScript('OnDragStop', function()
this:SetScript('OnUpdate', nil)
end)
aux.gui.set_content_style(scroll_frame)
aux.gui.set_content_style(scroll_frame, -2, -2, -2, -2)
local scroll_child = CreateFrame('SimpleHTML', nil, scroll_frame)
scroll_frame:SetScrollChild(scroll_child)
scroll_child:SetFont('p', [[Fonts\ARIALN.TTF]], 26)
@@ -565,6 +565,7 @@ function private.create_frames()
scroll_child:SetHeight(1)
scroll_child:SetScript('OnHyperlinkClick', function()
end)
-- scroll_child:SetHyperlinkFormat("format")
scroll_child.measure = scroll_child:CreateFontString()
private.filter_display = scroll_child
end