mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibGUI+Userland: Add _deprecated
suffix to AbstractButton::{set_,}text
This commit is contained in:
parent
61b49daf0a
commit
d32b052f22
30 changed files with 83 additions and 83 deletions
|
@ -38,13 +38,13 @@ void KeyButton::paint_event(GUI::PaintEvent& event)
|
|||
painter.draw_rect(key_cap_face_border_rect, Color::from_rgb(0x8C7272), false);
|
||||
painter.fill_rect(key_cap_face_rect, face_color);
|
||||
|
||||
if (text().is_empty() || text().starts_with('\0'))
|
||||
if (text_deprecated().is_empty() || text_deprecated().starts_with('\0'))
|
||||
return;
|
||||
|
||||
Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text()))), font.glyph_height() };
|
||||
Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text_deprecated()))), font.glyph_height() };
|
||||
text_rect.align_within(key_cap_face_rect, Gfx::TextAlignment::Center);
|
||||
|
||||
painter.draw_text(text_rect, text(), font, Gfx::TextAlignment::Center, Color::Black, Gfx::TextElision::Right);
|
||||
painter.draw_text(text_rect, text_deprecated(), font, Gfx::TextAlignment::Center, Color::Black, Gfx::TextElision::Right);
|
||||
if (is_focused())
|
||||
painter.draw_rect(text_rect.inflated(6, 4), palette().focus_outline());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue