ITADN

hyprbars: text size differs across monitors with different scale factors

#675Openanmoti 创建于 2026-05-29
A
anmoticommented
## Description When using multiple monitors with different scale factors, `bar_text_size` appears visually larger on higher-scale monitors. The bar height and buttons are consistent, but the title text size is not. ## Root cause https://github.com/hyprwm/hyprland-plugins/blob/1cb37fad68dff5f5840010c314fed5809b4ee66f/hyprbars/barDeco.cpp#L300 `bar_text_size` is multiplied by the monitor's scale factor before being passed to `renderText`. If `renderText` handles DPI scaling internally (via Pango/Cairo), this results in double-scaling - text on a 1.6x monitor renders 1.6x larger than on a 1.0x monitor. ## Steps to reproduce 1. Setup 2 monitors with different scale factors (e.g. 1.0x and 1.6x) 2. Open a **floating** window and move it between monitors 3. Observe that the title text appears larger on the higher-scale monitor ## Environment this repo: https://github.com/hyprwm/hyprland-plugins/commit/1cb37fad68dff5f5840010c314fed5809b4ee66f ``` > hyprland --version Hyprland 0.55.2 built from branch v0.55.2 at commit 39d7e209c79d451efab1b21151d5938289da838d clean (version: bump to 0.55.2). Date: Sat May 16 12:59:19 2026 Tag: v0.55.2, commits: 7319 Libraries: Hyprgraphics: built against 0.5.1, system has 0.5.1 Hyprutils: built against 0.13.1, system has 0.13.1 Hyprcursor: built against 0.1.13, system has 0.1.13 Hyprlang: built against 0.6.8, system has 0.6.8 Aquamarine: built against 0.11.0, system has 0.11.0 Version ABI string: 39d7e209c79d451efab1b21151d5938289da838d_aq_0.11_hu_0.13_hg_0.5_hc_0.1_hlg_0.6 no flags were set ``` ## Note This issue was drafted with LLM. While I have reviewed the content to ensure it accurately reflects the problem, there may be some technical inaccuracies or unnatural phrasing. If you notice any mistakes or require additional details, please let me know!
0 条评论