mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibGfx+Overall: Remove is_null
from Point
, Rect
and Size
Having a `Point`, `Rect` or `Size` claim it's `null` is silly. We have `Optional<T>` for that. For `Point`, rename `is_null` to `is_zero` to better reflect what we're testing. For `Rect` and `Size`, `is_null` is removed outright. Also, remove `is_empty` from `Point`. Points can't be empty.
This commit is contained in:
parent
d5630bd20e
commit
7b0adee487
12 changed files with 20 additions and 22 deletions
|
@ -154,7 +154,7 @@ void ConnectionFromClient::popup_menu(i32 menu_id, Gfx::IntPoint screen_position
|
|||
return;
|
||||
}
|
||||
auto& menu = *(*it).value;
|
||||
if (!button_rect.is_null())
|
||||
if (!button_rect.is_empty())
|
||||
menu.open_button_menu(position, button_rect);
|
||||
else
|
||||
menu.popup(position);
|
||||
|
@ -654,7 +654,7 @@ void ConnectionFromClient::create_window(i32 window_id, Gfx::IntRect const& rect
|
|||
window->set_alpha_hit_threshold(alpha_hit_threshold);
|
||||
window->set_size_increment(size_increment);
|
||||
window->set_base_size(base_size);
|
||||
if (resize_aspect_ratio.has_value() && !resize_aspect_ratio.value().is_null())
|
||||
if (resize_aspect_ratio.has_value() && !resize_aspect_ratio.value().is_empty())
|
||||
window->set_resize_aspect_ratio(resize_aspect_ratio);
|
||||
window->invalidate(true, true);
|
||||
if (window->type() == WindowType::Applet)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue