summaryrefslogtreecommitdiff
path: root/src/hyprerror/HyprError.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-03-20 13:52:37 -0400
committerGitHub <noreply@github.com>2026-03-20 17:52:37 +0000
commit8726a7363eb9213235e6e23657668e0daac39a5b (patch)
tree42eeb40f6f81a9ccec1455f308e56173e9dcce4b /src/hyprerror/HyprError.cpp
parentb940b0d2c197841b0f648598ee782dbaf9e0a89b (diff)
config: cleanup the entire config infrastructure (#13785)
Massively refactors the config infrastructure, sorely needed and will be req'd for the lua stuff
Diffstat (limited to 'src/hyprerror/HyprError.cpp')
-rw-r--r--src/hyprerror/HyprError.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/hyprerror/HyprError.cpp b/src/hyprerror/HyprError.cpp
index 4161bfd2..3f180b95 100644
--- a/src/hyprerror/HyprError.cpp
+++ b/src/hyprerror/HyprError.cpp
@@ -2,7 +2,7 @@
#include "HyprError.hpp"
#include "../Compositor.hpp"
#include "../config/ConfigValue.hpp"
-#include "../config/ConfigManager.hpp"
+#include "../config/shared/animation/AnimationTree.hpp"
#include "../render/pass/TexPassElement.hpp"
#include "../managers/animation/AnimationManager.hpp"
#include "../render/Renderer.hpp"
@@ -13,7 +13,7 @@
using namespace Hyprutils::Animation;
CHyprError::CHyprError() {
- g_pAnimationManager->createAnimation(0.f, m_fadeOpacity, g_pConfigManager->getAnimationPropertyConfig("fadeIn"), AVARDAMAGE_NONE);
+ g_pAnimationManager->createAnimation(0.f, m_fadeOpacity, Config::animationTree()->getAnimationPropertyConfig("fadeIn"), AVARDAMAGE_NONE);
static auto P = Event::bus()->m_events.monitor.focused.listen([&](PHLMONITOR mon) {
if (!m_isCreated)
@@ -37,11 +37,15 @@ void CHyprError::queueCreate(std::string message, const CHyprColor& color) {
m_queuedColor = color;
}
+void CHyprError::queueError(std::string err) {
+ queueCreate(err + "\nHyprland may not work correctly.", CHyprColor(1.0, 50.0 / 255.0, 50.0 / 255.0, 1.0));
+}
+
void CHyprError::createQueued() {
if (m_isCreated && m_texture)
m_texture.reset();
- m_fadeOpacity->setConfig(g_pConfigManager->getAnimationPropertyConfig("fadeIn"));
+ m_fadeOpacity->setConfig(Config::animationTree()->getAnimationPropertyConfig("fadeIn"));
m_fadeOpacity->setValueAndWarp(0.f);
*m_fadeOpacity = 1.f;
@@ -198,7 +202,7 @@ void CHyprError::draw() {
return;
} else {
- m_fadeOpacity->setConfig(g_pConfigManager->getAnimationPropertyConfig("fadeOut"));
+ m_fadeOpacity->setConfig(Config::animationTree()->getAnimationPropertyConfig("fadeOut"));
*m_fadeOpacity = 0.f;
}
}