1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:57:44 +00:00
serenity/Userland/Libraries
Mustafa Quraish 253eb5c6d7 ColorPicker: Add ability to select a color on the screen
This commit adds a `ColorSelectOverlay` class, and uses it to
allow the user to pick a color from the screen. The API for
`ColorSelectOverlay` is inspired from the `SelectableOverlay`
in `Utilities/shot.cpp`. In particular, it opens up it's own
window, so that we can have control over the cursor over the
whole screen.

There's one thing notably different: In addition to returning the
final selected color from the `exec()` function, it also provides
an `on_color_changed()` hook, which can be used to (optionally)
get live updated as the mouse is moving around.

This is a bit odd, but allows us to use the preview widget of the
color picker to see the current color under the mouse (which will
be selected upon clicking). When trying to select the color from
text / other small elements, this is very useful.
2021-09-11 19:05:46 +02:00
..
LibArchive Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibAudio Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibC Kernel+Userland: Remove loadable kernel moduless 2021-09-11 19:05:00 +02:00
LibCards LibGfx: Use "try_" prefix for static factory functions 2021-07-21 18:02:15 +02:00
LibChess LibChess: Fix hashing of the chess board 2021-07-30 20:49:18 +02:00
LibCompress LibCompress: Discard GZip NAME & COMMENT optional strings 2021-05-18 08:09:21 +02:00
LibConfig ConfigServer+LibConfig: Add way for clients to listen for config changes 2021-08-26 23:41:38 +02:00
LibCore Everywhere: Fix format-vulnerabilities 2021-09-11 15:16:26 +01:00
LibCoredump Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibCpp LibCpp: Use lex_iterable() where applicable 2021-08-21 22:09:56 +02:00
LibCrypt Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibCrypto Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
LibDebug LibDebug: Use the first memory segment of a library as the ELF's base 2021-09-10 13:57:34 +00:00
LibDesktop Userland: Use Core::Process::spawn() instead of posix_spawn() in places 2021-08-06 01:06:42 +02:00
LibDiff AK+Everywhere: Consolidate String::index_of() and String::find() 2021-05-24 11:59:18 +02:00
LibDl Toolchain+Userland: Enable TLS for x86_64 2021-07-04 01:07:28 +02:00
LibDSP Libraries: Add LibDSP 2021-08-31 17:03:55 +04:30
LibELF LibELF: Use StringView to carry temporary strings in auxiliary vector 2021-09-07 13:53:14 +02:00
LibFileSystemAccessClient LibFileSystemAccessClient: Convert request paths to absolute if needed 2021-09-10 20:46:50 +04:30
LibGemini Userland: Migrate to argument-less deferred_invoke 2021-09-02 03:47:47 +04:30
LibGfx LibGfx: Increase bit-width of variables used in do_draw_scaled_bitmap 2021-09-11 00:09:33 +02:00
LibGL Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
LibGUI ColorPicker: Add ability to select a color on the screen 2021-09-11 19:05:46 +02:00
LibHTTP Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibImageDecoderClient Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibIMAP Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
LibIPC Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibJS LibJS: Visit WeakMap's values as long as their keys were not collected 2021-09-11 18:27:56 +02:00
LibKeyboard LibKeyboard: Remove an unnecessary #include when building with KERNEL 2021-06-30 11:30:28 +02:00
LibLine Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
LibM AK: Introduce Math.h 2021-07-19 16:34:21 +04:30
LibMarkdown LibMarkdown: Match HTML formatting of Commonmark tests 2021-08-31 16:53:51 +02:00
LibPCIDB Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
LibPDF Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibProtocol Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibPthread Kernel+Userland: Remove global futexes 2021-08-17 01:21:47 +02:00
LibRegex LibRegex: Use the correct capture group index in ERE bytecode generation 2021-09-07 20:01:58 +02:00
LibSanitizer LibSanitizer+AK: Add float cast overflow handler 2021-08-08 10:55:36 +02:00
LibSQL Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibSymbolication LibSymbolication: Unbreak symbolication with -z separate-code linking 2021-09-04 20:30:56 +02:00
LibSyntax LibSyntax: Fix bug in matching cursor highlighting 2021-09-03 11:45:50 +02:00
LibSystem Kernel+LibSystem: Add a 4th syscall argument 2021-07-25 14:08:50 +02:00
LibTest LibJS+js+test-js: Add GC debug mode that keeps cells "alive" as zombies 2021-09-11 16:52:03 +02:00
LibTextCodec LibTextCodec: Add "process" API for allocation-free code point iteration 2021-08-30 00:08:40 +02:00
LibThreading LibCore+Userland: Implement Core::deferred_invoke 2021-09-02 03:47:47 +04:30
LibTLS Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibUnicode LibUnicode: Add some data related to currency codes 2021-09-11 11:05:50 +01:00
LibUSBDB LibUSBDB: Fix vendor id decoding 2021-06-18 19:41:25 +04:30
LibVideo Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibVT LibVT: Execute DragOperation after resetting active hyperlink 2021-09-02 22:48:10 +02:00
LibWasm LibWasm: Avoid making StringView of temporary ByteBuffer 2021-09-11 13:22:51 +03:00
LibWeb LibWeb: Implement Window.scroll() and Window.scrollBy() JS methods 2021-09-11 15:51:05 +01:00
LibWebSocket Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibX86 LibX86: Stub out Disassembler::next() for x86_64 2021-08-02 17:11:47 +02:00
CMakeLists.txt Libraries: Add LibDSP 2021-08-31 17:03:55 +04:30