summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/GAbstractTableView.cpp2
-rw-r--r--Libraries/LibGUI/GAbstractTableView.h2
-rw-r--r--Libraries/LibGUI/GApplication.cpp2
-rw-r--r--Libraries/LibGUI/GButton.cpp2
-rw-r--r--Libraries/LibGUI/GEvent.h2
-rw-r--r--Libraries/LibGUI/GListView.cpp2
-rw-r--r--Libraries/LibGUI/GListView.h2
-rw-r--r--Libraries/LibGUI/GScrollableWidget.cpp4
-rw-r--r--Libraries/LibGUI/GScrollableWidget.h4
-rw-r--r--Libraries/LibGUI/GTreeView.cpp8
-rw-r--r--Libraries/LibGUI/GVariant.h2
-rw-r--r--Libraries/LibGUI/GWidget.h4
-rw-r--r--Libraries/LibGUI/GWindow.cpp4
-rw-r--r--Libraries/LibGUI/GWindow.h2
14 files changed, 21 insertions, 21 deletions
diff --git a/Libraries/LibGUI/GAbstractTableView.cpp b/Libraries/LibGUI/GAbstractTableView.cpp
index 265ef25ab4..18cb8ef688 100644
--- a/Libraries/LibGUI/GAbstractTableView.cpp
+++ b/Libraries/LibGUI/GAbstractTableView.cpp
@@ -545,7 +545,7 @@ Gfx::Rect AbstractTableView::row_rect(int item_index) const
return { 0, header_height() + (item_index * item_height()), max(content_size().width(), width()), item_height() };
}
-Point AbstractTableView::adjusted_position(const Gfx::Point& position) const
+Gfx::Point AbstractTableView::adjusted_position(const Gfx::Point& position) const
{
return position.translated(horizontal_scrollbar().value() - frame_thickness(), vertical_scrollbar().value() - frame_thickness());
}
diff --git a/Libraries/LibGUI/GAbstractTableView.h b/Libraries/LibGUI/GAbstractTableView.h
index c3b221c1df..77ce48a70d 100644
--- a/Libraries/LibGUI/GAbstractTableView.h
+++ b/Libraries/LibGUI/GAbstractTableView.h
@@ -62,7 +62,7 @@ public:
int horizontal_padding() const { return m_horizontal_padding; }
- Point adjusted_position(const Gfx::Point&) const;
+ Gfx::Point adjusted_position(const Gfx::Point&) const;
virtual Gfx::Rect content_rect(const ModelIndex&) const override;
Gfx::Rect content_rect(int row, int column) const;
diff --git a/Libraries/LibGUI/GApplication.cpp b/Libraries/LibGUI/GApplication.cpp
index 9c92010167..21c13e00c1 100644
--- a/Libraries/LibGUI/GApplication.cpp
+++ b/Libraries/LibGUI/GApplication.cpp
@@ -140,7 +140,7 @@ void Application::show_tooltip(const StringView& tooltip, const Gfx::Point& scre
Gfx::Rect desktop_rect = Desktop::the().rect();
const int margin = 30;
- Point adjusted_pos = screen_location;
+ Gfx::Point adjusted_pos = screen_location;
if (adjusted_pos.x() + m_tooltip_window->width() >= desktop_rect.width() - margin) {
adjusted_pos = adjusted_pos.translated(-m_tooltip_window->width(), 0);
}
diff --git a/Libraries/LibGUI/GButton.cpp b/Libraries/LibGUI/GButton.cpp
index 22d310e04d..0947b56a41 100644
--- a/Libraries/LibGUI/GButton.cpp
+++ b/Libraries/LibGUI/GButton.cpp
@@ -61,7 +61,7 @@ void Button::paint_event(PaintEvent& event)
return;
auto content_rect = rect().shrunken(8, 2);
- auto icon_location = m_icon ? content_rect.center().translated(-(m_icon->width() / 2), -(m_icon->height() / 2)) : Point();
+ auto icon_location = m_icon ? content_rect.center().translated(-(m_icon->width() / 2), -(m_icon->height() / 2)) : Gfx::Point();
if (m_icon && !text().is_empty())
icon_location.set_x(content_rect.x());
if (is_being_pressed() || is_checked())
diff --git a/Libraries/LibGUI/GEvent.h b/Libraries/LibGUI/GEvent.h
index bfff565bd4..a0b3650ef2 100644
--- a/Libraries/LibGUI/GEvent.h
+++ b/Libraries/LibGUI/GEvent.h
@@ -290,7 +290,7 @@ public:
{
}
- Point position() const { return m_position; }
+ Gfx::Point position() const { return m_position; }
int x() const { return m_position.x(); }
int y() const { return m_position.y(); }
MouseButton button() const { return m_button; }
diff --git a/Libraries/LibGUI/GListView.cpp b/Libraries/LibGUI/GListView.cpp
index 4d11539403..c0b3f6b5d5 100644
--- a/Libraries/LibGUI/GListView.cpp
+++ b/Libraries/LibGUI/GListView.cpp
@@ -99,7 +99,7 @@ ModelIndex ListView::index_at_event_position(const Gfx::Point& point) const
return {};
}
-Point ListView::adjusted_position(const Gfx::Point& position) const
+Gfx::Point ListView::adjusted_position(const Gfx::Point& position) const
{
return position.translated(horizontal_scrollbar().value() - frame_thickness(), vertical_scrollbar().value() - frame_thickness());
}
diff --git a/Libraries/LibGUI/GListView.h b/Libraries/LibGUI/GListView.h
index e12131d206..79c10f81c6 100644
--- a/Libraries/LibGUI/GListView.h
+++ b/Libraries/LibGUI/GListView.h
@@ -51,7 +51,7 @@ public:
void scroll_into_view(const ModelIndex&, Orientation);
- Point adjusted_position(const Gfx::Point&) const;
+ Gfx::Point adjusted_position(const Gfx::Point&) const;
virtual ModelIndex index_at_event_position(const Gfx::Point&) const override;
virtual Gfx::Rect content_rect(const ModelIndex&) const override;
diff --git a/Libraries/LibGUI/GScrollableWidget.cpp b/Libraries/LibGUI/GScrollableWidget.cpp
index f0141bce78..91df270035 100644
--- a/Libraries/LibGUI/GScrollableWidget.cpp
+++ b/Libraries/LibGUI/GScrollableWidget.cpp
@@ -209,7 +209,7 @@ Gfx::Rect ScrollableWidget::widget_inner_rect() const
return rect;
}
-Point ScrollableWidget::to_content_position(const Gfx::Point& widget_position) const
+Gfx::Point ScrollableWidget::to_content_position(const Gfx::Point& widget_position) const
{
auto content_position = widget_position;
content_position.move_by(horizontal_scrollbar().value(), vertical_scrollbar().value());
@@ -217,7 +217,7 @@ Point ScrollableWidget::to_content_position(const Gfx::Point& widget_position) c
return content_position;
}
-Point ScrollableWidget::to_widget_position(const Gfx::Point& content_position) const
+Gfx::Point ScrollableWidget::to_widget_position(const Gfx::Point& content_position) const
{
auto widget_position = content_position;
widget_position.move_by(-horizontal_scrollbar().value(), -vertical_scrollbar().value());
diff --git a/Libraries/LibGUI/GScrollableWidget.h b/Libraries/LibGUI/GScrollableWidget.h
index b26c7deef6..670a4be00f 100644
--- a/Libraries/LibGUI/GScrollableWidget.h
+++ b/Libraries/LibGUI/GScrollableWidget.h
@@ -69,8 +69,8 @@ public:
void set_should_hide_unnecessary_scrollbars(bool b) { m_should_hide_unnecessary_scrollbars = b; }
bool should_hide_unnecessary_scrollbars() const { return m_should_hide_unnecessary_scrollbars; }
- Point to_content_position(const Gfx::Point& widget_position) const;
- Point to_widget_position(const Gfx::Point& content_position) const;
+ Gfx::Point to_content_position(const Gfx::Point& widget_position) const;
+ Gfx::Point to_widget_position(const Gfx::Point& content_position) const;
protected:
explicit ScrollableWidget(Widget* parent);
diff --git a/Libraries/LibGUI/GTreeView.cpp b/Libraries/LibGUI/GTreeView.cpp
index 88caa31c2d..8bdc5e23fc 100644
--- a/Libraries/LibGUI/GTreeView.cpp
+++ b/Libraries/LibGUI/GTreeView.cpp
@@ -281,16 +281,16 @@ void TreeView::paint_event(PaintEvent& event)
for (int i = indent_level; i > 0; --i) {
auto parent_of_index_at_indent = index_at_indent.parent();
bool index_at_indent_is_last_in_parent = index_at_indent.row() == model.row_count(parent_of_index_at_indent) - 1;
- Point a { tree_column_x_offset + horizontal_padding() + indent_width_in_pixels() * i - icon_size() / 2, rect.y() - 2 };
- Point b { a.x(), a.y() + item_height() - 1 };
+ Gfx::Point a { tree_column_x_offset + horizontal_padding() + indent_width_in_pixels() * i - icon_size() / 2, rect.y() - 2 };
+ Gfx::Point b { a.x(), a.y() + item_height() - 1 };
if (index_at_indent_is_last_in_parent)
b.set_y(rect.center().y());
if (!(i != indent_level && index_at_indent_is_last_in_parent))
painter.draw_line(a, b, Color::MidGray);
if (i == indent_level) {
- Point c { a.x(), rect.center().y() };
- Point d { c.x() + icon_size() / 2, c.y() };
+ Gfx::Point c { a.x(), rect.center().y() };
+ Gfx::Point d { c.x() + icon_size() / 2, c.y() };
painter.draw_line(c, d, Color::MidGray);
}
index_at_indent = parent_of_index_at_indent;
diff --git a/Libraries/LibGUI/GVariant.h b/Libraries/LibGUI/GVariant.h
index a0088bbe35..40a17eaaf4 100644
--- a/Libraries/LibGUI/GVariant.h
+++ b/Libraries/LibGUI/GVariant.h
@@ -184,7 +184,7 @@ public:
return m_value.as_float;
}
- Point as_point() const
+ Gfx::Point as_point() const
{
return { m_value.as_point.x, m_value.as_point.y };
}
diff --git a/Libraries/LibGUI/GWidget.h b/Libraries/LibGUI/GWidget.h
index 5d1eb1704a..48c19a7744 100644
--- a/Libraries/LibGUI/GWidget.h
+++ b/Libraries/LibGUI/GWidget.h
@@ -144,7 +144,7 @@ public:
virtual void second_paint_event(PaintEvent&);
Gfx::Rect relative_rect() const { return m_relative_rect; }
- Point relative_position() const { return m_relative_rect.location(); }
+ Gfx::Point relative_position() const { return m_relative_rect.location(); }
Gfx::Rect window_relative_rect() const;
Gfx::Rect screen_relative_rect() const;
@@ -170,7 +170,7 @@ public:
Yes };
struct HitTestResult {
Widget* widget { nullptr };
- Point local_position;
+ Gfx::Point local_position;
};
HitTestResult hit_test(const Gfx::Point&, ShouldRespectGreediness = ShouldRespectGreediness::Yes);
Widget* child_at(const Gfx::Point&) const;
diff --git a/Libraries/LibGUI/GWindow.cpp b/Libraries/LibGUI/GWindow.cpp
index b25c69a197..39ce6fe1f5 100644
--- a/Libraries/LibGUI/GWindow.cpp
+++ b/Libraries/LibGUI/GWindow.cpp
@@ -197,14 +197,14 @@ void Window::event(Core::Event& event)
auto& mouse_event = static_cast<MouseEvent&>(event);
if (m_global_cursor_tracking_widget) {
auto window_relative_rect = m_global_cursor_tracking_widget->window_relative_rect();
- Point local_point { mouse_event.x() - window_relative_rect.x(), mouse_event.y() - window_relative_rect.y() };
+ Gfx::Point local_point { mouse_event.x() - window_relative_rect.x(), mouse_event.y() - window_relative_rect.y() };
auto local_event = make<MouseEvent>((Event::Type)event.type(), local_point, mouse_event.buttons(), mouse_event.button(), mouse_event.modifiers(), mouse_event.wheel_delta());
m_global_cursor_tracking_widget->dispatch_event(*local_event, this);
return;
}
if (m_automatic_cursor_tracking_widget) {
auto window_relative_rect = m_automatic_cursor_tracking_widget->window_relative_rect();
- Point local_point { mouse_event.x() - window_relative_rect.x(), mouse_event.y() - window_relative_rect.y() };
+ Gfx::Point local_point { mouse_event.x() - window_relative_rect.x(), mouse_event.y() - window_relative_rect.y() };
auto local_event = make<MouseEvent>((Event::Type)event.type(), local_point, mouse_event.buttons(), mouse_event.button(), mouse_event.modifiers(), mouse_event.wheel_delta());
m_automatic_cursor_tracking_widget->dispatch_event(*local_event, this);
if (mouse_event.buttons() == 0)
diff --git a/Libraries/LibGUI/GWindow.h b/Libraries/LibGUI/GWindow.h
index 6eec7ac637..b57a22f2fa 100644
--- a/Libraries/LibGUI/GWindow.h
+++ b/Libraries/LibGUI/GWindow.h
@@ -106,7 +106,7 @@ public:
void set_rect(const Gfx::Rect&);
void set_rect(int x, int y, int width, int height) { set_rect({ x, y, width, height }); }
- Point position() const { return rect().location(); }
+ Gfx::Point position() const { return rect().location(); }
void move_to(int x, int y) { move_to({ x, y }); }
void move_to(const Gfx::Point& point) { set_rect({ point, size() }); }