Skip to content

Update to latest Parley version. #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
335 changes: 241 additions & 94 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ tree_arena = { version = "0.1.0", path = "tree_arena" }
vello = "0.4.0"
wgpu = "23.0.1"
kurbo = "0.11.1"
parley = { git = "https://github.com/linebender/parley", rev = "eabfb8175848183dde2516d562c6b7eab7f0df84", features = [
parley = { git = "https://github.com/linebender/parley", rev = "4977a349eb5e5ad276e850825ff87e7b7b709d52", features = [
"accesskit",
] }
peniko = "0.3.1"
winit = "0.30.9"
peniko = "0.3.2"
winit = "0.30.10"
tracing = { version = "0.1.40", default-features = false }
smallvec = "1.13.2"
hashbrown = "0.15.2"
hashbrown = "0.15.3"
dpi = "0.1.1"
image = { version = "0.25.2", default-features = false }
web-time = "1.1.0"
bitflags = "2.6.0"
accesskit = "0.18.0"
accesskit_winit = "0.25.0"
accesskit = "0.19.0"
accesskit_winit = "0.27.0"
time = "0.3.36"

[profile.ci]
Expand Down
2 changes: 1 addition & 1 deletion masonry/examples/custom_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl Widget for CustomWidget {

// To render text, we first create a LayoutBuilder and set the text properties.
let mut lcx = parley::LayoutContext::new();
let mut text_layout_builder = lcx.ranged_builder(ctx.text_contexts().0, &self.0, 1.0);
let mut text_layout_builder = lcx.ranged_builder(ctx.text_contexts().0, &self.0, 1.0, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The floating bool parameter here is not great API design...


text_layout_builder.push_default(StyleProperty::FontStack(FontStack::Single(
FontFamily::Generic(parley::style::GenericFamily::Serif),
Expand Down
4 changes: 2 additions & 2 deletions masonry/screenshots/example_calc_masonry_initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry/screenshots/example_grid_masonry_initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/prose_alignment_flex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/textbox_outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/textbox_selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/virtual_scroll_basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/virtual_scroll_limited_up_bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/virtual_scroll_moved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions masonry_core/screenshots/virtual_scroll_scrolled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion masonry_core/src/widgets/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl Widget for Label {
if self.styles_changed {
let (font_ctx, layout_ctx) = ctx.text_contexts();
// TODO: Should we use a different scale?
let mut builder = layout_ctx.ranged_builder(font_ctx, &self.text, 1.0);
let mut builder = layout_ctx.ranged_builder(font_ctx, &self.text, 1.0, true);
for prop in self.styles.inner().values() {
builder.push_default(prop.to_owned());
}
Expand Down
2 changes: 1 addition & 1 deletion masonry_core/src/widgets/text_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ impl<const EDITABLE: bool> Widget for TextArea<EDITABLE> {
let origin = Vec2::new(self.padding.get_left(is_rtl), self.padding.top);
let transform = Affine::translate(origin);
if ctx.is_focus_target() {
for rect in self.editor.selection_geometry().iter() {
for (rect, _) in self.editor.selection_geometry().iter() {
// TODO: If window not focused, use a different color
// TODO: Make configurable
scene.fill(
Expand Down