Skip to content

Commit

Permalink
Made the properties part picker wider.
Browse files Browse the repository at this point in the history
  • Loading branch information
leozide committed Jun 2, 2024
1 parent 019ba4f commit de738bd
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions qt/lc_qutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit de738bd

Please sign in to comment.