This adds a new can_shrink key to widgets that allows the 'no label' codepath of styled_widget::request_reduce_width to be called.
In this case, it allows labels to shrink without forcing window scrollbars.
This gives the pane some extra height by default so that an initially shown unit will few attacks doesn't
cause a scrollbar to be shown for others with more.
All the useful filter options have been migrated to in-dialog widgets, so the Options dialog isn't needed anymore.
Do note that the default filter order and ascending/descending options weren't migrated, but they could still be
if it was deemed necessary.
Widgets usually leave it up to the dialogs to provide a border. Since this entire widget is wrapped in
a listbox, there's no need to adjust any internal borders.
This reverts commit 1e8d8ff7d7.
@CelticMinstrel and @Vultraz pointed out that the change causes menus
and dropdowns (which are implemented as dropdowns) to initially have
an item selected, which isn't desired.
Has_minimum="false" caused the following bug:
1. In a dropdown with toggle buttons, select any entry.
2. Close the dropdown and open it again.
3. Deselecting the entry selected in 1 is now impossible.
This commit fixes the bug above and addresses a FIXME.
This way it's no longer necessary for the containing window to define the
groups, eliminating possibility for an easy mistake if a developer wants to
create a new window that contains an add-on list.
The purpose of this change is ability to create more dialogs which present
a list of add-ons, such as a GUI2 version of the "Install Dependencies"
dialog.
This change is still highly incomplete. First of all, I disabled inline
install buttons and ability to sort the add-on list. In addition, a lot of
functionality that belongs in the add-on list widget is still in the GUI2
add-on manager instead. It is also notable that the widget relies on
several linked groups being defined in the window.
I plan to finish the transition to the add-on list widget, and address the
problems in the previous paragraph, in the future. The linked group issue
is going to require a lot of work in particular: I plan to either make
linked groups grid-specific instead of window-specific (like they are now)
or allow widgets to inject linked groups to the containing window. Either
way, I'm going to change the operation of GUI2 fairly deeply.