Commit graph

9491 commits

Author SHA1 Message Date
Olivier Goffart
7b3b894051 Update rp_2040 deps 2023-09-13 18:11:19 +02:00
Olivier Goffart
46ec7875ed Software renderer: partial rendering with winit and fix non-opaque background
Implement the partial rendering with winit and our software renderer.

When the background is not opaque, we must still initialize all the
pixel with 0 otherwise we blend over the previous frame.
(That wasn't visible before because the buffer was always empty)
2023-09-13 16:08:57 +02:00
Olivier Goffart
196f14e89f rust: return LogicalRect for inner item_geometry functions
(More in line to what C++ does)
2023-09-13 16:08:37 +02:00
Olivier Goffart
819ed07077 Adapt the highlight to the new geometry 2023-09-13 16:08:37 +02:00
Olivier Goffart
a128f57c31 Fix setting default geometry on Rectangle
Since they no longer have a builtin width/height property, the test
that checked the type was wrong. But since we can't override the width
or height property with another type, this should not be relevant
2023-09-13 16:08:37 +02:00
Olivier Goffart
2e5b98ba88 Fix optimization pass removing rectangle that have a x and y set 2023-09-13 16:08:37 +02:00
Olivier Goffart
40a549d6f0 Revert "WIP Take new geometry into account in useless_rectangle"
This doesn't work yet as we need to do more "patching" of anything that
uses the x and y properties

This reverts commit 2d6fec78f9ff01c8b4904685fae0ce587a3c8e9a and
036ddfe23aa5f5b63778b8056d58c30c08f942fe.
2023-09-13 16:08:37 +02:00
Guilhem Vallat
942190e29d WIP Take new geometry into account in useless_rectangle 2023-09-13 16:08:37 +02:00
Guilhem Vallat
5388e01d0d WIP Take new geometry into account in useless_rectangle 2023-09-13 16:08:37 +02:00
Guilhem Vallat
d3a2fc4cd5 fix lower_shadow: correctly create ElementRc
I would love to add a clippy disallowed method for this, but it's a
generic type alias.
2023-09-13 16:08:37 +02:00
Guilhem Vallat
7410d16380 fix resolve_native_classes pass 2023-09-13 16:08:37 +02:00
Guilhem Vallat
c82ef57c26 fix item_tree test compilation 2023-09-13 16:08:37 +02:00
Guilhem Vallat
aada8bb485 include geometries in Element debug print 2023-09-13 16:08:37 +02:00
Guilhem Vallat
5cf1a45e41 Remove duplicated geometry properties from items 2023-09-13 16:08:37 +02:00
Olivier Goffart
06fc251729 Remove the geometry on ItemVTable 2023-09-13 16:08:37 +02:00
Olivier Goffart
2b44ed47a2 Fix PopupWindow positioning
The WindowItem did not have a x or y before, so these property
were unused for it's geometry(), but now it is used in the new
item_geometry on the ComponentVTable.
So make sure we don't initialize them
2023-09-13 16:08:37 +02:00
Olivier Goffart
cfda569e56 More use of item_geometry 2023-09-13 16:08:37 +02:00
Olivier Goffart
31252547e0 Fix generation of geometry prop for some primitives 2023-09-13 16:08:37 +02:00
Olivier Goffart
e04835d209 Fix computation of the item sub range
We need to account for the repeater count in the item sub-range
2023-09-13 16:08:37 +02:00
Olivier Goffart
083023866d Use the item_geometry from ComponentVTable 2023-09-13 16:08:37 +02:00
Olivier Goffart
e0fd9a6105 WIP: Add item_geometry to the ComponentVTable
(unused yet)
2023-09-13 16:08:37 +02:00
Olivier Goffart
2a8ebb9752 Flickable: don't make the viewport special
Instead: add the viewport propety directly in the Flickable

Simplifies the compiler's code generation a bit
2023-09-13 16:08:37 +02:00
Olivier Goffart
8f61f1c2a7 Update esp deps 2023-09-13 14:33:44 +02:00
Simon Hausmann
5cdb279c1f Remove workaround for issue with trailing slash in VCINSTALLDIR when building Skia on Windows 2023-09-13 11:44:49 +02:00
Olivier Goffart
5d37a4a158 Update to corrosion 0.4.3
That include a fix for parsing espressif target so workaround can be
removed
2023-09-13 11:36:46 +02:00
Simon Hausmann
461dec0052 Attempt to work around trailing slash in VCINSTALLDIR 2023-09-13 10:11:39 +02:00
Simon Hausmann
8b478431a7 Help the Skia build to find clang
..even if cmake sets CC/CXX to GCC.
2023-09-13 10:11:39 +02:00
Simon Hausmann
779e216b2a Update to skia-safe 0.66.1 (skia 116/117)
This new version compiles with LLVM 16 that's now in the GH action
runner windows images.

cc #3365
2023-09-13 10:11:39 +02:00
Simon Hausmann
8684cbf959 Update the VS code extension logo to a variant with a white background
Commit e01e9685be made the logo we were
using transparent, which doesn't look good in the vs code extension
list.
2023-09-13 10:03:16 +02:00
Update Translations Bot
50be7b9d13 Update Translations: extract strings 2023-09-13 03:04:24 +00:00
Simon Hausmann
eaf634f618 Add a note about Skia build issues on Windows 2023-09-12 12:04:36 +02:00
Simon Hausmann
c8b05c2b05 Add documentation about the different renderers, their pros/const, and availability in backends and API 2023-09-12 11:28:17 +02:00
Simon Hausmann
906430416f Update softbuffer dependency
This way we're sure to pull in the fix for rendering
on X11 wire protocol, used under WSL.
2023-09-12 09:32:22 +02:00
Simon Hausmann
3652f58a3f Change item indices from usize to u32
So that the compiler and run-time can never disagree on the
number of bytes the item index can use.
2023-09-12 08:53:58 +02:00
Aurindam Jana
e01e9685be
Update Slint logo folder with new design (#3432)
This PR updates the logos and branding guideline of Slint to match the new website design. The new logos are a 1:1 replacement of the old logos except for the circular logo. In the new logo design, there isn't a separate circular logo, as the square logo with circular crop can be used. Further, the logo folder also contains logos in CMYK for use in printed materials. The PMS is just the color value in the naming and can be used where Pantome colors are required. The README has been updated to explain which logos to use when as well as the Slint "blue" color.
2023-09-11 16:41:06 +02:00
Tobias Hunger
1c6a3aeee5
Fix typo in error message 2023-09-11 10:35:37 +02:00
J-P Nurmi
8284674d4d VSCode: add "Remove element" code action 2023-09-08 16:38:16 +02:00
Patryk
46bd17c02d
Fix typo in carousel example (#3434) 2023-09-08 15:43:51 +02:00
Thorbjørn Lindeijer
74b37df4db
Optimize StandardTableView in Fluent, Material and Native styles (#3425)
* Optimize StandardTableView in Fluent and Material styles

By using a ListView instead of a ScrollView + VerticalLayout, we trigger
the optimization where only visible children are being instantiated.

For the Fluent style, this was making the rows more compact, so I've
added additional padding to the TableViewCell to compensate. I don't
know where the padding used to come from.

I didn't touch Cupertino style since it's currently work-in-progress.
This optimization can be done there as well.

For the Native style, this optimization isn't as straight-forward
because it uses a NativeScrollView + Flickable directly rather than a
the ScrollView.

* Optimize StandardTableView for Native style

Using the ListView makes it possible to only instantiate the visible
items, which makes the StandardTableView a lot faster for larger models
(already very noticeably in the gallery example).

When using a ListView, StandardTableView lost access to the
NativeScrollView.native-padding-top/left properties, which are now
exposed through the ScrollView item.

It could also no longer position the Flickable below the header (or in
doing so, would take the scrollbar along with it), so a property was
added to ScrollView for that purpose as well.

* Introduced InternalScrollView

This avoids exposing additional properties on the ScrollView for just
the native style.

* Fix missing default values for Native style ScrollView

Added minimum size, preferred size and stretch factors (they were not
present before introducing InternalScrollView either, but are added now
for consistency with the other styles).
2023-09-08 08:23:03 +02:00
Olivier Goffart
640e5be051 Changelog items 2023-09-07 16:08:48 +02:00
Olivier Goffart
24d3ac9e0d LSP: handle empty string as component name in the showPreview command
Somehow the vscode extension started to send an empty string for the showPreview
command instead of nothing. Resulting in the showPreview command from the command
palette not working anymore.

Fix #3412
2023-09-07 15:01:59 +02:00
Olivier Goffart
f73c1cf80d Compiler: fix conversion from unnamed to named struct
Fixes #2765
2023-09-07 14:57:05 +02:00
Olivier Goffart
4fa983522e Update struct2.slint test to 1.0 syntax 2023-09-07 14:57:05 +02:00
darknight
5e5bbed8ee Expand InputType to support number & decimal 2023-09-07 14:56:45 +02:00
Tobias Hunger
b2cfe21699 VSCode: Add some spacing above WASM preview canvas
VSCode draws a frame around the canvas when it gets keyboard focus. We
used to cut that off, which did not look nice.
2023-09-07 13:57:43 +02:00
J-P Nurmi
5ce11e302a
vscode: add "wrap in element" code action (#3420) 2023-09-07 12:11:14 +02:00
Simon Hausmann
090665de13 Remove traces of required C++ exception support
After commit cf19749943 this isn't needed anymore.
2023-09-07 11:32:56 +02:00
Olivier Goffart
6e1132726a winit-sw: Loop over the buffer instead of using indices
It is possible that softbuf allocate a larger buffer than in needs?

Prospective fix for #3406
2023-09-06 16:04:03 +02:00
Olivier Goffart
cf19749943
Make a pass to remove the Expression::Return instruction
So it doesn't appear in the LLR and the C++ codegen can be simplified.
In particular, this removes the need to throw/catch exception to handle return
across generated lambdas
2023-09-06 14:10:26 +02:00
Olivier Goffart
a565ed53fd Upgrade MSRV to 1.70
Many of our dependencies already made the jump and require a cargo update hack, so make it official

Removed the MSRV from the README since it applies to master branch and people read the readme also for
the released version. There is enough documentation of the MSRV in other locations.
2023-09-06 12:09:03 +02:00