Commit graph

7 commits

Author SHA1 Message Date
Tobias Hunger
081452bee9 live-preview: Explicitly set live-data values on reload
Set all values that are changed compared to the initial
set of values right after loading a new component.

This also includes a small change to the printerdemo,
so that it exposes more data to the business logic,
so that we have something to demonstrate;-)
2025-04-09 09:39:04 +02:00
Olivier Goffart
3e94bd2167 Janitor: Remove trailing whitespaces from all files
`git grep -I -l -O'sed -i "s/[[:space:]]*$//"' -e ''`
2025-01-10 13:23:22 +01:00
Nathan Collins
4e709e192a Increase the printer demo back button TouchArea size
Make the back button easier to hit on embedded touch devices.
2025-01-09 19:42:12 +01:00
Nathan Collins
43ed37e5bb Make the printer demo dark mode button easier to hit
Previously, the dark mode button was especially hard to hit on
embedded devices.

The TouchArea of the SideBarIcon used for this button was much smaller
than the others. By exposing a new property on the SideBarIcon:
icon-colorize, we can customize the colorize behaviour of the Image,
as well as the source. This allows us to re-use the internal Image for
the dark mode button. This allows us to use the default width, height
and x position of the icon. The touch areas of the sidebar buttons are
now uniform.
2025-01-09 19:42:12 +01:00
Olivier Goffart
fff19b329b Add explicit width and height to demo svg
Workaround for #6715
In the wasm interpreted, we use an `<img>` tag to load images, but that
cannot get the default svg size without an explicit width and height
2024-12-16 19:05:44 +01:00
Simon Hausmann
fd34bab425 Fix French translation not working in WASM build of printer demo
(For me this was also reproducible on desktop, but oddly not for
Olivier)

Letters like é were stripped from the noto sans font used by the demo,
and with FemtoVG we assume that presense of a character in the common
script implies full coverage (to avoid having to check every character).

Fix this by fixing the font itself. We wouldn't want those letters to
come from DejaVu :)
2024-12-02 14:46:57 +01:00
Simon Hausmann
a98d4709be Move printer demo and energy-monitor into new top-level demos/ folder
These are showing off use-cases for Slint, but they're not examples showing individual Slint features.

Also removed the old printerdemo while at it.
2024-10-25 12:09:32 +02:00