mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:07:46 +00:00
MouseSettings: Add tab to configure cursor highlighting
This adds a nice little tab, including a preview, for configuring the cursor highlighting. Which allows setting the color, size/radius, and opacity.
This commit is contained in:
parent
5fc13e1d53
commit
b558d899ea
7 changed files with 295 additions and 1 deletions
33
Userland/Applications/MouseSettings/HighlightWidget.h
Normal file
33
Userland/Applications/MouseSettings/HighlightWidget.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2022, MacDue <macdue@dueutil.tech>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "HighlightPreviewWidget.h"
|
||||
#include <LibGUI/ColorInput.h>
|
||||
#include <LibGUI/SettingsWindow.h>
|
||||
#include <LibGUI/Slider.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
||||
class HighlightWidget final : public GUI::SettingsWindow::Tab {
|
||||
C_OBJECT(HighlightWidget)
|
||||
public:
|
||||
virtual ~HighlightWidget() override = default;
|
||||
|
||||
virtual void apply_settings() override;
|
||||
virtual void reset_default_values() override;
|
||||
|
||||
private:
|
||||
Gfx::Color highlight_color();
|
||||
|
||||
int highlight_radius();
|
||||
|
||||
HighlightWidget();
|
||||
RefPtr<MouseSettings::HighlightPreviewWidget> m_highlight_preview;
|
||||
RefPtr<GUI::ColorInput> m_highlight_color_input;
|
||||
RefPtr<GUI::Slider> m_highlight_opacity_slider;
|
||||
RefPtr<GUI::Slider> m_highlight_radius_slider;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue