|
|
@@ -133,26 +133,25 @@ void OBSBasicSettings::SaveA11ySettings()
|
|
|
main->RefreshVolumeColors();
|
|
|
}
|
|
|
|
|
|
-#define SetStyle(label, colorVal) \
|
|
|
- color = color_from_int(colorVal); \
|
|
|
- color.setAlpha(255); \
|
|
|
- palette = QPalette(color); \
|
|
|
- label->setFrameStyle(QFrame::Sunken | QFrame::Panel); \
|
|
|
- label->setText(color.name(QColor::HexRgb)); \
|
|
|
- label->setPalette(palette); \
|
|
|
- label->setStyleSheet(QString("background-color: %1; color: %2;") \
|
|
|
- .arg(palette.color(QPalette::Window) \
|
|
|
- .name(QColor::HexRgb)) \
|
|
|
- .arg(palette.color(QPalette::WindowText) \
|
|
|
- .name(QColor::HexRgb))); \
|
|
|
- label->setAutoFillBackground(true); \
|
|
|
+static void SetStyle(QLabel *label, uint32_t colorVal)
|
|
|
+{
|
|
|
+ QColor color = color_from_int(colorVal);
|
|
|
+ color.setAlpha(255);
|
|
|
+ QPalette palette = QPalette(color);
|
|
|
+ label->setFrameStyle(QFrame::Sunken | QFrame::Panel);
|
|
|
+ label->setText(color.name(QColor::HexRgb));
|
|
|
+ label->setPalette(palette);
|
|
|
+ label->setStyleSheet(QString("background-color: %1; color: %2;")
|
|
|
+ .arg(palette.color(QPalette::Window)
|
|
|
+ .name(QColor::HexRgb))
|
|
|
+ .arg(palette.color(QPalette::WindowText)
|
|
|
+ .name(QColor::HexRgb)));
|
|
|
+ label->setAutoFillBackground(true);
|
|
|
label->setAlignment(Qt::AlignCenter);
|
|
|
+}
|
|
|
|
|
|
void OBSBasicSettings::UpdateA11yColors()
|
|
|
{
|
|
|
- QPalette palette;
|
|
|
- QColor color;
|
|
|
-
|
|
|
SetStyle(ui->color1, selectRed);
|
|
|
SetStyle(ui->color2, selectGreen);
|
|
|
SetStyle(ui->color3, selectBlue);
|