Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
512b312c
Commit
512b312c
authored
Apr 13, 2010
by
Jens Bache-Wiig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor modifications to fancylineedit
parent
dbafd89f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
src/libs/utils/fancylineedit.cpp
src/libs/utils/fancylineedit.cpp
+4
-4
src/plugins/coreplugin/core.qrc
src/plugins/coreplugin/core.qrc
+1
-0
src/plugins/coreplugin/images/editclear.png
src/plugins/coreplugin/images/editclear.png
+0
-0
No files found.
src/libs/utils/fancylineedit.cpp
View file @
512b312c
...
...
@@ -111,7 +111,7 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) :
QIcon
icon
=
QIcon
::
fromTheme
(
layoutDirection
()
==
Qt
::
LeftToRight
?
QLatin1String
(
"edit-clear-locationbar-rtl"
)
:
QLatin1String
(
"edit-clear-locationbar-ltr"
),
QIcon
::
fromTheme
(
"edit-clear"
,
QIcon
(
QLatin1String
(
"clear.png"
))));
QIcon
::
fromTheme
(
"edit-clear"
,
QIcon
(
QLatin1String
(
"
:/core/images/edit
clear.png"
))));
m_d
->
m_iconbutton
->
installEventFilter
(
m_d
);
m_d
->
m_iconbutton
->
setIcon
(
icon
);
...
...
@@ -186,10 +186,10 @@ void FancyLineEdit::resizeEvent(QResizeEvent *)
iconpos
=
(
iconpos
==
Left
?
Right
:
Left
);
if
(
iconpos
==
FancyLineEdit
::
Right
)
{
const
int
iconoffset
=
textMargins
().
right
()
+
8
;
const
int
iconoffset
=
textMargins
().
right
()
+
4
;
m_d
->
m_iconbutton
->
setGeometry
(
contentRect
.
adjusted
(
width
()
-
iconoffset
,
0
,
0
,
0
));
}
else
{
const
int
iconoffset
=
textMargins
().
left
()
+
8
;
const
int
iconoffset
=
textMargins
().
left
()
+
4
;
m_d
->
m_iconbutton
->
setGeometry
(
contentRect
.
adjusted
(
0
,
0
,
-
width
()
+
iconoffset
,
0
));
}
}
...
...
@@ -274,7 +274,7 @@ void IconButton::paintEvent(QPaintEvent *)
QPixmap
iconpixmap
=
icon
().
pixmap
(
QSize
(
ICONBUTTON_SIZE
,
ICONBUTTON_SIZE
),
state
,
QIcon
::
Off
);
QRect
pixmapRect
=
QRect
(
0
,
0
,
iconpixmap
.
width
(),
iconpixmap
.
height
());
pixmapRect
.
moveCenter
(
rect
().
center
());
pixmapRect
.
moveCenter
(
rect
().
translated
(
0
,
-
1
).
center
());
if
(
static_cast
<
FancyLineEdit
*>
(
parentWidget
())
->
autoHideIcon
())
painter
.
setOpacity
(
m_iconOpacity
);
...
...
src/plugins/coreplugin/core.qrc
View file @
512b312c
...
...
@@ -53,5 +53,6 @@
<file>editormanager/BinFiles.mimetypes.xml</file>
<file>images/progressbar.png</file>
<file>images/help.png</file>
<file>images/editclear.png</file>
</qresource>
</RCC>
src/plugins/coreplugin/images/editclear.png
0 → 100644
View file @
512b312c
748 Bytes
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