Mercurial > wow > ouroloot
comparison gui.lua @ 46:0b1e703a6954
Make sure tab row fills width.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Sat, 21 Jan 2012 01:39:44 +0000 |
| parents | a561a967b5e6 |
| children | 1070a14cfee4 |
comparison
equal
deleted
inserted
replaced
| 45:1001dd95dbeb | 46:0b1e703a6954 |
|---|---|
| 358 function addon:gui_init (loot_pointer) | 358 function addon:gui_init (loot_pointer) |
| 359 g_loot = loot_pointer | 359 g_loot = loot_pointer |
| 360 g_generated = nil | 360 g_generated = nil |
| 361 tabgroup_tabs = {} | 361 tabgroup_tabs = {} |
| 362 window_title = "Ouro Loot " .. self.revision | 362 window_title = "Ouro Loot " .. self.revision |
| 363 -- TabGroup stretches out the tabs to fill the row but only if >75% of the | |
| 364 -- row is already full. It turns out that not doing this looks like ass. | |
| 365 -- If we won't have enough tabs to trigger this on its own, pad out the tab | |
| 366 -- titles (not looking quite as nice, ah well) to force it to trigger. | |
| 367 local fmtstr = #_taborder > 6 and "%s" or " %s " | |
| 363 for _,v in ipairs(_taborder) do | 368 for _,v in ipairs(_taborder) do |
| 364 tinsert (tabgroup_tabs, {value=v, text=_tabtexts[v].title}) | 369 tinsert (tabgroup_tabs, {value=v, text=fmtstr:format(_tabtexts[v].title)}) |
| 365 -- By default, tabs are editboxes with generated text | 370 -- By default, tabs are editboxes with generated text |
| 366 if not tabs_OnGroupSelected[v] then | 371 if not tabs_OnGroupSelected[v] then |
| 367 tabs_OnGroupSelected[v] = tabs_generated_text_OGS | 372 tabs_OnGroupSelected[v] = tabs_generated_text_OGS |
| 368 end | 373 end |
| 369 end | 374 end |
