From 801482efbfd46a0b7ec105e114fa9d9a05ea4c9e Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Tue, 26 Jul 2022 01:05:51 +0300 Subject: [PATCH] add hack for label --- src/Label.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Label.cpp b/src/Label.cpp index 3e6ba63..1c57b25 100644 --- a/src/Label.cpp +++ b/src/Label.cpp @@ -25,9 +25,10 @@ void Label::on_init() { void Label::on_paint() { auto painter = window()->painter(); + auto geometry = rect().max_geometry(); painter.source_rgb(style()->foreground()); - painter.text(rect(), m_text, PaintTextAlign::Left, PANGO_ELLIPSIZE_NONE, style()->font_description()); + painter.text(geometry, m_text, PaintTextAlign::Left, PANGO_ELLIPSIZE_END, style()->font_description()); painter.fill(); }