diff --git a/tabs/search/filter.lua b/tabs/search/filter.lua index f4e11b9..64e5278 100644 --- a/tabs/search/filter.lua +++ b/tabs/search/filter.lua @@ -220,7 +220,6 @@ function private.export_query_string() if components then m.search_box:SetText(aux.filter.query_string({blizzard=components.blizzard, post=m.post_filter})) m.filter_input:ClearFocus() - m.update_filter_display() else aux.log(error) end @@ -349,13 +348,11 @@ do m.filter_display.measure:SetFont(font, font_size) local lines = 0 local width = 0 - for line in string.gfind(text, '
(.-)
') do lines = lines + 1 m.filter_display.measure:SetText(line) width = max(width, m.filter_display.measure:GetStringWidth()) end - return width, lines * (font_size + .5) end end diff --git a/tabs/search/frames.lua b/tabs/search/frames.lua index 9304574..0b6b65a 100644 --- a/tabs/search/frames.lua +++ b/tabs/search/frames.lua @@ -255,6 +255,7 @@ function private.create_frames() editbox:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0) editbox:SetHeight(25) editbox:SetScript('OnChar', function() + m.import_query_string() this:complete() end) editbox:SetScript('OnTabPressed', function() @@ -391,6 +392,7 @@ function private.create_frames() m.min_level_input:SetFocus() end end) + editbox:SetScript('OnTextChanged', m.update_form) editbox:SetScript('OnEnterPressed', aux._(editbox.ClearFocus, editbox)) local label = aux.gui.label(editbox, aux.gui.config.small_font_size) label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1) @@ -400,9 +402,7 @@ function private.create_frames() do local checkbox = aux.gui.checkbox(m.frame.filter) checkbox:SetPoint('TOPLEFT', m.name_input, 'TOPRIGHT', 16, 0) - checkbox:SetScript('OnClick', function() - m.update_form() - end) + checkbox:SetScript('OnClick', m.update_form) local label = aux.gui.label(checkbox, aux.gui.config.small_font_size) label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1) label:SetText('Exact') @@ -459,6 +459,7 @@ function private.create_frames() if tostring(valid_min_level) ~= m.min_level_input:GetText() then m.min_level_input:SetText(valid_min_level or '') end + m.update_form() end) local label = aux.gui.label(editbox, aux.gui.config.medium_font_size) label:SetPoint('RIGHT', editbox, 'LEFT', -3, 0) @@ -468,9 +469,7 @@ function private.create_frames() do local checkbox = aux.gui.checkbox(m.frame.filter) checkbox:SetPoint('TOPLEFT', m.max_level_input, 'TOPRIGHT', 16, 0) - checkbox:SetScript('OnClick', function() - m.update_form() - end) + checkbox:SetScript('OnClick', m.update_form) local label = aux.gui.label(checkbox, aux.gui.config.small_font_size) label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1) label:SetText('Usable') @@ -579,7 +578,7 @@ function private.create_frames() scroll_frame:EnableMouseWheel(true) scroll_frame:SetScript('OnMouseWheel', function() local child = this:GetScrollChild() - child:SetFont('p', [[Fonts\ARIALN.TTF]], aux.util.bound(10, 26, aux.util.select(2, child:GetFont()) + arg1*2)) + child:SetFont('p', [[Fonts\ARIALN.TTF]], aux.util.bound(11, 23, aux.util.select(2, child:GetFont()) + arg1*2)) m.update_filter_display() end) scroll_frame:RegisterForDrag('LeftButton') @@ -604,7 +603,7 @@ function private.create_frames() 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) + scroll_child:SetFont('p', [[Fonts\ARIALN.TTF]], 23) scroll_child:SetWidth(1) scroll_child:SetHeight(1) scroll_child:SetScript('OnHyperlinkClick', m.data_link_click) diff --git a/util/filter.lua b/util/filter.lua index 453eadb..6ed4f64 100644 --- a/util/filter.lua +++ b/util/filter.lua @@ -335,7 +335,7 @@ function private.parse_parameter(input_type, str) end function public.parse_query_string(str) - local components = { blizzard = {}, post = {} } + local components = {blizzard = {}, post = {}} local blizzard_filter_parser = m.blizzard_filter_parser() local parts = aux.util.map(aux.util.split(str, '/'), function(part) return strlower(aux.util.trim(part)) end)