mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
Everywhere: Rename left/right-click to primary/secondary
This resolves #10641.
This commit is contained in:
parent
a6ccf6659a
commit
d6a0726302
79 changed files with 183 additions and 183 deletions
|
@ -122,7 +122,7 @@ void CatDog::track_mouse_move(Gfx::IntPoint const& point)
|
|||
|
||||
void CatDog::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() != GUI::MouseButton::Left)
|
||||
if (event.button() != GUI::MouseButton::Primary)
|
||||
return;
|
||||
if (on_click)
|
||||
on_click();
|
||||
|
|
|
@ -43,7 +43,7 @@ void SpeechBubble::paint_event(GUI::PaintEvent&)
|
|||
|
||||
void SpeechBubble::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() != GUI::MouseButton::Left)
|
||||
if (event.button() != GUI::MouseButton::Primary)
|
||||
return;
|
||||
if (on_dismiss)
|
||||
on_dismiss();
|
||||
|
|
|
@ -164,7 +164,7 @@ void Fire::timer_event(Core::TimerEvent&)
|
|||
|
||||
void Fire::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() == GUI::MouseButton::Left)
|
||||
if (event.button() == GUI::MouseButton::Primary)
|
||||
dragging = true;
|
||||
|
||||
return GUI::Widget::mousedown_event(event);
|
||||
|
@ -189,7 +189,7 @@ void Fire::mousemove_event(GUI::MouseEvent& event)
|
|||
|
||||
void Fire::mouseup_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() == GUI::MouseButton::Left)
|
||||
if (event.button() == GUI::MouseButton::Primary)
|
||||
dragging = false;
|
||||
|
||||
return GUI::Widget::mouseup_event(event);
|
||||
|
|
|
@ -283,7 +283,7 @@ void Mandelbrot::paint_event(GUI::PaintEvent& event)
|
|||
|
||||
void Mandelbrot::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() == GUI::MouseButton::Left) {
|
||||
if (event.button() == GUI::MouseButton::Primary) {
|
||||
if (!m_dragging) {
|
||||
m_selection_start = event.position();
|
||||
m_selection_end = event.position();
|
||||
|
@ -328,7 +328,7 @@ void Mandelbrot::mousemove_event(GUI::MouseEvent& event)
|
|||
|
||||
void Mandelbrot::mouseup_event(GUI::MouseEvent& event)
|
||||
{
|
||||
if (event.button() == GUI::MouseButton::Left) {
|
||||
if (event.button() == GUI::MouseButton::Primary) {
|
||||
auto selection = Gfx::IntRect::from_two_points(m_selection_start, m_selection_end);
|
||||
if (selection.width() > 0 && selection.height() > 0)
|
||||
m_set.zoom(selection);
|
||||
|
@ -337,7 +337,7 @@ void Mandelbrot::mouseup_event(GUI::MouseEvent& event)
|
|||
} else if (event.button() == GUI::MouseButton::Middle) {
|
||||
m_panning = false;
|
||||
update();
|
||||
} else if (event.button() == GUI::MouseButton::Right) {
|
||||
} else if (event.button() == GUI::MouseButton::Secondary) {
|
||||
reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ public:
|
|||
painter.stroke_path(path, Color::Black, 1);
|
||||
|
||||
auto primary_secondary_switched = GUI::WindowServerConnection::the().get_buttons_switched();
|
||||
auto primary_pressed = m_buttons & GUI::MouseButton::Left;
|
||||
auto secondary_pressed = m_buttons & GUI::MouseButton::Right;
|
||||
auto primary_pressed = m_buttons & GUI::MouseButton::Primary;
|
||||
auto secondary_pressed = m_buttons & GUI::MouseButton::Secondary;
|
||||
|
||||
if (primary_secondary_switched ? secondary_pressed : primary_pressed) {
|
||||
painter.fill_rect({ 31, 21, 34, 44 }, Color::Blue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue