ObjectList: Smart update of the min height in respect to the items count.

Min 7 items and max 15 items
This commit is contained in:
YuSanka 2020-12-29 19:10:14 +01:00
parent 40fb39f5e1
commit 0331bcefd9
2 changed files with 29 additions and 10 deletions

View file

@ -197,6 +197,8 @@ private:
SettingsBundle m_freq_settings_sla;
#endif
size_t m_items_count { size_t(-1) };
inline void ensure_current_item_visible()
{
if (const auto &item = this->GetCurrentItem())
@ -208,6 +210,7 @@ public:
~ObjectList();
void set_min_height();
void update_min_height();
std::map<std::string, wxBitmap> CATEGORY_ICON;