UI: Add setThemeID to qt-wrappers
Makes the function usable outside of just window-basic-stats.cpp.
This commit is contained in:
@@ -323,3 +323,15 @@ bool LineEditChanged(QEvent *event)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void setThemeID(QWidget *widget, const QString &themeID)
|
||||
{
|
||||
if (widget->property("themeID").toString() != themeID) {
|
||||
widget->setProperty("themeID", themeID);
|
||||
|
||||
/* force style sheet recalculation */
|
||||
QString qss = widget->styleSheet();
|
||||
widget->setStyleSheet("/* */");
|
||||
widget->setStyleSheet(qss);
|
||||
}
|
||||
}
|
||||
|
@@ -105,3 +105,5 @@ static inline Qt::ConnectionType WaitConnection()
|
||||
|
||||
bool LineEditCanceled(QEvent *event);
|
||||
bool LineEditChanged(QEvent *event);
|
||||
|
||||
void setThemeID(QWidget *widget, const QString &themeID);
|
||||
|
@@ -18,18 +18,6 @@
|
||||
#define TIMER_INTERVAL 2000
|
||||
#define REC_TIME_LEFT_INTERVAL 30000
|
||||
|
||||
static void setThemeID(QWidget *widget, const QString &themeID)
|
||||
{
|
||||
if (widget->property("themeID").toString() != themeID) {
|
||||
widget->setProperty("themeID", themeID);
|
||||
|
||||
/* force style sheet recalculation */
|
||||
QString qss = widget->styleSheet();
|
||||
widget->setStyleSheet("/* */");
|
||||
widget->setStyleSheet(qss);
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasicStats::OBSFrontendEvent(enum obs_frontend_event event, void *ptr)
|
||||
{
|
||||
OBSBasicStats *stats = reinterpret_cast<OBSBasicStats *>(ptr);
|
||||
|
Reference in New Issue
Block a user