make lables text left-aligned
This commit is contained in:
parent
4401b7b5b2
commit
7f953a5f40
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ void Label::on_paint() {
|
||||||
|
|
||||||
painter.source_rgb(text_color);
|
painter.source_rgb(text_color);
|
||||||
painter.set_pango_font_description(get_styles()->get_controls_font_description());
|
painter.set_pango_font_description(get_styles()->get_controls_font_description());
|
||||||
painter.text(get_current_geometry(), m_text, PaintTextAlign::Center, PANGO_ELLIPSIZE_NONE);
|
painter.text(get_current_geometry(), m_text, PaintTextAlign::Left, PANGO_ELLIPSIZE_NONE);
|
||||||
painter.fill();
|
painter.fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ bool Painter::text(Box &geometry, std::string &text, PaintTextAlign align, Pango
|
||||||
if (align == PaintTextAlign::Center) {
|
if (align == PaintTextAlign::Center) {
|
||||||
x = geometry.get_x() + ((geometry.get_width() - font_width) / 2);
|
x = geometry.get_x() + ((geometry.get_width() - font_width) / 2);
|
||||||
} else {
|
} else {
|
||||||
x = 0;
|
x = geometry.get_x();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_cairo->move_to(x, y);
|
m_cairo->move_to(x, y);
|
||||||
|
|
Loading…
Reference in a new issue