refactored BaseWidget

This commit is contained in:
fourtf
2018-07-06 17:11:37 +02:00
parent 741c1f7820
commit b639604a47
31 changed files with 121 additions and 134 deletions
+3 -3
View File
@@ -267,11 +267,11 @@ void SelectChannelDialog::closeEvent(QCloseEvent *)
this->closed.invoke();
}
void SelectChannelDialog::themeRefreshEvent()
void SelectChannelDialog::themeChangedEvent()
{
BaseWindow::themeRefreshEvent();
BaseWindow::themeChangedEvent();
if (this->themeManager->isLightTheme()) {
if (this->theme->isLightTheme()) {
this->setStyleSheet("QRadioButton { color: #000 } QLabel { color: #000 }");
} else {
this->setStyleSheet("QRadioButton { color: #fff } QLabel { color: #fff }");
+1 -1
View File
@@ -24,7 +24,7 @@ public:
protected:
virtual void closeEvent(QCloseEvent *) override;
virtual void themeRefreshEvent() override;
virtual void themeChangedEvent() override;
private:
class EventFilter : public QObject
+2 -2
View File
@@ -175,9 +175,9 @@ void SettingsDialog::scaleChangedEvent(float newDpi)
this->ui_.tabContainerContainer->setFixedWidth(int(200 * newDpi));
}
void SettingsDialog::themeRefreshEvent()
void SettingsDialog::themeChangedEvent()
{
BaseWindow::themeRefreshEvent();
BaseWindow::themeChangedEvent();
QPalette palette;
palette.setColor(QPalette::Background, QColor("#444"));
+1 -1
View File
@@ -29,7 +29,7 @@ public:
protected:
virtual void scaleChangedEvent(float newDpi) override;
virtual void themeRefreshEvent() override;
virtual void themeChangedEvent() override;
private:
void refresh();
+2 -2
View File
@@ -158,9 +158,9 @@ UserInfoPopup::UserInfoPopup()
this->installEvents();
}
void UserInfoPopup::themeRefreshEvent()
void UserInfoPopup::themeChangedEvent()
{
BaseWindow::themeRefreshEvent();
BaseWindow::themeChangedEvent();
this->setStyleSheet("background: #333");
}
+1 -1
View File
@@ -21,7 +21,7 @@ public:
void setData(const QString &name, const ChannelPtr &channel);
protected:
virtual void themeRefreshEvent() override;
virtual void themeChangedEvent() override;
private:
bool isMod_;