mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +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
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/gmta
Commit: 7b0adee487
Pull-request: https://github.com/SerenityOS/serenity/pull/16707
12 changed files with 20 additions and 22 deletions
|
@ -329,7 +329,7 @@ void IconView::mousemove_event(MouseEvent& event)
|
|||
|
||||
if (m_rubber_banding) {
|
||||
m_out_of_view_position = event.position();
|
||||
set_automatic_scrolling_timer_active(!m_rubber_band_scroll_delta.is_null());
|
||||
set_automatic_scrolling_timer_active(!m_rubber_band_scroll_delta.is_zero());
|
||||
|
||||
if (update_rubber_banding(event.position()))
|
||||
return;
|
||||
|
@ -342,7 +342,7 @@ void IconView::automatic_scrolling_timer_did_fire()
|
|||
{
|
||||
AbstractView::automatic_scrolling_timer_did_fire();
|
||||
|
||||
if (m_rubber_band_scroll_delta.is_null())
|
||||
if (m_rubber_band_scroll_delta.is_zero())
|
||||
return;
|
||||
|
||||
vertical_scrollbar().increase_slider_by(m_rubber_band_scroll_delta.y());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue