fixed accountpopup background color

This commit is contained in:
fourtf
2018-05-25 13:02:14 +02:00
parent f72e1b5d82
commit b68b7ecb10
5 changed files with 72 additions and 67 deletions
+2 -2
View File
@@ -273,9 +273,9 @@ void AccountPopupWidget::loadAvatar(const QUrl &avatarUrl)
void AccountPopupWidget::scaleChangedEvent(float newDpi)
{
this->setStyleSheet(QString("* { font-size: <font-size>px; }")
.replace("<font-size>", QString::number((int)(12 * newDpi))));
.replace("<font-size>", QString::number(int(12 * newDpi))));
this->ui->lblAvatar->setFixedSize((int)(100 * newDpi), (int)(100 * newDpi));
this->ui->lblAvatar->setFixedSize(int(100 * newDpi), int(100 * newDpi));
}
void AccountPopupWidget::updateButtons(QWidget *layout, bool state)
+2 -1
View File
@@ -19,9 +19,10 @@ class Channel;
namespace widgets {
class AccountPopupWidget : public BaseWindow
class AccountPopupWidget final : public BaseWindow
{
Q_OBJECT
public:
AccountPopupWidget(ChannelPtr _channel);
+5 -2
View File
@@ -36,6 +36,8 @@ AccountSwitchPopupWidget::AccountSwitchPopupWidget(QWidget *parent)
});
this->setLayout(vbox);
// this->setStyleSheet("background: #333");
}
void AccountSwitchPopupWidget::refresh()
@@ -48,11 +50,12 @@ void AccountSwitchPopupWidget::focusOutEvent(QFocusEvent *)
this->hide();
}
void AccountSwitchPopupWidget::paintEvent(QPaintEvent *event)
void AccountSwitchPopupWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(this->rect(), QColor(255, 255, 255));
painter.setPen(QColor("#999"));
painter.drawRect(0, 0, this->width() - 1, this->height() - 1);
}
} // namespace widgets