mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
Userland: Make TextWrapping::Wrap opt-in
This was breaking many places which didn't expect text to wrap. Now, the only place where text currently wraps is in GUI::Label.
This commit is contained in:
parent
2dc9ae00af
commit
4c9c85ac01
8 changed files with 21 additions and 21 deletions
|
@ -176,8 +176,8 @@ void AbstractButton::paint_text(Painter& painter, const Gfx::IntRect& rect, cons
|
|||
auto clipped_rect = rect.intersected(this->rect());
|
||||
|
||||
if (!is_enabled()) {
|
||||
painter.draw_text(clipped_rect.translated(1, 1), text(), font, text_alignment, Color::White, Gfx::TextElision::Right);
|
||||
painter.draw_text(clipped_rect, text(), font, text_alignment, Color::from_rgb(0x808080), Gfx::TextElision::Right);
|
||||
painter.draw_text(clipped_rect.translated(1, 1), text(), font, text_alignment, Color::White, Gfx::TextElision::Right, text_wrapping);
|
||||
painter.draw_text(clipped_rect, text(), font, text_alignment, Color::from_rgb(0x808080), Gfx::TextElision::Right, text_wrapping);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue