mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:27:34 +00:00
MouseSettings: Give this application a GUI facelift :^)
Note that the double-click "icon" adapts to the double-click speed and also reacts to double-clicks. :^)
This commit is contained in:
parent
3652ab8b2a
commit
81e6560009
10 changed files with 257 additions and 96 deletions
30
Userland/Applications/MouseSettings/DoubleClickArrowWidget.h
Normal file
30
Userland/Applications/MouseSettings/DoubleClickArrowWidget.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
namespace MouseSettings {
|
||||
|
||||
class DoubleClickArrowWidget final : public GUI::Widget {
|
||||
C_OBJECT(DoubleClickArrowWidget);
|
||||
|
||||
public:
|
||||
virtual ~DoubleClickArrowWidget() override;
|
||||
void set_double_click_speed(int);
|
||||
|
||||
private:
|
||||
DoubleClickArrowWidget();
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void doubleclick_event(GUI::MouseEvent&) override;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_arrow_bitmap;
|
||||
int m_double_click_speed { 0 };
|
||||
bool m_inverted { false };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue