Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630461
ClearButton.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
525 B
Referenced Files
None
Subscribers
None
ClearButton.cpp
View Options
#include
"ClearButton.h"
#include
"ApplicationGlobal.h"
#include
"Theme.h"
#include
<QPainter>
ClearButton
::
ClearButton
(
QWidget
*
parent
)
:
QToolButton
(
parent
)
{
pixmap
=
global
->
theme
->
resource_clear_png
();
}
void
ClearButton
::
paintEvent
(
QPaintEvent
*
/*event*/
)
{
QPainter
pr
(
this
);
pr
.
setOpacity
(
underMouse
()
?
1.0
:
0.5
);
int
w
=
pixmap
.
width
();
int
h
=
pixmap
.
height
();
int
x
=
(
width
()
-
w
)
/
2
;
int
y
=
(
height
()
-
h
)
/
2
;
int
delta
=
isDown
()
?
1
:
0
;
pr
.
drawPixmap
(
x
+
delta
,
y
+
delta
,
w
,
h
,
pixmap
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 9:32 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
115763
Default Alt Text
ClearButton.cpp (525 B)
Attached To
Mode
R77 Guitar
Attached
Detach File
Event Timeline