mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:37:35 +00:00
MouseSettings: Convert setting widgets to a failable factory
This commit is contained in:
parent
ab8be9aed5
commit
90819e2d71
6 changed files with 43 additions and 13 deletions
|
@ -13,19 +13,22 @@
|
|||
#include <LibGUI/Window.h>
|
||||
|
||||
class HighlightWidget final : public GUI::SettingsWindow::Tab {
|
||||
C_OBJECT(HighlightWidget)
|
||||
C_OBJECT_ABSTRACT(HighlightWidget)
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<HighlightWidget>> try_create();
|
||||
virtual ~HighlightWidget() override = default;
|
||||
|
||||
virtual void apply_settings() override;
|
||||
virtual void reset_default_values() override;
|
||||
|
||||
private:
|
||||
HighlightWidget() = default;
|
||||
ErrorOr<void> setup();
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue