Commit graph

13307 commits

Author SHA1 Message Date
Olivier Goffart
fe333049ea Fix Menu highlight on hover
Regressed in 5cccfda36f
2025-02-24 09:37:37 +01:00
Simon Hausmann
ec88305867 Update Skia Bindings
This allows reverting 18db3210d6 and

Fixes #6615
2025-02-23 17:11:52 +01:00
Simon Hausmann
f3555361e6 cross: Add ninja-build to the docker images
Useful for future Skia builds that don't bring their own copy of ninja anymore.
2025-02-23 13:21:24 +01:00
Simon Hausmann
3154105e84 CI: trim trailing whitespace 2025-02-22 13:34:38 +01:00
Simon Hausmann
7c45ba260e Fix nightly build
The cc downgrade requires also a ring downgrade
2025-02-22 13:30:29 +01:00
Olivier Goffart
c3e32c1665
Don't enable image-default-formats by default, remove compat-1-10 feature
We decided that the compatibility with people having enabled the extra
format in image 0.24 [1] is not worth it compared to the extra compilation
time most people gets by default when they don't need this feature.
(Which is less than 10% slower when the feature is enabled)

Since then there is no need for compat-1-10, remove it

[1] by depending directly on image 0.24 in their Cargo.toml and enabling
the features, which will not work with Slint 1.10 that now use image 0.25
2025-02-22 11:15:18 +01:00
FloVanGH
5cccfda36f
menu: cleanup code, extract MenuItemImpl (#7696)
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-22 08:10:54 +01:00
FloVanGH
48ae567cb0
usecases: port to android (#7695)
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-22 08:10:31 +01:00
Olivier Goffart
1a2aff8b57
Revert "compiler: inline components that are used only once" (#7697)
This reverts commit bf716ff8c5.
(And also revert the test part of 259756c0fd)

This exposed the bug #7693 and more issues mentined in
https://github.com/slint-ui/slint/issues/7693#issuecomment-2675077008

Fixes #7693
CC #7680
2025-02-21 19:11:11 +01:00
Tobias Hunger
34b115bc9f live-preview: Enums in preview data mode
... were shown as JSON, fix this!
2025-02-21 16:30:47 +01:00
autofix-ci[bot]
03b80df515 [autofix.ci] apply automated fixes 2025-02-21 16:25:05 +01:00
Tobias Hunger
8b4e45f7be live-preview: Polish Json edit widget
* Add red overlay in case of invalid input
* Ignore value changes while focused
* Apply value changes when losing focus
2025-02-21 16:25:05 +01:00
szecket
d9fb96b18e fixed the component display
some strange focus issue remains
2025-02-21 16:25:05 +01:00
Olivier Goffart
290468fb55 C++: Stabilize line by line renderer
Fixes https://github.com/slint-ui/slint/issues/7505

ChangeLog: C++: Added `SoftwareRenderer::render_by_line`.
2025-02-21 16:24:03 +01:00
Olivier Goffart
39191e5acd
Menu API changes
`ContextMenu` -> `ContextMenuArea`

`ContextMenu` must have a `Menu` child.
`MenuItem` can no longer be put dirrectly in `MenuBar` and can no longer
have children
`Menu` is used now for sub menus
2025-02-21 16:03:47 +01:00
Simon Hausmann
2b6938bce8
Node.js: Avoid running epoll() in the wayland event loop when pumping… (#7682)
Work around pump_events() with `Some(std::time::Duration::ZERO)` still entering `epoll` and thus not returning, preventing us from processing node events.

cc  #7657


Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2025-02-21 14:50:20 +01:00
Simon Hausmann
3c7494a543 esp-idf: Fix uplaod-components-ci-actions parameters after recent version upgrade
The parameters have changed, name and directories are merged into components.
2025-02-21 13:54:19 +01:00
Simon Hausmann
7001c74740 esp-idf: Always invoke upload-components-ci-action 2025-02-21 13:49:12 +01:00
Simon Hausmann
398571a891 esp-idf: Add a private workflow input like with the vs code extension 2025-02-21 13:47:12 +01:00
Simon Hausmann
291fcfb059 esp-idf: Fix setting version field in idf_component.yml to version with nightly suffix 2025-02-21 13:41:18 +01:00
Simon Hausmann
da3328fb12 esp-idf: Fix path to changed CMakeLists.txt 2025-02-21 13:36:15 +01:00
Simon Hausmann
2926df04c3 esp-idf: Attempt to make git calls work within the esp-idf container 2025-02-21 13:32:42 +01:00
Simon Hausmann
b0f5d78d05
esp-idf: Pass -y to apt-get to enable non-interactive install 2025-02-21 13:15:25 +01:00
Simon Hausmann
74fd3cb6ce esp-idf: Run apt-get update before installing yq
(That worked locally in this container)
2025-02-21 13:04:10 +01:00
Simon Hausmann
61a7a2e8f9
esp-idf: try without sudo 2025-02-21 12:37:45 +01:00
Simon Hausmann
ecd8f8d00b
Add support for nightly esp-idf builds (#7687) 2025-02-21 12:19:23 +01:00
Alex Badics
337282373f compiler: add more complicated const propagation unit test 2025-02-21 11:16:00 +01:00
Alex Badics
7128097b94 compiler: add handling for < and > in const propagation 2025-02-21 11:16:00 +01:00
Alex Badics
d173fa0ba9 compiler: Fix function constness marking 2025-02-21 11:16:00 +01:00
Alex Badics
848e54a9ac compiler: fix func constness propagation 2025-02-21 11:16:00 +01:00
Alex Badics
61df727c48 compiler: fix materialize_fake_properties change 2025-02-21 11:16:00 +01:00
Alex Badics
3e67c93097 compiler: fix pretty print crash on wrong parent references 2025-02-21 11:16:00 +01:00
Alex Badics
68dd67244b compiler: emit optimized fake properties for Images 2025-02-21 11:16:00 +01:00
Alex Badics
bf716ff8c5 compiler: inline components that are used only once 2025-02-21 11:16:00 +01:00
Alex Badics
259756c0fd compiler: don't inline repeater components
They don't need to be inlined, and a lot of the times inlining them incur
a significant overhead (e.g. in case of conditional complex components)
2025-02-21 11:16:00 +01:00
Alex Badics
65bcca1082 compiler: inline functions if possible 2025-02-21 11:16:00 +01:00
Alex Badics
38ddb4d2b7 compiler: improve return elimination 2025-02-21 11:16:00 +01:00
Alex Badics
c2e9fa9f66 compiler: enhance const propagation 2025-02-21 11:16:00 +01:00
Tobias Hunger
f96ce07287 live-preview: Refactor Api between backend and UI
Only push basic information over the boundary in a model.
The values themselves now need to be queried via `Api`.

Pros:
 * Slint tracks the properties automatically, no more
   Property change tracker!

Cons:
 * Live preview is less useful now as we can not yet provide
   function call results via ourr data API.
2025-02-21 10:50:53 +01:00
Nigel Breslaw
fd0f6e822a
figma-plugin: Render properties for Figma 'FrameNodes' (#7684)
Treat Figma FRAME as Rectangle.

Add publish ID.
2025-02-20 22:20:30 +02:00
Tobias Hunger
0909397b7a live-preview: Polish: A container should not contain components
A PropertyContainer should not contain component_name and component_id.
Rename those to container_name and container_id.
2025-02-20 18:12:54 +01:00
Tobias Hunger
17c8ab002f live-preview: Small cleanup
Remove the set_*preview_data() functions from preview.rs

They did not spark joy.
2025-02-20 18:12:54 +01:00
Simon Hausmann
368ec3459b
Improve default accessibility of TextInput elements
Apply similar logic as to LineEdit and TextEdit, so that when folks build their own text input widgets, they're accessible by default. Also fixed the docs while at it to mention default applications.

Amends #7669
2025-02-20 13:44:16 +01:00
Simon Hausmann
de9cc8763c Various ChangeLog edits 2025-02-20 12:16:08 +01:00
Simon Hausmann
ee64068641 Removed section for node.js fix that was reverted 2025-02-20 11:13:44 +01:00
Tobias Hunger
c3b2654fed live-preview: Do not show "Code" button in Data preview
There is no information on code we might jump to,
so do not show that button.
2025-02-20 11:01:19 +01:00
Tobias Hunger
2b59df1355 live-preview: Simple Data edit mode
We can now set all the properties exposed to the
business logic of a UI we are previewing.

Simple properties only so far, everything else falls
back to JSON data.

Next step is to add more sophisticated UI to actually
edit more complex data like arrays more graphically.
2025-02-20 09:43:24 +01:00
Olivier Goffart
c3732e6575 Update ChangeLog 2025-02-20 08:42:16 +01:00
Olivier Goffart
1e814c9bdc
Stabilize the sdf-fonts feature
Enable the SDF feature by default in our compiler binaries

(Still disabled by default for other users because it takes up compile
time for something they probably don't need)
2025-02-19 21:24:53 +01:00
szecket
28f83c64e2 live-preview: fixed indicator and made it show up when control is focused also
The indicator used to collapse secondary parts of the
property edit widgets did not work. Fix that.
2025-02-19 17:40:23 +01:00