Skip to content

Commit

Permalink
style: lookup dialog as popup, avoid jitter when showing
Browse files Browse the repository at this point in the history
  • Loading branch information
scztt committed Mar 18, 2015
1 parent 8e69962 commit ebad2f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions editors/sc-ide/widgets/lookup_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ namespace ScIDE {
GenericLookupDialog::GenericLookupDialog( QWidget * parent ):
QDialog(parent)
{
setWindowFlags(Qt::Popup);
hide();

addAction(MainWindow::instance()->action(MainWindow::LookupDocumentationForCursor));

mQueryEdit = new QLineEdit(this);
Expand All @@ -49,8 +52,8 @@ GenericLookupDialog::GenericLookupDialog( QWidget * parent ):
mResult->header()->setStretchLastSection(false);

QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0,0,0,0);
layout->setSpacing(1);
layout->setContentsMargins(8, 8, 8, 8);
layout->setSpacing(4);
layout->addWidget(mQueryEdit);
layout->addWidget(mResult);
setLayout(layout);
Expand All @@ -73,6 +76,7 @@ GenericLookupDialog::GenericLookupDialog( QWidget * parent ):
setGeometry(bounds);

mQueryEdit->setFocus( Qt::OtherFocusReason );
show();
}

bool GenericLookupDialog::openDocumentation()
Expand Down

0 comments on commit ebad2f6

Please sign in to comment.