Width for children of Table layouts not working #524

  • Defect
  • Patch
  • TorakTheUnprepared created this issue Sep 29, 2019

    If you have a child object in a group that uses layout type Table (yes, I know, not officially documented) that has SetFullWidth(true) on it, will not properly set the child to full width.  Not only that, it will not resize the field when the containing window resizes.


    I have patched this locally, however it would be nice to have this fixed upstream.  Patch below:



    Index: AceGUI-3.0/AceGUI-3.0.lua
    --- AceGUI-3.0/AceGUI-3.0.lua   (revision 1228)
    +++ AceGUI-3.0/AceGUI-3.0.lua   (working copy)
    @@ -961,7 +961,12 @@
                                            local alignFn, align = GetCellAlign("H", tableObj, colObj, cellObj, cellH, childH)
                                            f:SetPoint("LEFT", content, offsetH + align, 0)
                                            if child:IsFullWidth() or alignFn == "fill" or childH > cellH then
    -                                               f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
    +                                               child:SetWidth(cellH)
    +                                               if col == #cols then
    +                                                       f:SetPoint("RIGHT", content)
    +                                               else
    +                                                       f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
    +                                               end

                                            if child.DoLayout then
  • TorakTheUnprepared added the tags Defect Patch Sep 29, 2019
  • TorakTheUnprepared edited description Sep 29, 2019
  • nevcairiel posted a comment Oct 12, 2019

    Can you  provide a small example that doesn't work now, but works after the patch, just to ensure I understand it properly?

    I see there already was handling of full width children, but apparently that wasn't a case tested properly?

    Edited Oct 12, 2019

To post a comment, please login or register a new account.