Commit graph

898 commits

Author SHA1 Message Date
Simon Hausmann
9338d31535 Remove the use of euclid types from the software renderer public API
Closes #1538
2022-08-31 09:23:38 +02:00
Tobias Hunger
0daa2513af API cleanup: Rename PointerEvent to WindowEvent
Also rename members and related functions as specified in #1543.

Fixes: #1543
2022-08-30 16:47:55 +02:00
Tobias Hunger
3430a13bf8 API cleanup: Remove quit behavior parameter from run_event_loop 2022-08-30 08:34:45 +02:00
Olivier Goffart
9952f7e6b9 impl Deref for the SimpleSoftwareWindow 2022-08-29 19:45:29 +02:00
Olivier Goffart
3ed8ca6fc8 Introduce MinimalSoftwareWindow
This simplifies the implementation of the pico and STM, as they both
have the same PlatformWindow implementation, and is likely to be the
same for every MCU
2022-08-29 19:45:29 +02:00
Olivier Goffart
396a2c5ecb Implement std::fmt::Write for SharedString and add a format! macro 2022-08-29 17:25:24 +02:00
Tobias Hunger
88cf874d03 API cleanup: Rename create_window to create_window_adapter 2022-08-29 16:53:47 +02:00
Tobias Hunger
1e6ffeaa0f API cleanup: Rename PlatformWindow to WindowAdapter 2022-08-29 16:53:47 +02:00
Olivier Goffart
344f5c437b swrenderer: Move the DirtyTracking enum into a const generic
Closes: 1541
2022-08-29 14:13:55 +02:00
Tobias Hunger
53053683a1 API cleanup: Rename PlatformAbstraction to Platform 2022-08-29 13:26:36 +02:00
Olivier Goffart
4f0e2608d2 Sofware renderer: keep a Weak of the Window
Closes #1545

Not that `SoftwareRenderer::new()`  takes the Weak by value instead of
by reference, because coercing a reference to a `Weak` to a `&Weak<dyn>`
is not possible, while converting a Weak to a `Weak<dyn>` just works.
2022-08-29 11:07:05 +02:00
Olivier Goffart
8fba65a282 Rename and expose the unsafe-single-threaded feature 2022-08-25 16:47:53 +02:00
Olivier Goffart
877818fa3d Fix compilation with the "simulator" 2022-08-25 16:02:58 +02:00
Simon Hausmann
621bfe5b01 mcu bsp: remove unnecessary dependency
This is a leftover from the copied winit code for the simulator in the
mcu backend.
2022-08-25 13:00:54 +02:00
Simon Hausmann
587b746a7a mcu bsp: use embedded-graphics only for the pico 2022-08-25 13:00:00 +02:00
Simon Hausmann
f9eaffdb6e Fix stm32 build 2022-08-25 12:58:22 +02:00
Simon Hausmann
bf801cfdda Remove mcu bsp feature dependency on i-slint-core for defmt and libm
Make both features of the slint crate
2022-08-25 12:54:52 +02:00
Simon Hausmann
8ed35eded1 Remove the std feature from the mcu bsp crate
The example can use the std feature of slint directly
2022-08-25 12:54:52 +02:00
Simon Hausmann
94d5444105 Remove swrenderer feature dependency on i_slint_core from mcu bsp crate
Let `renderer-software` enable the API in `slint::platform::swrenderer` and optionally toggle winit support.
2022-08-25 12:54:52 +02:00
Simon Hausmann
f239f810c8 Remove the use of i_slint_core in the pico and stm32 bsp modules 2022-08-25 12:54:52 +02:00
Simon Hausmann
e18f118569 Reduce use of internal API in stm32 bsp module
What remains is

    i_slint_core::lengths::{PhysicalLength, PhysicalSize}
2022-08-25 12:54:52 +02:00
Simon Hausmann
c0ab435eed Reduce use of internal API in pico bsp module
What remains is

    i_slint_core::lengths::{PhysicalLength, PhysicalSize}
2022-08-25 12:54:52 +02:00
Simon Hausmann
d90b503a1c Move the mcu backend to become a board support helper crate for examples 2022-08-25 12:54:52 +02:00
Olivier Goffart
9b6188b3d7 MCU: remove the simulator
Now that the winit backend can do software rendering
2022-08-23 14:45:49 +02:00
Olivier Goffart
ca6dfc0cb5 Run clang-format over C++ files 2022-08-17 07:44:22 +02:00
Simon Hausmann
005ba1203c Fix OpenGL underlay with Skia
Save and restore the OpenGL state correctly
2022-08-10 10:54:04 +02:00
Simon Hausmann
3619989fcc Rename backend feature flags to accomodate more renderers
Split backend-gl-* into eventloop-winit-* and renderer-femtovg.

The old feature names are still available.

For consistency eventloop-qt and renderer-qt are aliases for backend-qt.
2022-07-26 17:43:51 +02:00
Tobias Hunger
20c1c45253
Button: Implement support to make the Button a toggle (#1384)
Add flags that enable the Button to be used as a Toggle, e.g. for use in toolbars or similar places.

Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-07-08 16:17:06 +02:00
ogoffart
6b15d2e479 Bump version number to 0.2.6 2022-07-06 09:58:14 +00:00
Olivier Goffart
76e5055d66 printerdemo_mcu: Reset the queue when it is empty 2022-06-20 18:32:15 +02:00
Olivier Goffart
2b68995e1c printerdemo_mcu: prettyfiy the checkbox and make the text clickable 2022-06-20 10:29:38 +02:00
Olivier Goffart
1b8f5824d3 Revert "printerdemo_mcu: Preffify checkboxes"
This reverts commit 474eb3482e.
2022-06-20 09:55:59 +02:00
Olivier Goffart
817b5c536f printerdemo_mcu: tiny adjustment to the ink page animation
Since the software renderer doesn't clip the rounded rect, it doesn't look good when the
ink level is totaly empty, so adjust a bit for that
2022-06-18 22:31:38 +02:00
Tobias Hunger
474eb3482e printerdemo_mcu: Preffify checkboxes
The checkmark looks poor, replace it with a simple rectangle:-)
2022-06-17 18:41:30 +02:00
Tobias Hunger
4cbc675ecf Add slint logo to settings page
... in light and dark and with switching between the two.
2022-06-17 18:21:23 +02:00
Tobias Hunger
278e89314f
printerdemo_mcu: Align page_selection.svg to pixel grid (#1360)
Improve alignment of page_selection.svg to the pixel grid.
2022-06-17 18:20:02 +02:00
Tobias Hunger
71995fa878
Printerdemo_mcu: Polish settings page (#1358) 2022-06-17 14:03:34 +02:00
Tobias Hunger
d5d29f59f9
Polish Icons in printerdemo (#1357) 2022-06-17 14:03:04 +02:00
Tobias Hunger
235f1d4122
Printerdemo_mcu: React on press, not release events (#1350)
Olivier liked the change when I showed it to him on the pico, so I'll just go ahead and merge this.
2022-06-16 13:47:51 +02:00
Lukas Jung
7d5998cb81
Add 7GUIs Readme (#1266) 2022-05-19 14:27:52 +02:00
Lukas Jung
3b64765c3e alignment improvements for 7guis examples 2022-05-13 13:34:08 +02:00
Olivier Goffart
fe6463d0ad Adjust to feedback from code review
on PR #1260

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-05-13 13:00:01 +02:00
Olivier Goffart
c23d8a96fd CI: Don't test 7gui with rust 1.59
It requires Rc::new_cyclic
2022-05-13 13:00:01 +02:00
Olivier Goffart
72df49a1a0 7guis example: add logic to the cells 2022-05-13 13:00:01 +02:00
Lukas Jung
e35bbd3c19 improve the 7guis timer example 2022-05-12 12:43:53 +02:00
Lukas Jung
7e45cde3cd Update crud example to use Model Adapters 2022-05-11 15:50:43 +02:00
ogoffart
3709ded44d Bump version number to 0.2.5 2022-05-09 16:16:00 +00:00
ogoffart
c160ec2aef Bump version number to 0.2.4 2022-05-09 13:49:25 +00:00
Christoph Herzog
4304a27a12 Fix typo in bash example README 2022-05-07 16:41:01 +02:00
Lukas Jung
9ac98b9155 implement undo redo for circledraw 2022-05-06 09:47:30 +02:00