mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 01:56:38 +00:00
LibWeb: Add motion preference
This adds a motion preference to the browser UI similar to the existing ones for color scheme and contrast. Both AppKit UI and Qt UI has this new preference. The auto value is currently the same as NoPreference, follow-ups can address wiring that up to the actual preference for the OS.
This commit is contained in:
parent
0b22aae518
commit
099b77d60f
Notes:
sideshowbarker
2024-07-16 20:08:14 +09:00
Author: https://github.com/lukewarlow
Commit: 099b77d60f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/151
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/trflynn89 ✅
25 changed files with 238 additions and 8 deletions
22
Userland/Libraries/LibWeb/CSS/PreferredMotion.h
Normal file
22
Userland/Libraries/LibWeb/CSS/PreferredMotion.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2024, the Ladybird developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/StringView.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
enum class PreferredMotion {
|
||||
Auto,
|
||||
NoPreference,
|
||||
Reduce,
|
||||
};
|
||||
|
||||
PreferredMotion preferred_motion_from_string(StringView);
|
||||
StringView preferred_motion_to_string(PreferredMotion);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue