1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-08 03:52:42 +01:00

Fix default cover mode

This commit is contained in:
Elias Steurer 2020-03-28 12:30:41 +01:00
parent 0032332139
commit 4a6c46f24a
2 changed files with 16 additions and 15 deletions

View File

@ -42,30 +42,31 @@ Settings::Settings(const shared_ptr<GlobalVariables>& globalVariables,
qRegisterMetaType<Settings::Language>("Settings::Language");
qmlRegisterUncreatableType<Settings>("Settings", 1, 0, "Settings", "Error only for enums");
{
if (!m_qSettings.contains("Autostart")) {
if (!m_qSettings.contains("Autostart")) {
#ifdef Q_OS_WIN
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
if (!m_qSettings.value("Autostart").toBool()) {
if (!settings.contains("ScreenPlay")) {
}
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
if (!m_qSettings.value("Autostart").toBool()) {
if (!settings.contains("ScreenPlay")) {
}
settings.setValue("ScreenPlay", QDir::toNativeSeparators(QCoreApplication::applicationFilePath()) + " -silent");
settings.sync();
#endif
m_qSettings.setValue("Autostart", true);
m_qSettings.sync();
} else {
setAutostart(m_qSettings.value("Autostart", true).toBool());
}
settings.setValue("ScreenPlay", QDir::toNativeSeparators(QCoreApplication::applicationFilePath()) + " -silent");
settings.sync();
#endif
m_qSettings.setValue("Autostart", true);
m_qSettings.sync();
} else {
setAutostart(m_qSettings.value("Autostart", true).toBool());
}
setCheckWallpaperVisible(m_qSettings.value("CheckWallpaperVisible", false).toBool());
setHighPriorityStart(m_qSettings.value("ScreenPlayExecutable", false).toBool());
if (m_qSettings.contains("VideoFillMode")) {
auto value = m_qSettings.value("VideoFillMode").toString();
setVideoFillMode(QStringToEnum<FillMode>(value, FillMode::Fill));
setVideoFillMode(QStringToEnum<FillMode>(value, FillMode::Cover));
} else {
setVideoFillMode(FillMode::Cover);
}
setAnonymousTelemetry(m_qSettings.value("AnonymousTelemetry", true).toBool());
// Wallpaper and Widgets config

View File

@ -342,7 +342,7 @@ private:
QString m_gitBuildHash;
QString m_decoder;
FillMode m_videoFillMode;
FillMode m_videoFillMode = FillMode::Cover;
Language m_language = Language::En;
QString m_font {"Roboto"};
};