mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 09:57:35 +00:00

Add option to reverse primary and secondary buttons in Mouse Settings. - WindowServer.ini: add default entry - switch-mouse-buttons.png: new icon for settings entry - Mouse.gml/MouseWidget.*: new settings dialog - ClientConnection/WindowManager/Server: window message for settings - EventLoop.cpp: swap buttons 1 and 2 if settings are on
32 lines
812 B
C++
32 lines
812 B
C++
/*
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibGUI/CheckBox.h>
|
|
#include <LibGUI/Window.h>
|
|
|
|
#include "DoubleClickArrowWidget.h"
|
|
|
|
class MouseWidget final : public GUI::Widget {
|
|
C_OBJECT(MouseWidget)
|
|
public:
|
|
virtual ~MouseWidget() override;
|
|
|
|
void update_window_server();
|
|
void reset_default_values();
|
|
|
|
private:
|
|
MouseWidget();
|
|
|
|
RefPtr<GUI::HorizontalSlider> m_speed_slider;
|
|
RefPtr<GUI::Label> m_speed_label;
|
|
RefPtr<GUI::SpinBox> m_scroll_length_spinbox;
|
|
RefPtr<GUI::HorizontalSlider> m_double_click_speed_slider;
|
|
RefPtr<GUI::Label> m_double_click_speed_label;
|
|
RefPtr<GUI::CheckBox> m_switch_buttons_checkbox;
|
|
RefPtr<MouseSettings::DoubleClickArrowWidget> m_double_click_arrow_widget;
|
|
};
|