71c5a6fb0524d0bddb73c61d49c1c057d86d518d

Author
Sebastian Muxel <sebastian@muxel.dev>
Committer
Sebastian Muxel <sebastian@muxel.dev>
Date

Message

fix: update color-type references

Diff

 1diff --git a/src/SelectionHook.cpp b/src/SelectionHook.cpp
 2index ae5c0519a1f9178d97ed715f393a68fad6b442e0..3800e2c8edf23fb5f2fdf409780d677c78f10338 100644
 3--- a/src/SelectionHook.cpp
 4+++ b/src/SelectionHook.cpp
 5@@ -42,7 +42,7 @@ void init() {
 6 		         "Failed to load function hooks: "
 7 		         "\"updateWindowAnimatedDecorationValues\""},
 8 		        {"time", (uint64_t) 10000},
 9-		        {"color", CColor(1.0, 0.0, 0.0, 1.0)},
10+		        {"color", CHyprColor(1.0, 0.0, 0.0, 1.0)},
11 		        {"icon", ICON_ERROR},
12 		    }
13 		);
14diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
15index 5db7d17c4b47f2a63faa4a36267d398b5f5a5f1c..7b39f8cb50a1d7d5fe4761519dcb1f80a07c872b 100644
16--- a/src/TabGroup.cpp
17+++ b/src/TabGroup.cpp
18@@ -170,8 +170,8 @@ void Hy3TabBarEntry::prepareTexture(float scale, CBox& box) {
19 		auto focused = this->focused.value();
20 		auto urgent = this->urgent.value();
21 		auto inactive = 1.0 - (focused + urgent);
22-		auto c = (CColor(*col_active) * focused) + (CColor(*col_urgent) * urgent)
23-		       + (CColor(*col_inactive) * inactive);
24+		auto c = (CHyprColor(*col_active) * focused) + (CHyprColor(*col_urgent) * urgent)
25+		       + (CHyprColor(*col_inactive) * inactive);
26 
27 		cairo_set_source_rgba(cairo, c.r, c.g, c.b, c.a);
28 
29@@ -214,8 +214,8 @@ void Hy3TabBarEntry::prepareTexture(float scale, CBox& box) {
30 			pango_layout_set_width(layout, width * PANGO_SCALE);
31 			pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
32 
33-			auto c = (CColor(*col_text_active) * focused) + (CColor(*col_text_urgent) * urgent)
34-			       + (CColor(*col_text_inactive) * inactive);
35+			auto c = (CHyprColor(*col_text_active) * focused) + (CHyprColor(*col_text_urgent) * urgent)
36+			       + (CHyprColor(*col_text_inactive) * inactive);
37 
38 			cairo_set_source_rgba(cairo, c.r, c.g, c.b, c.a);
39 
40@@ -600,7 +600,7 @@ void Hy3TabGroup::renderTabBar() {
41 			window_box.scale(scale);
42 
43 			if (window_box.width > 0 && window_box.height > 0)
44-				g_pHyprOpenGL->renderRect(&window_box, CColor(0, 0, 0, 0), *window_rounding);
45+				g_pHyprOpenGL->renderRect(&window_box, CHyprColor(0, 0, 0, 0), *window_rounding);
46 		}
47 
48 		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
49diff --git a/src/globals.hpp b/src/globals.hpp
50index ede0c8f054abd8d1499a4da5fb83144d8425868d..a286a3d440aafebc0f90b2eb5a4c63ca62e7631e 100644
51--- a/src/globals.hpp
52+++ b/src/globals.hpp
53@@ -18,7 +18,7 @@ inline void errorNotif() {
54 	    {
55 	        {"text", "Something has gone very wrong. Check the log for details."},
56 	        {"time", (uint64_t) 10000},
57-	        {"color", CColor(1.0, 0.0, 0.0, 1.0)},
58+	        {"color", CHyprColor(1.0, 0.0, 0.0, 1.0)},
59 	        {"icon", ICON_ERROR},
60 	    }
61 	);
62diff --git a/src/main.cpp b/src/main.cpp
63index 7b06f1b8ce5e79c8c3f2470076ed772498568b40..96a36cb582cf4f64491db68d060cec01cb5ceede 100644
64--- a/src/main.cpp
65+++ b/src/main.cpp
66@@ -16,7 +16,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
67 		HyprlandAPI::addNotification(
68 		    PHANDLE,
69 		    "[hy3] hy3 was compiled for a different version of hyprland; refusing to load.",
70-		    CColor {1.0, 0.2, 0.2, 1.0},
71+		    CHyprColor {1.0, 0.2, 0.2, 1.0},
72 		    10000
73 		);
74