Skip to content

Commit

Permalink
fix(ui): correctly position search completer label on HiDPI display (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hexchain authored and trollixx committed Sep 17, 2019
1 parent d05af09 commit 7fc27d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ui/widgets/searchedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ void SearchEdit::showCompletions(const QString &newValue)

const QString completed = currentCompletion(newValue).mid(newValue.size());
const QSize labelSize(fontMetrics().width(completed), size().height());
const int shiftX = static_cast<int>(window()->devicePixelRatioF() * (frameWidth + 2)) + textWidth;

m_completionLabel->setMinimumSize(labelSize);
m_completionLabel->move(frameWidth + 2 + textWidth, 0);
m_completionLabel->move(shiftX, 0);
m_completionLabel->setText(completed);
}

Expand Down

0 comments on commit 7fc27d3

Please sign in to comment.