Made the properties part picker wider.

This commit is contained in:
Leonardo Zide 2024-06-01 17:20:44 -07:00
parent 019ba4f443
commit de738bd259

View file

@ -174,7 +174,12 @@ lcPieceIdPickerPopup::lcPieceIdPickerPopup(lcModel* Model, PieceInfo* Current, Q
: QWidget(Parent)
{
QVBoxLayout* Layout = new QVBoxLayout(this);
Layout->setContentsMargins(0, 0, 0, 0);
mFilterEdit = new QLineEdit(this);
mFilterEdit->setPlaceholderText(tr("Filter"));
Layout->addWidget(mFilterEdit);
connect(mFilterEdit, &QLineEdit::textEdited, this, &lcPieceIdPickerPopup::FilterEdited);
mListView = new QListView(this);
mListView->setEditTriggers(QAbstractItemView::NoEditTriggers);
@ -188,18 +193,15 @@ lcPieceIdPickerPopup::lcPieceIdPickerPopup(lcModel* Model, PieceInfo* Current, Q
lcPieceIdStringModel* StringModel = new lcPieceIdStringModel(Model, mListView);
mListView->setModel(StringModel);
mListView->setMinimumWidth(450);
mListView->setTextElideMode(Qt::ElideMiddle);
if (Current)
mListView->setCurrentIndex(StringModel->Index(Current));
Layout->addWidget(mListView);
connect(mListView, &QListView::doubleClicked, this, &lcPieceIdPickerPopup::ListViewDoubleClicked);
mFilterEdit = new QLineEdit(this);
mFilterEdit->setPlaceholderText(tr("Filter"));
Layout->addWidget(mFilterEdit);
connect(mFilterEdit, &QLineEdit::textEdited, this, &lcPieceIdPickerPopup::FilterEdited);
}
bool lcPieceIdPickerPopup::eventFilter(QObject* Object, QEvent* Event)