style: ensure defaults are set correctly if config file couldn't load

This commit is contained in:
outfoxxed 2025-01-08 03:47:22 -08:00
parent 8564f0488e
commit b962066864
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -72,7 +72,7 @@ namespace hyprqml::style {
roundness = std::any_cast<Hyprlang::INT>(config.getConfigValue("roundness")); roundness = std::any_cast<Hyprlang::INT>(config.getConfigValue("roundness"));
borderWidth = std::any_cast<Hyprlang::INT>(config.getConfigValue("border_width")); borderWidth = std::any_cast<Hyprlang::INT>(config.getConfigValue("border_width"));
reduceMotion = std::any_cast<Hyprlang::INT>(config.getConfigValue("reduce_motion")); reduceMotion = std::any_cast<Hyprlang::INT>(config.getConfigValue("reduce_motion"));
} catch (...) { return; } } catch (...) {} // NOLINT
if (roundness < 0 || roundness > 3) { if (roundness < 0 || roundness > 3) {
qCWarning(logStyle) << "Invalid value" << roundness qCWarning(logStyle) << "Invalid value" << roundness