forked from qt-creator/qt-creator
Locator: Fix missing popup frame on Win/Lin
Change-Id: Idaea2197d8666a251cef46fa9032494e91cc29a1 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -284,7 +284,8 @@ void TopLeftLocatorPopup::updateGeometry()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(parentWidget(), return);
|
QTC_ASSERT(parentWidget(), return);
|
||||||
const QSize size = preferredSize();
|
const QSize size = preferredSize();
|
||||||
const QRect rect(parentWidget()->mapToGlobal(QPoint(0, -size.height())), size);
|
const int border = m_tree->frameWidth();
|
||||||
|
const QRect rect(parentWidget()->mapToGlobal(QPoint(-border, -size.height() - border)), size);
|
||||||
setGeometry(rect);
|
setGeometry(rect);
|
||||||
LocatorPopup::updateGeometry();
|
LocatorPopup::updateGeometry();
|
||||||
}
|
}
|
||||||
@@ -369,7 +370,8 @@ LocatorPopup::LocatorPopup(LocatorWidget *locatorWidget, QWidget *parent)
|
|||||||
m_tree(new CompletionList(this)),
|
m_tree(new CompletionList(this)),
|
||||||
m_inputWidget(locatorWidget)
|
m_inputWidget(locatorWidget)
|
||||||
{
|
{
|
||||||
m_tree->setFrameStyle(QFrame::NoFrame);
|
if (Utils::HostOsInfo::isMacHost())
|
||||||
|
m_tree->setFrameStyle(QFrame::NoFrame); // tool tip already includes a frame
|
||||||
m_tree->setModel(locatorWidget->model());
|
m_tree->setModel(locatorWidget->model());
|
||||||
|
|
||||||
auto layout = new QVBoxLayout;
|
auto layout = new QVBoxLayout;
|
||||||
|
@@ -122,11 +122,11 @@ protected:
|
|||||||
virtual void inputLostFocus();
|
virtual void inputLostFocus();
|
||||||
|
|
||||||
QPointer<QWidget> m_window;
|
QPointer<QWidget> m_window;
|
||||||
|
CompletionList *m_tree;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateWindow();
|
void updateWindow();
|
||||||
|
|
||||||
CompletionList *m_tree;
|
|
||||||
LocatorWidget *m_inputWidget;
|
LocatorWidget *m_inputWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user