提交 78d56691 编写于 作者: J jp9000

UI: Fix bug where color property shows transparency

Technically, setting the transparency value via a color property isn't
currently supported.  However, some sources/filters will set their alpha
portion of their color value to 0, which would cause the color property
to have a transparent background.  Set the alpha value to 255 for now,
at least until we properly implement support for setting transparency
via the color property (if we ever do).
上级 085af8bb
......@@ -638,6 +638,8 @@ void OBSPropertiesView::AddColor(obs_property_t *prop, QFormLayout *layout,
button->setText(QTStr("Basic.PropertiesWindow.SelectColor"));
button->setToolTip(QT_UTF8(obs_property_long_description(prop)));
color.setAlpha(255);
QPalette palette = QPalette(color);
colorLabel->setFrameStyle(QFrame::Sunken | QFrame::Panel);
colorLabel->setText(color.name(QColor::HexArgb));
......@@ -1635,6 +1637,7 @@ bool WidgetInfo::ColorChanged(const char *setting)
#endif
color = QColorDialog::getColor(color, view, QT_UTF8(desc), options);
color.setAlpha(255);
if (!color.isValid())
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册