Skip to content

Commit 7d423cb

Browse files
authored
Update to latest Parley version. (#953)
This is basically the upcoming Parley 0.4.0, but right now pointing towards the latest git rev. The snapshots have changed because line height layout code improved in Parley. Fixes #933 Closes #936
1 parent 4a3de37 commit 7d423cb

14 files changed

+268
-121
lines changed

Cargo.lock

+241-94
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,20 @@ tree_arena = { version = "0.1.0", path = "tree_arena" }
9292
vello = "0.4.0"
9393
wgpu = "23.0.1"
9494
kurbo = "0.11.1"
95-
parley = { git = "https://github.com/linebender/parley", rev = "eabfb8175848183dde2516d562c6b7eab7f0df84", features = [
95+
parley = { git = "https://github.com/linebender/parley", rev = "4977a349eb5e5ad276e850825ff87e7b7b709d52", features = [
9696
"accesskit",
9797
] }
98-
peniko = "0.3.1"
99-
winit = "0.30.9"
98+
peniko = "0.3.2"
99+
winit = "0.30.10"
100100
tracing = { version = "0.1.40", default-features = false }
101101
smallvec = "1.13.2"
102-
hashbrown = "0.15.2"
102+
hashbrown = "0.15.3"
103103
dpi = "0.1.1"
104104
image = { version = "0.25.2", default-features = false }
105105
web-time = "1.1.0"
106106
bitflags = "2.6.0"
107-
accesskit = "0.18.0"
108-
accesskit_winit = "0.25.0"
107+
accesskit = "0.19.0"
108+
accesskit_winit = "0.27.0"
109109
time = "0.3.36"
110110

111111
[profile.ci]

masonry/examples/custom_widget.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl Widget for CustomWidget {
129129

130130
// To render text, we first create a LayoutBuilder and set the text properties.
131131
let mut lcx = parley::LayoutContext::new();
132-
let mut text_layout_builder = lcx.ranged_builder(ctx.text_contexts().0, &self.0, 1.0);
132+
let mut text_layout_builder = lcx.ranged_builder(ctx.text_contexts().0, &self.0, 1.0, true);
133133

134134
text_layout_builder.push_default(StyleProperty::FontStack(FontStack::Single(
135135
FontFamily::Generic(parley::style::GenericFamily::Serif),
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

masonry_core/src/widgets/label.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl Widget for Label {
379379
if self.styles_changed {
380380
let (font_ctx, layout_ctx) = ctx.text_contexts();
381381
// TODO: Should we use a different scale?
382-
let mut builder = layout_ctx.ranged_builder(font_ctx, &self.text, 1.0);
382+
let mut builder = layout_ctx.ranged_builder(font_ctx, &self.text, 1.0, true);
383383
for prop in self.styles.inner().values() {
384384
builder.push_default(prop.to_owned());
385385
}

masonry_core/src/widgets/text_area.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ impl<const EDITABLE: bool> Widget for TextArea<EDITABLE> {
952952
let origin = Vec2::new(self.padding.get_left(is_rtl), self.padding.top);
953953
let transform = Affine::translate(origin);
954954
if ctx.is_focus_target() {
955-
for rect in self.editor.selection_geometry().iter() {
955+
for (rect, _) in self.editor.selection_geometry().iter() {
956956
// TODO: If window not focused, use a different color
957957
// TODO: Make configurable
958958
scene.fill(

0 commit comments

Comments
 (0)