Set minimum parts list width. Fixes #346.

This commit is contained in:
Leonardo Zide 2019-05-11 12:05:26 -07:00
parent 8ca4831003
commit 2e5494c0df

View file

@ -570,6 +570,10 @@ void lcPartSelectionListView::UpdateViewMode()
void lcPartSelectionListView::SetIconSize(int Size)
{
setIconSize(QSize(Size, Size));
int Width = Size + 2 * frameWidth() + 6;
if (verticalScrollBar())
Width += verticalScrollBar()->sizeHint().width();
setMinimumWidth(Width);
lcSetProfileInt(LC_PROFILE_PARTS_LIST_ICONS, Size);
mListModel->SetIconSize(Size);
UpdateViewMode();