mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2025-05-12 21:30:37 +01:00
Hyprbars: set pango base direction to neutral for rendering title (#302)
This commit is contained in:
parent
4f48dbe12f
commit
0eb996c3ed
1 changed files with 3 additions and 0 deletions
|
@ -319,6 +319,9 @@ void CHyprBar::renderBarTitle(const Vector2D& bufferSize, const float scale) {
|
|||
pango_layout_set_font_description(layout, fontDesc);
|
||||
pango_font_description_free(fontDesc);
|
||||
|
||||
PangoContext* context = pango_layout_get_context(layout);
|
||||
pango_context_set_base_dir(context, PANGO_DIRECTION_NEUTRAL);
|
||||
|
||||
const int paddingTotal = scaledBarPadding * 2 + scaledButtonsSize + (std::string{*PALIGN} != "left" ? scaledButtonsSize : 0);
|
||||
const int maxWidth = std::clamp(static_cast<int>(bufferSize.x - paddingTotal), 0, INT_MAX);
|
||||
|
||||
|
|
Loading…
Reference in a new issue