Commit graph

1040 commits

Author SHA1 Message Date
Simon Hausmann
8ffb5131c7
Introduce error handling in the FemtoVG and Skia renderers (#2402)
Avoid unwrap() and expect() and instead propagate errors all the way
down to run_event_loop(), show(), and hide() in the Slint AIP.
2023-03-24 14:18:11 +01:00
Olivier Goffart
9529be2162 Fix some warnings 2023-03-24 11:14:48 +01:00
Olivier Goffart
4cf44ea69d Mark StandardListViewItem and TableColumn as #[non_exhaustive]
Closes #2330
2023-03-18 09:04:48 +01:00
Olivier Goffart
79445e83e2 em: make the logo look good on mcu small screen
Because the slint compiler generates the logo in the size of the image, we hack the image to have the right size.
2023-03-10 16:15:39 +01:00
Florian Blasius
2da2f51929
em: polish menu (#2366) 2023-03-10 14:05:52 +01:00
Olivier Goffart
656569be0d MCU: use embedded-alloc instead of alloc-cortex-m
alloc-cortex-m was renamed embedded-alloc
2023-03-09 15:47:02 +01:00
Olivier Goffart
187e62b776 esp32_s3_box: Try to empty the queue of events between each frame
Makes the scroll in the printer demo feel much less slugish

I have no idea what's the size of the queue so I just added came up with
an arbitrary number
2023-03-09 10:46:28 +01:00
Simon Hausmann
a2a693b248 Improve appearance of comboboxes in the printer demos
Work around #2284
2023-03-09 10:03:04 +01:00
Tobias Hunger
3ac01c3f07 clippy: Fix clippy warnings 2023-03-09 09:35:29 +01:00
Florian Blasius
086db12077
energy monitor: add spyrosoft logo to about page (#2352) 2023-03-09 09:26:45 +01:00
Simon Hausmann
7d178ede4d Avoid an empty forecast if there's an issue with the weather api
In case we fail to retrieve a forecast, don't empty the current forecast
shown. After all, this is just a demo, not a forecast that anybody
should rely on. Therefore it's better to show something than have an
empty widget :)
2023-03-09 09:10:58 +01:00
Olivier Goffart
9da4d5bd38 rp-pico: Move the initialization code to init()
So that the init_clocks_and_plls call which initialize the CPU frequency
is called before the Window initialization. This speeds up the boot
sequence a lot.

Since this involve types that cannot easily be named, keep everything as
generic types.
2023-03-08 16:38:29 +01:00
Simon Hausmann
b61d1ae629 energy-monitor: Avoid an empty daily forecast
Keep the dummy data if we don't have an API key.
2023-03-08 11:45:23 +01:00
Simon Hausmann
cc41d9de47 stm32h7: Add support for getrandom()
Use getrandom's way of injecting a custom source for getrandom().
2023-03-08 09:27:37 +01:00
Simon Hausmann
5fdb8cc449
stm32h7: Move peripherals initialization to the init() function (#2342)
This will allow for initializing other peripherals such as the RNG and
using them before run_event_loop().
2023-03-07 16:55:43 +01:00
Florian Blasius
d5d3ac2882
em: memory and menu open optimisation (#2336) 2023-03-07 13:17:41 +00:00
Olivier Goffart
31f882e05c MCU: Update ESP32 deps
Also enable target-feature=-fp flag on the S3 Box as it miscompiles
otherwise
2023-03-06 18:10:35 +01:00
Florian Blasius
b695503d06
energy monitor: optimize memory usage for small size (#2328)
* em: optimize memory usage for small size
* em: code review
2023-03-06 10:49:19 +01:00
Florian Blasius
1271c224f7
em: kiosk mode (#2323)
* em: kiosk mode
* ci fix
2023-03-03 12:44:01 +01:00
Florian Blasius
e09fb3f934
energy-monitor: polish (#2321)
* readme fix
* polish
2023-03-03 08:03:08 +01:00
Simon Hausmann
0c66c94984 Work around the left arrow not showing up sometimes in the energy monitor
There's a curious bug where with Skia's OpenGL renderer on a Vivante,
the colorization using Skia image filters on the left arrow SVG would
just not produce any pixels. As a workaround, taking the right arrow SVG
and rotating it by 180 degrees around the center fixes it.
2023-03-02 15:18:58 +01:00
Florian Blasius
b9561a642a energy-monitor: layout tweaks 2023-03-02 09:55:58 +01:00
Florian Blasius
74d3d4a14a energy-monitor: polish mid size conent height 2023-03-02 09:38:26 +01:00
Florian Blasius
cbb34c2c89 energy-monitor: fix small size navigation 2023-03-02 09:32:13 +01:00
Florian Blasius
b4cc2c66ee energy-monitor: center content vertical on mid size 2023-03-02 09:26:39 +01:00
Florian Blasius
9d64b8f3e2 energy-monitor: add page touch-area comment 2023-03-02 09:13:46 +01:00
Florian Blasius
68efb86910 energy-monitor: add toucharea to page 2023-03-02 09:12:10 +01:00
Florian Blasius
576a0b6695 energy-monitor: fix missing icon in settings 2023-03-02 08:38:19 +01:00
Florian Blasius
1c4bcdd573 energy-monitor: fix default tab text color 2023-03-01 16:08:19 +01:00
Florian Blasius
04b7bab002
energy-monitor: polish mid size view (#2307)
* energy-monitor: polish mid size view

* Update examples/energy-monitor/ui/mid_main.slint

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>

---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-03-01 13:37:39 +01:00
Tasuku Suzuki
a3d1ddb3d3 printerdemo: Improve category labels' visibility in night mode 2023-03-01 10:28:13 +01:00
Florian Blasius
7812ac17e0
energy-monitor: mid size (#2303) 2023-02-28 15:56:56 +01:00
Tasuku Suzuki
ee7f5d3d66 printerdemo_mcu: Fix layout
Align header and body in the right pane on settings page
2023-02-28 09:07:27 +01:00
Florian Blasius
f57600fe75
energy-monitor: responsive view switch (#2293)
* energy-monitor: responsive view switch
* wasm fix
2023-02-27 13:28:48 +01:00
Simon Hausmann
082b401869 Fix no-std build of energy monitor 2023-02-27 11:49:04 +01:00
Simon Hausmann
5a0259b858 CI: Add the energy monitor to the demo builds for embedded and WASM 2023-02-27 10:10:07 +01:00
Florian Blasius
85e330070f
rename energy-mng to energery-monitor (#2291) 2023-02-27 09:15:01 +01:00
Olivier Goffart
0bd99a17fa printerdemo-mcu: increase the size of the touch area
Makes it easier to press
2023-02-24 16:46:40 +01:00
Tobias Hunger
f0ffc5d243
Fix line endings and add a pre-commit hook
... to keep them fixed:-)
2023-02-23 11:09:50 +01:00
Olivier Goffart
90314cbaf7 esp32_s3_box: adjust frequencies 2023-02-22 17:24:25 +01:00
Florian Blasius
d2f08726a0
energy mng demo: display real date, time and weather data (#2244)
* display real date, time and weather data
2023-02-22 14:36:13 +01:00
Florian Blasius
87cb949ad3
energy mng demo: settings menu (#2263)
* energy-mng: settings menu

* SettingsOverview
* About
* Settings page
* IconButton
* ScrollView
* ListView
* Item / ItemGroup
* CheckBox
* RadioButton
* Switch

* emng: code review

* Update examples/energy_mng/ui/pages/menu_page/settings.slint

Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>

---------

Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2023-02-22 12:44:37 +01:00
Olivier Goffart
5850e5655e esp32_s3_box: Implement unimplemented function
Fixes panic when touching the screen on the carousel demo
2023-02-21 12:30:13 +01:00
Olivier Goffart
8a299fbff2 esp32_s3_box: Touch driver 2023-02-21 12:30:13 +01:00
Olivier Goffart
066ecaacce esp32_s3_box: fix red and blue being inverted 2023-02-21 12:30:13 +01:00
Olivier Goffart
d704f71a18 Update the version of rp2040-hal
Now to a version that actually has DMA support without needing patches
2023-02-20 11:21:41 +01:00
Olivier Goffart
792a5bbd23 Janitor: Update esp32 dependencies
(I did compile the code for the s3 box, but did not try it as i don't
have the hardware)
2023-02-17 15:27:43 +01:00
Olivier Goffart
8450e01a3f
Change the name of the compat feature (#2230)
And remove the compat-0-2-0 and compat-0-3-0 features
2023-02-16 09:40:44 +01:00
Florian Blasius
997344b732
desktop window, tab widget, dashbaord (#2237)
* desktop window, tab widget, dashbaord

* replace logo
2023-02-15 11:28:13 +01:00
Florian Blasius
f52cee154f
balance chart, balance page (#2236) 2023-02-15 09:19:58 +01:00