aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen Landon <[email protected]>2024-02-08 14:29:10 -0800
committerGitHub <[email protected]>2024-02-08 22:29:10 +0000
commit289d4241bea72ebd891e037996ec4ffd356aadc8 (patch)
tree61e9655083b01bce5eb8c2677ef72348cd7c2734
parenta6ccd36147109d5cb2981122595f06ae93999b55 (diff)
downloadHyprland-289d4241bea72ebd891e037996ec4ffd356aadc8.tar.gz
Hyprland-289d4241bea72ebd891e037996ec4ffd356aadc8.zip
groupbar: scale groupbar text according to monitor scale (#4640)
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index 9a74dcd7..257f47ed 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -181,6 +181,7 @@ CTitleTex::CTitleTex(CWindow* pWindow, const Vector2D& bufferSize) {
pWindowOwner = pWindow;
const auto CAIROSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, bufferSize.x, bufferSize.y);
const auto CAIRO = cairo_create(CAIROSURFACE);
+ const auto MONITORSCALE = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID)->scale;
static auto* const PTITLEFONTFAMILY = &g_pConfigManager->getConfigValuePtr("group:groupbar:font_family")->strValue;
static auto* const PTITLEFONTSIZE = &g_pConfigManager->getConfigValuePtr("group:groupbar:font_size")->intValue;
@@ -199,7 +200,7 @@ CTitleTex::CTitleTex(CWindow* pWindow, const Vector2D& bufferSize) {
pango_layout_set_text(layout, szContent.c_str(), -1);
PangoFontDescription* fontDesc = pango_font_description_from_string(PTITLEFONTFAMILY->c_str());
- pango_font_description_set_size(fontDesc, *PTITLEFONTSIZE * PANGO_SCALE);
+ pango_font_description_set_size(fontDesc, *PTITLEFONTSIZE * MONITORSCALE * PANGO_SCALE);
pango_layout_set_font_description(layout, fontDesc);
pango_font_description_free(fontDesc);