mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +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
|
@ -93,20 +93,20 @@ void TaskbarButton::paint_event(GUI::PaintEvent& event)
|
|||
|
||||
Gfx::StylePainter::paint_button(painter, rect(), palette(), button_style(), is_being_pressed(), is_hovered(), is_checked(), is_enabled());
|
||||
|
||||
if (text().is_empty())
|
||||
if (text_deprecated().is_empty())
|
||||
return;
|
||||
|
||||
auto content_rect = rect().shrunken(8, 2);
|
||||
auto icon_location = content_rect.center().translated(-(icon.width() / 2), -(icon.height() / 2));
|
||||
if (!text().is_empty())
|
||||
if (!text_deprecated().is_empty())
|
||||
icon_location.set_x(content_rect.x());
|
||||
|
||||
if (!text().is_empty()) {
|
||||
if (!text_deprecated().is_empty()) {
|
||||
content_rect.translate_by(icon.width() + 4, 0);
|
||||
content_rect.set_width(content_rect.width() - icon.width() - 4);
|
||||
}
|
||||
|
||||
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() };
|
||||
if (text_rect.width() > content_rect.width())
|
||||
text_rect.set_width(content_rect.width());
|
||||
text_rect.align_within(content_rect, text_alignment());
|
||||
|
@ -123,7 +123,7 @@ void TaskbarButton::paint_event(GUI::PaintEvent& event)
|
|||
adjusted_rect.set_width(adjusted_rect.width() + 1);
|
||||
adjusted_rect.set_height(adjusted_rect.height() + 1);
|
||||
}
|
||||
paint_custom_progressbar(painter, adjusted_rect, text_rect, palette(), 0, 100, window.progress().value(), text(), font, text_alignment());
|
||||
paint_custom_progressbar(painter, adjusted_rect, text_rect, palette(), 0, 100, window.progress().value(), text_deprecated(), font, text_alignment());
|
||||
}
|
||||
|
||||
if (is_enabled()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue