# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1327109984 0 # Node ID 0b1e703a69541991a247856fd0ff8c03c91eeccf # Parent 1001dd95dbebac78ed05665d68ced0bf1c59d5e9 Make sure tab row fills width. diff -r 1001dd95dbeb -r 0b1e703a6954 gui.lua --- a/gui.lua Fri Jan 20 11:48:38 2012 +0000 +++ b/gui.lua Sat Jan 21 01:39:44 2012 +0000 @@ -360,8 +360,13 @@ g_generated = nil tabgroup_tabs = {} window_title = "Ouro Loot " .. self.revision + -- TabGroup stretches out the tabs to fill the row but only if >75% of the + -- row is already full. It turns out that not doing this looks like ass. + -- If we won't have enough tabs to trigger this on its own, pad out the tab + -- titles (not looking quite as nice, ah well) to force it to trigger. + local fmtstr = #_taborder > 6 and "%s" or " %s " for _,v in ipairs(_taborder) do - tinsert (tabgroup_tabs, {value=v, text=_tabtexts[v].title}) + tinsert (tabgroup_tabs, {value=v, text=fmtstr:format(_tabtexts[v].title)}) -- By default, tabs are editboxes with generated text if not tabs_OnGroupSelected[v] then tabs_OnGroupSelected[v] = tabs_generated_text_OGS