diff options
| author | M Matthew Hydock <mhydock@yahoo.com> | 2025-04-24 14:48:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-24 20:48:08 +0200 |
| commit | be6268a7ecea2ad50cdb78fb661884811a8a28e8 (patch) | |
| tree | ac5846bc109796f84c1d0abe095286de96a5967d /src/render/OpenGL.cpp | |
| parent | a9549dbca060b65ae6ec50f9bc68cdf1823d6cbe (diff) | |
groupbar: Add options for setting group bar title font weight (and indicator gap) (#9617)
Diffstat (limited to 'src/render/OpenGL.cpp')
| -rw-r--r-- | src/render/OpenGL.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index d3ac7962..3e9348d6 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -2714,7 +2714,7 @@ SP<CTexture> CHyprOpenGLImpl::loadAsset(const std::string& filename) { return tex; } -SP<CTexture> CHyprOpenGLImpl::renderText(const std::string& text, CHyprColor col, int pt, bool italic, const std::string& fontFamily, int maxWidth) { +SP<CTexture> CHyprOpenGLImpl::renderText(const std::string& text, CHyprColor col, int pt, bool italic, const std::string& fontFamily, int maxWidth, int weight) { SP<CTexture> tex = makeShared<CTexture>(); static auto FONT = CConfigValue<std::string>("misc:font_family"); @@ -2732,7 +2732,7 @@ SP<CTexture> CHyprOpenGLImpl::renderText(const std::string& text, CHyprColor col pango_font_description_set_family_static(pangoFD, FONTFAMILY.c_str()); pango_font_description_set_absolute_size(pangoFD, FONTSIZE * PANGO_SCALE); pango_font_description_set_style(pangoFD, italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); - pango_font_description_set_weight(pangoFD, PANGO_WEIGHT_NORMAL); + pango_font_description_set_weight(pangoFD, static_cast<PangoWeight>(weight)); pango_layout_set_font_description(layoutText, pangoFD); cairo_set_source_rgba(CAIRO, COLOR.r, COLOR.g, COLOR.b, COLOR.a); @@ -2763,7 +2763,7 @@ SP<CTexture> CHyprOpenGLImpl::renderText(const std::string& text, CHyprColor col pango_font_description_set_family_static(pangoFD, FONTFAMILY.c_str()); pango_font_description_set_absolute_size(pangoFD, FONTSIZE * PANGO_SCALE); pango_font_description_set_style(pangoFD, italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL); - pango_font_description_set_weight(pangoFD, PANGO_WEIGHT_NORMAL); + pango_font_description_set_weight(pangoFD, static_cast<PangoWeight>(weight)); pango_layout_set_font_description(layoutText, pangoFD); pango_layout_set_text(layoutText, text.c_str(), -1); |
