Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
1a772c1b
Commit
1a772c1b
authored
Apr 09, 2010
by
mae
Browse files
some minor popup tuning
parent
0c7312e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/texteditor/completionwidget.cpp
View file @
1a772c1b
...
...
@@ -43,6 +43,7 @@
#include <QtGui/QLabel>
#include <QtGui/QStylePainter>
#include <QtGui/QToolTip>
#include <QtCore/QTimer>
#include <limits.h>
...
...
@@ -300,30 +301,24 @@ void CompletionListView::maybeShowInfoTip()
QRect
r
=
rectForIndex
(
current
);
m_infoFrame
->
move
(
(
parentWidget
()
->
mapToGlobal
(
parentWidget
()
->
rect
().
topRight
()
+
QPoint
(
2
,
0
))).
x
(),
parentWidget
()
->
rect
().
topRight
()
+
QPoint
(
0
,
0
))).
x
(),
mapToGlobal
(
r
.
topRight
()).
y
()
-
verticalOffset
()
);
m_infoFrame
->
setText
(
infoTip
);
m_infoFrame
->
adjustSize
();
m_infoFrame
->
show
();
m_infoFrame
->
raise
();
}
void
CompletionListView
::
currentChanged
(
const
QModelIndex
&
current
,
const
QModelIndex
&
previous
)
{
QListView
::
currentChanged
(
current
,
previous
);
if
(
isVisible
())
maybeShowInfoTip
();
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
maybeShowInfoTip
()));
}
bool
CompletionListView
::
event
(
QEvent
*
e
)
{
if
(
e
->
type
()
==
QEvent
::
Show
)
{
bool
b
=
QListView
::
event
(
e
);
maybeShowInfoTip
();
return
b
;
}
if
(
m_blockFocusOut
)
return
QListView
::
event
(
e
);
...
...
src/plugins/texteditor/completionwidget.h
View file @
1a772c1b
...
...
@@ -101,7 +101,9 @@ private:
void
setCompletionItems
(
const
QList
<
TextEditor
::
CompletionItem
>
&
completionitems
);
void
keyboardSearch
(
const
QString
&
search
);
void
closeList
(
const
QModelIndex
&
index
);
private
slots
:
void
maybeShowInfoTip
();
private:
bool
m_blockFocusOut
;
bool
m_quickFix
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment