fixed accountpopup background color
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -19,9 +19,10 @@ class Channel;
|
||||
|
||||
namespace widgets {
|
||||
|
||||
class AccountPopupWidget : public BaseWindow
|
||||
class AccountPopupWidget final : public BaseWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AccountPopupWidget(ChannelPtr _channel);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user