mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 14:11:59 -07:00
groupbar: Add options for setting group bar title font weight (and indicator gap) (#9617)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user