Merge branch 'missing_settings_values' into 'master'

Use settings values for missed cases (#6876)

See merge request OpenMW/openmw!3589
macos_ci_fix
Alexei Kotov 1 year ago
commit d495e5af62

@ -26,7 +26,7 @@
#include <components/files/qtconversion.hpp>
#include <components/misc/strings/conversion.hpp>
#include <components/navmeshtool/protocol.hpp>
#include <components/settings/settings.hpp>
#include <components/settings/values.hpp>
#include <components/vfs/bsaarchive.hpp>
#include "utils/profilescombobox.hpp"
@ -123,7 +123,7 @@ namespace Launcher
int getMaxNavMeshDbFileSizeMiB()
{
return Settings::Manager::getUInt64("max navmeshdb file size", "Navigator") / (1024 * 1024);
return Settings::navigator().mMaxNavmeshdbFileSize / (1024 * 1024);
}
std::optional<QString> findFirstPath(const QStringList& directories, const QString& fileName)
@ -359,9 +359,8 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
void Launcher::DataFilesPage::saveSettings(const QString& profile)
{
if (const int value = ui.navMeshMaxSizeSpinBox->value(); value != getMaxNavMeshDbFileSizeMiB())
Settings::Manager::setUInt64(
"max navmeshdb file size", "Navigator", static_cast<std::uint64_t>(std::max(0, value)) * 1024 * 1024);
Settings::navigator().mMaxNavmeshdbFileSize.set(
static_cast<std::uint64_t>(std::max(0, ui.navMeshMaxSizeSpinBox->value())) * 1024 * 1024);
QString profileName = profile;

@ -1100,7 +1100,7 @@ namespace MWGui
std::string_view settingSection = tag.substr(0, comma_pos);
std::string_view settingTag = tag.substr(comma_pos + 1, tag.length());
_result = Settings::Manager::getString(settingTag, settingSection);
_result = Settings::get<MyGUI::Colour>(settingSection, settingTag).get().print();
}
else if (tag.starts_with(tokenToFind))
{
@ -1115,7 +1115,7 @@ namespace MWGui
else
{
std::vector<std::string> split;
Misc::StringUtils::split(std::string{ tag }, split, ":");
Misc::StringUtils::split(tag, split, ":");
l10n::Manager& l10nManager = *MWBase::Environment::get().getL10nManager();

@ -28,10 +28,8 @@ namespace Settings
SettingValue<bool> mSubtitles{ mIndex, "GUI", "subtitles" };
SettingValue<bool> mHitFader{ mIndex, "GUI", "hit fader" };
SettingValue<bool> mWerewolfOverlay{ mIndex, "GUI", "werewolf overlay" };
SettingValue<float> mColorBackgroundOwned{ mIndex, "GUI", "color background owned",
makeClampSanitizerFloat(0, 1) };
SettingValue<float> mColorCrosshairOwned{ mIndex, "GUI", "color crosshair owned",
makeClampSanitizerFloat(0, 1) };
SettingValue<MyGUI::Colour> mColorBackgroundOwned{ mIndex, "GUI", "color background owned" };
SettingValue<MyGUI::Colour> mColorCrosshairOwned{ mIndex, "GUI", "color crosshair owned" };
SettingValue<bool> mKeyboardNavigation{ mIndex, "GUI", "keyboard navigation" };
SettingValue<bool> mColorTopicEnable{ mIndex, "GUI", "color topic enable" };
SettingValue<MyGUI::Colour> mColorTopicSpecific{ mIndex, "GUI", "color topic specific" };

Loading…
Cancel
Save