Skip to content
  • Jonathon Hall's avatar
    Eliminate special cases for rows==1 · 113915d0
    Jonathon Hall authored
    
    
    Remove special cases for rows==1 which assumed the "yes/no" layout
    specifically.  This is cleanup for removing the "dynamic columns"
    layout style, which is unused and complicates the menu internals.
    
    Use 2 columns with dynamic rows for yes/no instead, which is exactly
    the same since it always has two buttons.
    
    Provide cairo_menu_item_rows() to get the actual number of rows in a
    menu based on the current items.
    
    Use cairo_menu_item_rows() to compute the frame and menu height
    instead of assuming either 1 row or 'nitems' rows.
    
    Size button widths based on the actual number of columns when the
    columns are fixed.  This would change behavior for dynamic-column
    layouts or layouts with >2 columns, but such a layout is not possible.
    This pivots to a test for fixed vs. dynamic columns which faciliates
    removing the dynamic columns layout.
    
    Signed-off-by: default avatarJonathon Hall <jonathon.hall@puri.sm>
    113915d0