Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gui2/tmessage: Hide title and image widgets when unused
When the title or image widget labels are left empty, the widgets continue to take up space in the grid, which is particularly conspicuous with our current border,border_size=all,5 convention. Commit b9b199f exposes the underlying problem quite clearly in most dialogs because the image widget's cell takes up extra space to the left of the dialog while empty -- see the "you have not started your turn yet, do you really want to end your turn" prompt for an example. Hiding the relevant widgets when missing label values is trivial to do. In the gui2::tmessage case it required a minor internal refactoring to keep a find_widget<>() reference around for a second method call for each widget. This should be a good solution as any until cell borders gain the ability to become null when the contained widget is otherwise unused.
- Loading branch information