summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/AbstractView.cpp
diff options
context:
space:
mode:
authorFiliph Sandström <filiph.sandstrom@filfatstudios.com>2021-10-27 13:20:27 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2021-10-27 22:05:58 +0300
commitd6a072630268eeccee8ce1da0c13fd4a169caa8c (patch)
tree169e8d0ec79b6c6918a0425986d9c09d9a0b30c7 /Userland/Libraries/LibGUI/AbstractView.cpp
parenta6ccf6659a706eb985cf5e62cd8e8db05ab18ab9 (diff)
downloadserenity-d6a072630268eeccee8ce1da0c13fd4a169caa8c.zip
Everywhere: Rename left/right-click to primary/secondary
This resolves #10641.
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractView.cpp')
-rw-r--r--Userland/Libraries/LibGUI/AbstractView.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractView.cpp b/Userland/Libraries/LibGUI/AbstractView.cpp
index 1e71261c28..77eab48f55 100644
--- a/Userland/Libraries/LibGUI/AbstractView.cpp
+++ b/Userland/Libraries/LibGUI/AbstractView.cpp
@@ -224,7 +224,7 @@ void AbstractView::mousedown_event(MouseEvent& event)
if (!model())
return;
- if (event.button() == MouseButton::Left)
+ if (event.button() == MouseButton::Primary)
m_left_mousedown_position = event.position();
auto index = index_at_event_position(event.position());
@@ -236,10 +236,10 @@ void AbstractView::mousedown_event(MouseEvent& event)
set_cursor(index, SelectionUpdate::Ctrl);
} else if (event.modifiers() & Mod_Shift) {
set_cursor(index, SelectionUpdate::Shift);
- } else if (event.button() == MouseButton::Left && m_selection.contains(index) && !m_model->drag_data_type().is_null()) {
+ } else if (event.button() == MouseButton::Primary && m_selection.contains(index) && !m_model->drag_data_type().is_null()) {
// We might be starting a drag, so don't throw away other selected items yet.
m_might_drag = true;
- } else if (event.button() == MouseButton::Right) {
+ } else if (event.button() == MouseButton::Secondary) {
set_cursor(index, SelectionUpdate::ClearIfNotSelected);
} else {
set_cursor(index, SelectionUpdate::Set);
@@ -285,7 +285,7 @@ void AbstractView::mousemove_event(MouseEvent& event)
if (!m_might_drag)
return AbstractScrollableWidget::mousemove_event(event);
- if (!(event.buttons() & MouseButton::Left) || m_selection.is_empty()) {
+ if (!(event.buttons() & MouseButton::Primary) || m_selection.is_empty()) {
m_might_drag = false;
return AbstractScrollableWidget::mousemove_event(event);
}
@@ -360,7 +360,7 @@ void AbstractView::doubleclick_event(MouseEvent& event)
if (!model())
return;
- if (event.button() != MouseButton::Left)
+ if (event.button() != MouseButton::Primary)
return;
m_might_drag = false;