Support XDG Desktop Portal as color picker provider

Wayland and XWayland fallback implementation uses XDP in
order to query picked color from desktop.
This commit is contained in:
2025-06-24 16:41:32 +03:00
parent d0b552d74a
commit 6d337464f7
46 changed files with 3636 additions and 14 deletions

View File

@@ -326,8 +326,11 @@ namespace FlaxEditor.GUI.Dialogs
// Update eye dropper tool
if (_activeEyedropper)
{
// Try reading the color under the cursor in realtime if supported by the platform
Float2 mousePosition = Platform.MousePosition;
SelectedColor = ScreenUtilities.GetColorAt(mousePosition);
Color color = ScreenUtilities.GetColorAt(mousePosition);
if (color != Color.Transparent)
SelectedColor = color;
}
}