Chase hyprland color
This commit is contained in:
@@ -51,7 +51,7 @@ void CHyprEasyLabel::renderMotionString(Vector2D& bufferSize, const float scale)
|
||||
m_tTextTex = makeShared<CTexture>();
|
||||
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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
6
main.cpp
6
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") {
|
||||
|
||||
Reference in New Issue
Block a user