add hack for label

This commit is contained in:
hippoz 2022-07-26 01:05:51 +03:00
parent 6dd0a1338f
commit 801482efbf
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -25,9 +25,10 @@ void Label::on_init() {
void Label::on_paint() { void Label::on_paint() {
auto painter = window()->painter(); auto painter = window()->painter();
auto geometry = rect().max_geometry();
painter.source_rgb(style()->foreground()); 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(); painter.fill();
} }