summaryrefslogtreecommitdiff
path: root/src/render/decorations/CHyprGroupBarDecoration.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-12-03 18:58:24 +0000
committerGitHub <noreply@github.com>2024-12-03 18:58:24 +0000
commit320144ae7288fe23686935ebb235d9fe0c900862 (patch)
tree351b04e228926f98c12c340284c25450bb1fed4f /src/render/decorations/CHyprGroupBarDecoration.cpp
parent92186898c0ca1b3f72922b72c4af1723f0d9b888 (diff)
core: move colorspace handling to oklab (#8635)
* Meson: add hyprgraphics * Nix: add hyprgraphics * CI/setup_base: get hyprgraphics-git --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'src/render/decorations/CHyprGroupBarDecoration.cpp')
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index b5189be5..937c913d 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -147,7 +147,7 @@ void CHyprGroupBarDecoration::draw(PHLMONITOR pMonitor, float const& a) {
const auto* const PCOLACTIVE = GROUPLOCKED ? GROUPCOLACTIVELOCKED : GROUPCOLACTIVE;
const auto* const PCOLINACTIVE = GROUPLOCKED ? GROUPCOLINACTIVELOCKED : GROUPCOLINACTIVE;
- CColor color = m_dwGroupMembers[WINDOWINDEX].lock() == g_pCompositor->m_pLastWindow.lock() ? PCOLACTIVE->m_vColors[0] : PCOLINACTIVE->m_vColors[0];
+ CHyprColor color = m_dwGroupMembers[WINDOWINDEX].lock() == g_pCompositor->m_pLastWindow.lock() ? PCOLACTIVE->m_vColors[0] : PCOLINACTIVE->m_vColors[0];
color.a *= a;
g_pHyprOpenGL->renderRect(&rect, color);
@@ -205,19 +205,19 @@ void CHyprGroupBarDecoration::invalidateTextures() {
}
CTitleTex::CTitleTex(PHLWINDOW pWindow, const Vector2D& bufferSize, const float monitorScale) {
- tex = makeShared<CTexture>();
- szContent = pWindow->m_szTitle;
- pWindowOwner = pWindow;
- const auto LAYOUTSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 0, 0);
- const auto LAYOUTCAIRO = cairo_create(LAYOUTSURFACE);
-
- static auto FALLBACKFONT = CConfigValue<std::string>("misc:font_family");
- static auto PTITLEFONTFAMILY = CConfigValue<std::string>("group:groupbar:font_family");
- static auto PTITLEFONTSIZE = CConfigValue<Hyprlang::INT>("group:groupbar:font_size");
- static auto PTEXTCOLOR = CConfigValue<Hyprlang::INT>("group:groupbar:text_color");
-
- const CColor COLOR = CColor(*PTEXTCOLOR);
- const auto FONTFAMILY = *PTITLEFONTFAMILY != STRVAL_EMPTY ? *PTITLEFONTFAMILY : *FALLBACKFONT;
+ tex = makeShared<CTexture>();
+ szContent = pWindow->m_szTitle;
+ pWindowOwner = pWindow;
+ const auto LAYOUTSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 0, 0);
+ const auto LAYOUTCAIRO = cairo_create(LAYOUTSURFACE);
+
+ static auto FALLBACKFONT = CConfigValue<std::string>("misc:font_family");
+ static auto PTITLEFONTFAMILY = CConfigValue<std::string>("group:groupbar:font_family");
+ static auto PTITLEFONTSIZE = CConfigValue<Hyprlang::INT>("group:groupbar:font_size");
+ static auto PTEXTCOLOR = CConfigValue<Hyprlang::INT>("group:groupbar:text_color");
+
+ const CHyprColor COLOR = CHyprColor(*PTEXTCOLOR);
+ const auto FONTFAMILY = *PTITLEFONTFAMILY != STRVAL_EMPTY ? *PTITLEFONTFAMILY : *FALLBACKFONT;
cairo_surface_destroy(LAYOUTSURFACE);