From c2464d2e846ecdf54bf918eddd103c6a08e30896 Mon Sep 17 00:00:00 2001 From: Zakk Date: Tue, 17 Dec 2024 12:19:45 -0500 Subject: [PATCH] Chase hyprland color --- easymotionDeco.cpp | 2 +- easymotionDeco.hpp | 6 +++--- globals.hpp | 4 ++-- main.cpp | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/easymotionDeco.cpp b/easymotionDeco.cpp index 85df59c..c9ba528 100644 --- a/easymotionDeco.cpp +++ b/easymotionDeco.cpp @@ -51,7 +51,7 @@ void CHyprEasyLabel::renderMotionString(Vector2D& bufferSize, const float scale) m_tTextTex = makeShared(); int textSize = m_iTextSize; const auto scaledSize = textSize * scale; - const auto textColor = CColor(m_cTextColor); + const auto textColor = CHyprColor(m_cTextColor); const auto LAYOUTSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 0, 0); const auto LAYOUTCAIRO = cairo_create(LAYOUTSURFACE); diff --git a/easymotionDeco.hpp b/easymotionDeco.hpp index 23926f7..322e292 100644 --- a/easymotionDeco.hpp +++ b/easymotionDeco.hpp @@ -46,8 +46,8 @@ class CHyprEasyLabel : public IHyprWindowDecoration { int m_iPaddingRight; int m_iRounding; - CColor m_cTextColor; - CColor m_cBackgroundColor; + CHyprColor m_cTextColor; + CHyprColor m_cBackgroundColor; int m_iBorderSize; CGradientValueData m_cBorderGradient; @@ -66,7 +66,7 @@ class CHyprEasyLabel : public IHyprWindowDecoration { bool m_bWindowSizeChanged = false; - void renderText(CTexture& out, const std::string& text, const CColor& color, const Vector2D& bufferSize, const float scale, const int fontSize); + void renderText(CTexture& out, const std::string& text, const CHyprColor& color, const Vector2D& bufferSize, const float scale, const int fontSize); CBox assignedBoxGlobal(); void renderMotionString(Vector2D& bufferSize, const float scale); diff --git a/globals.hpp b/globals.hpp index a95f9af..8370926 100644 --- a/globals.hpp +++ b/globals.hpp @@ -13,8 +13,8 @@ struct SGlobalState { struct SMotionActionDesc { int textSize = 15; - CColor textColor = CColor(0,0,0,1); - CColor backgroundColor = CColor(1,1,1,1); + CHyprColor textColor = CHyprColor(0,0,0,1); + CHyprColor backgroundColor = CHyprColor(1,1,1,1); std::string textFont = "Sans"; std::string commandString = ""; CCssGapData boxPadding = CCssGapData(); diff --git a/main.cpp b/main.cpp index 03ffa1b..f9d0d34 100644 --- a/main.cpp +++ b/main.cpp @@ -85,7 +85,7 @@ static bool parseBorderGradient(std::string VALUE, CGradientValueData *DATA) { } try { - DATA->m_vColors.push_back(CColor(configStringToInt(var).value_or(0))); + DATA->m_vColors.push_back(CHyprColor(configStringToInt(var).value_or(0))); } catch (std::exception& e) { Debug::log(WARN, "Error parsing gradient {}", V); } @@ -139,9 +139,9 @@ void easymotionDispatch(std::string args) } else if (kv[0] == "textsize") { actionDesc.textSize = configStringToInt(kv[1]).value_or(15); } else if (kv[0] == "textcolor") { - actionDesc.textColor = CColor(configStringToInt(kv[1]).value_or(0xffffffff)); + actionDesc.textColor = CHyprColor(configStringToInt(kv[1]).value_or(0xffffffff)); } else if (kv[0] == "bgcolor") { - actionDesc.backgroundColor = CColor(configStringToInt(kv[1]).value_or(0)); + actionDesc.backgroundColor = CHyprColor(configStringToInt(kv[1]).value_or(0)); } else if (kv[0] == "textfont") { actionDesc.textFont = kv[1]; } else if (kv[0] == "textpadding") {