Add setting for OSD Pretty fading

This commit is contained in:
Jonas Kvinge
2021-04-13 17:26:54 +02:00
parent bd31e3df89
commit 7877bb7956
4 changed files with 41 additions and 31 deletions

View File

@@ -132,10 +132,6 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent)
QObject::connect(fader_, &QTimeLine::valueChanged, this, &OSDPretty::FaderValueChanged);
QObject::connect(fader_, &QTimeLine::finished, this, &OSDPretty::FaderFinished);
#ifdef Q_OS_WIN
set_fading_enabled(true);
#endif
// Load the show edges and corners
QImage shadow_edge(":/pictures/osd_shadow_edge.png");
QImage shadow_corner(":/pictures/osd_shadow_corner.png");
@@ -247,6 +243,11 @@ void OSDPretty::Load() {
background_opacity_ = s.value("background_opacity", 0.85).toFloat();
font_.fromString(s.value("font", "Verdana,9,-1,5,50,0,0,0,0,0").toString());
disable_duration_ = s.value("disable_duration", false).toBool();
#ifdef Q_OS_WIN
fading_enabled_ = s.value("fading", true).toBool();
#else
fading_enabled_ = s.value("fading", false).toBool();
#endif
if (s.contains("popup_screen")) {
popup_screen_name_ = s.value("popup_screen").toString();