Fix "Send As" button on Retina screens.
This commit is contained in:
parent
40330afbd3
commit
7bf557971e
|
@ -18,7 +18,6 @@ SendAsButton::SendAsButton(QWidget *parent, const style::SendAsButton &st)
|
||||||
resize(_st.width, _st.height);
|
resize(_st.width, _st.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SendAsButton::setUserpic(QImage userpic) {
|
void SendAsButton::setUserpic(QImage userpic) {
|
||||||
_userpic = std::move(userpic);
|
_userpic = std::move(userpic);
|
||||||
update();
|
update();
|
||||||
|
@ -44,7 +43,7 @@ void SendAsButton::paintEvent(QPaintEvent *e) {
|
||||||
|
|
||||||
const auto active = _activeAnimation.value(_active ? 1. : 0.);
|
const auto active = _activeAnimation.value(_active ? 1. : 0.);
|
||||||
if (active < 1. && !_userpic.isNull()) {
|
if (active < 1. && !_userpic.isNull()) {
|
||||||
p.drawImage(left, top, _userpic);
|
p.drawImage(QRect(left, top, _st.size, _st.size), _userpic);
|
||||||
}
|
}
|
||||||
if (active > 0.) {
|
if (active > 0.) {
|
||||||
p.setOpacity(active);
|
p.setOpacity(active);
|
||||||
|
|
Loading…
Reference in New Issue