mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +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
|
@ -796,7 +796,7 @@ void AbstractView::drag_move_event(DragEvent& event)
|
|||
|
||||
if (acceptable) {
|
||||
m_automatic_scroll_delta = automatic_scroll_delta_from_position(event.position());
|
||||
set_automatic_scrolling_timer_active(!m_automatic_scroll_delta.is_null());
|
||||
set_automatic_scrolling_timer_active(!m_automatic_scroll_delta.is_zero());
|
||||
}
|
||||
|
||||
if (m_drop_candidate_index != new_drop_candidate_index) {
|
||||
|
@ -819,7 +819,7 @@ void AbstractView::drag_leave_event(Event&)
|
|||
|
||||
void AbstractView::automatic_scrolling_timer_did_fire()
|
||||
{
|
||||
if (m_automatic_scroll_delta.is_null())
|
||||
if (m_automatic_scroll_delta.is_zero())
|
||||
return;
|
||||
|
||||
vertical_scrollbar().increase_slider_by(m_automatic_scroll_delta.y());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue