Skip to content

Commit

Permalink
#792 added margins in detached mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 2, 2024
1 parent 7843006 commit d338957
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/options/opt_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ QWidget *OptionsTabTree::widget()
layout->addWidget(lb);

PsiOptionsEditor *poe = new PsiOptionsEditor(w);
poe->layout()->setContentsMargins(0, 0, 0, 0);
layout->addWidget(poe);
poe->show();

Expand Down
10 changes: 7 additions & 3 deletions src/psioptionseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ PsiOptionsEditor::PsiOptionsEditor(QWidget *parent) : QWidget(parent)
tpm_->setSourceModel(tm_);

QVBoxLayout *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);

QHBoxLayout *filterLayout = new QHBoxLayout;
le_filter = new QLineEdit(this);
filterLayout->setSpacing(5);
le_filter = new QLineEdit(this);
le_filter->setProperty("isOption", false);
le_filter->setToolTip(tr("Options filter"));
lb_filter = new QLabel(tr("Filter"), this);
Expand Down Expand Up @@ -352,7 +352,11 @@ void PsiOptionsEditor::resetit()
}
}

void PsiOptionsEditor::detach() { new PsiOptionsEditor(); }
void PsiOptionsEditor::detach()
{
auto dlg = new PsiOptionsEditor();
dlg->resize(pointToPixel(800), pointToPixel(600));
}

void PsiOptionsEditor::bringToFront() { ::bringToFront(this, true); }

Expand Down

0 comments on commit d338957

Please sign in to comment.