mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
AK: Add Eternal<T> and use it in various places.
This is useful for static locals that never need to be destroyed: Thing& Thing::the() { static Eternal<Thing> the; return the; } The object will be allocated in data segment memory and will never have its destructor invoked.
This commit is contained in:
parent
528054d192
commit
c02c9880b6
23 changed files with 78 additions and 81 deletions
|
@ -473,7 +473,7 @@ void WSWindowManager::paint_window_frame(const WSWindow& window)
|
|||
if (!s_close_button_bitmap)
|
||||
s_close_button_bitmap = &CharacterBitmap::create_from_ascii(s_close_button_bitmap_data, s_close_button_bitmap_width, s_close_button_bitmap_height).leak_ref();
|
||||
|
||||
StylePainter::the().paint_button(*m_back_painter, close_button_rect, ButtonStyle::Normal, false, false);
|
||||
StylePainter::paint_button(*m_back_painter, close_button_rect, ButtonStyle::Normal, false, false);
|
||||
|
||||
auto x_location = close_button_rect.center();
|
||||
x_location.move_by(-(s_close_button_bitmap_width / 2), -(s_close_button_bitmap_height / 2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue