Commit graph

26 commits

Author SHA1 Message Date
Nigel Breslaw
09dae48828 Color Picker: Support @conic-gradient (#9592)
Some checks failed
CI / node_test (macos-14) (push) Has been cancelled
CI / node_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (ubuntu-22.04) (push) Has been cancelled
CI / cpp_package_test (push) Has been cancelled
CI / vsce_build_test (push) Has been cancelled
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Has been cancelled
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Has been cancelled
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Has been cancelled
CI / mcu-embassy (push) Has been cancelled
CI / wasm_demo (push) Has been cancelled
CI / tree-sitter (push) Has been cancelled
CI / updater_test (0.3.0) (push) Has been cancelled
CI / esp-idf-quick (push) Has been cancelled
CI / android (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-figma-inspector (push) Has been cancelled
CI / material-components (push) Has been cancelled
CI / node_test (ubuntu-22.04) (push) Has been cancelled
CI / python_test (macos-14) (push) Has been cancelled
CI / python_test (ubuntu-22.04) (push) Has been cancelled
CI / python_test (windows-2022) (push) Has been cancelled
CI / cpp_test_driver (macos-14) (push) Has been cancelled
CI / cpp_test_driver (windows-2022) (push) Has been cancelled
CI / cpp_cmake (macos-14, 1.85) (push) Has been cancelled
CI / cpp_cmake (ubuntu-22.04, stable) (push) Has been cancelled
CI / cpp_cmake (windows-2022, nightly) (push) Has been cancelled
CI / ffi_32bit_build (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / wasm (push) Has been cancelled
CI / fmt_test (push) Has been cancelled
2025-10-02 10:38:59 +02:00
Olivier Goffart
489e0b8729 Live-preview: Outline 2025-08-01 18:25:40 +02:00
Olivier Goffart
d34e54e872 live-preview: auto-clear log message after parsing
... instead of after the view was updated.

So that we don't see the errors prom a previous parse,
and we don't miss the debug from init callback
2025-06-11 10:33:17 +02:00
Nigel Breslaw
b763bf65ef
Tooling: Debug console for live-preview (#8630)
Previously to see errors or debug info using debug(...) required the output panel of a speperate IDE or for Slintpad to open the browser developer tools.

This PR adds a dedicated panel to the live-preview. Log messages include a link back to the source file and line number for fast finding where the message was generated. Syntax errors also now show in the logs.

By default the panel is minimised and logs will clear themselves on UI recompile. The last log message does show as a preview on the minimised bar meaning in many cases you never need to open the panel.
---------

Co-authored-by: Tobias Hunger <tobias.hunger@slint.dev>
2025-06-06 15:40:56 +03:00
Nigel Breslaw
05c2b38a52
Polish picker for release (#8591)
Rename svg color to css.
Ensure 'Apply' is at the bottom in all modes.
Give empty recent colors a frame so there isn't a huge empty space when there are no recents.
Tweak the layout based on these changes.
2025-06-02 17:22:26 +03:00
Nigel Breslaw
ab7f884106
Show svg color or global name (#8560)
Tapping the widget will then open the picker to the svg-color tab or the globals tab.
2025-05-28 10:49:38 +03:00
Nigel Breslaw
a04b55b08b
Simpler preview tab telemetry (#8545) 2025-05-27 00:03:10 +03:00
Nigel Breslaw
7c1cefd806
Simplify the brush picker (#8528)
This makes the WindowManager simpler and know less about the Pickers internals.
This logic is now handled via the PickerData global.
2025-05-26 13:06:33 +03:00
Nigel Breslaw
f7d51ec5fe DRY with TabBar
Turn duplicate code into TabBar and simplify logic.
2025-05-23 18:48:30 +02:00
Nigel Breslaw
4318f82241
Use the recent color as the default color/brush for unset properties (#8517) 2025-05-23 16:12:25 +03:00
Nigel Breslaw
22143a04ff
Tidy the brush pickers (#8277)
This refactor is to help make future maintenance easier.

Items are now consistently named as brush instead of color.
Instead of one huge brush picker file, various elements such as gradients live in their own file.
The brush picker is also made a bit less 'smart' and doesn't have to fully understand how the current color or brush needs to be updated or if the data tab live preview needs to be updated. In turn the PickerData has been made smarter and looks after these updates.

This has fixed a few bug regarding gradient stops.
2025-04-28 12:29:43 +03:00
Nigel Breslaw
e7fb9a324c
Fix for preview gradient suddenly becoming a solid color (#8245) 2025-04-23 01:18:39 +03:00
Nigel Breslaw
721de2a357
Get the table editor working with color/brush (#8243) 2025-04-22 23:55:35 +03:00
Nigel Breslaw
5621c70373
Better handling of unset colors and brush properties (#8224)
Brush and color property widgets no longer show the default value of 'transparent' when a value has not been set. Instead the common symbol for no set color from other tools (a red diagonal line on a white background) is used.

When clicked the color picker is then shown and is populated with a default color that is 100% opaque.
2025-04-21 21:55:28 +03:00
Nigel Breslaw
36bc0d1922
Teach new brush pickers to handle radial gradients (#8208)
This also includes some minor bug fixes:

Floating panels block scroll wheel events to stop the underlying canvas being scrolled.
Hex color value should be applied when defocusing the TextEdit,
2025-04-19 23:27:08 +03:00
Nigel Breslaw
ec1e125e80
Fix for unexpected gradient changes (#8188) 2025-04-17 00:14:31 +03:00
Nigel Breslaw
efafb9d8b6
Datatab support for brush properties (#8181) 2025-04-16 17:34:51 +03:00
Nigel Breslaw
77baa2c93e
Gradient fixes (#8179)
Better align color and gradient indicators.
Fix pixel jump in hue slider.
Allow deleting of gradient stops.
Stop json error showing all the time.
2025-04-16 16:14:18 +03:00
Nigel Breslaw
7ae6212b0b
Visual color stop picker for gradient stops (#8173)
* Right align % text

* Show and hide visual color stop editor

* Working color stop picker
2025-04-16 12:59:09 +02:00
Nigel Breslaw
74fb172ef3
Allow editing of a brush that is hex color value or linear gradient (#8164) 2025-04-16 09:59:11 +03:00
Nigel Breslaw
8f6f06f53d
live-preview inline color widget (#8156) 2025-04-15 17:19:38 +03:00
Nigel Breslaw
2da6bf4add
live-preview data tab floating table editor (#8123)
Adds a table editor based on the color picker floating draggable panel.

This includes behaviours that keep the panel inside the bounds of the live preview window and light / dark mode.
2025-04-13 14:57:50 +03:00
Nigel Breslaw
36c7dcaf81
New Brush widget (#8082) 2025-04-10 22:58:01 +03:00
Nigel Breslaw
d607651fb1
Make the new color picker work in the data tab mode (#8030) 2025-04-02 21:55:49 +03:00
Nigel Breslaw
79382187ef
live-preview: Visual color picker (#7971) 2025-04-01 14:50:19 +03:00
Tobias Hunger
208723d8f7 live-preview: WindowGlobal object added
... so we can know the window size everywhere.
2025-03-06 09:02:33 +01:00