Skip to content

Commit fc38400

Browse files
committed
Merge branch 'master' of https://github.com/slint-ui/slint
2 parents f9e58ff + dcdcd80 commit fc38400

File tree

8 files changed

+39
-33
lines changed

8 files changed

+39
-33
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# Changelog
44
All notable changes to this project are documented in this file.
55

6+
## [1.14.1] - 2025-10-23
7+
8+
- Updated xkbcommon and fsdm dependencies
9+
- Relicensed Zed editor extension to fullfill Zed's new license requirements
10+
- Rust: Fixed incorrect conversion to and from premultiplied ARGB in `Image::to_rgba8` and `Image::to_rgba8_premultiplied` (#9810)
11+
- winit: Fixed panic when accessing `Palette.color-scheme` during muda menubar build (#9792)
12+
- Fixed docs.rs build by adjusting features metadata
13+
614
## [1.14.0] - 2025-10-21
715

816
### General

internal/backends/linuxkms/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ i-slint-renderer-femtovg = { workspace = true, features = ["default"], optional
3434

3535
[target.'cfg(target_os = "linux")'.dependencies]
3636
input = { workspace = true, default-features = true }
37-
xkbcommon = { version = "0.8.0" }
37+
xkbcommon = { version = "0.9.0" }
3838
calloop = { version = "0.14.1" }
3939
libseat = { version = "0.2.1", optional = true, default-features = false }
4040
nix = { version = "0.30.1", features = ["fs", "ioctl"] }

internal/compiler/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ image = { workspace = true, optional = true, features = ["default"] }
6565
resvg = { workspace = true, optional = true }
6666
# font embedding
6767
fontdue = { workspace = true, optional = true, features = ["parallel"] }
68-
fdsm = { version = "0.7.0", optional = true }
69-
fdsm-ttf-parser = { version = "0.1.2", optional = true }
70-
nalgebra = { version = "0.33.0", optional = true }
68+
fdsm = { version = "0.8.0", optional = true }
69+
fdsm-ttf-parser = { version = "0.2", optional = true }
70+
nalgebra = { version = "0.34.0", optional = true }
7171
rayon = { workspace = true, optional = true }
7272
# translations
7373
polib = { version = "0.2", optional = true }

internal/compiler/passes/embed_glyphs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ fn generate_sdf_for_glyph(
455455
let face =
456456
fdsm_ttf_parser::ttf_parser::Face::parse(font.font.blob.data(), font.font.index).unwrap();
457457
let glyph_id = face.glyph_index(code_point).unwrap_or_default();
458-
let mut shape = fdsm_ttf_parser::load_shape_from_face(&face, glyph_id);
458+
let mut shape = fdsm_ttf_parser::load_shape_from_face(&face, glyph_id)?;
459459

460460
let metrics = sharedfontique::DesignFontMetrics::new(&font.font);
461461
let target_pixel_size = target_pixel_size as f64;

internal/core/Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ rtti = []
2727
std = [
2828
"euclid/std",
2929
"once_cell/std",
30-
"scoped-tls-hkt",
31-
"lyon_path",
32-
"lyon_algorithms",
33-
"lyon_geom",
34-
"lyon_extra",
30+
"dep:scoped-tls-hkt",
31+
"dep:lyon_path",
32+
"dep:lyon_algorithms",
33+
"dep:lyon_geom",
34+
"dep:lyon_extra",
35+
"dep:auto_enums",
3536
"dep:web-time",
3637
"image-decoders",
3738
"svg",
@@ -82,7 +83,7 @@ const-field-offset = { version = "0.1.5", path = "../../helper_crates/const-fiel
8283
vtable = { workspace = true }
8384

8485
portable-atomic = { version = "1", features = ["critical-section"] }
85-
auto_enums = "0.8.0"
86+
auto_enums = { version = "0.8.0", optional = true }
8687
cfg-if = "1"
8788
derive_more = { workspace = true, features = ["error"] }
8889
euclid = { workspace = true }

internal/core/item_tree.rs

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -470,23 +470,7 @@ impl ItemRc {
470470
/// Returns an absolute position of `p` in the parent item coordinate system
471471
/// (does not add this item's x and y)
472472
pub fn map_to_window(&self, p: LogicalPoint) -> LogicalPoint {
473-
let mut current = self.clone();
474-
let mut result = p;
475-
let supports_transformations = self
476-
.window_adapter()
477-
.map(|adapter| adapter.renderer().supports_transformations())
478-
.unwrap_or(true);
479-
while let Some(parent) = current.parent_item(ParentItemTraversalMode::StopAtPopups) {
480-
let geometry = parent.geometry();
481-
if supports_transformations {
482-
if let Some(transform) = parent.children_transform() {
483-
result = transform.transform_point(result.cast()).cast();
484-
}
485-
}
486-
result += geometry.origin.to_vector();
487-
current = parent.clone();
488-
}
489-
result
473+
self.map_to_item_tree_impl(p, None)
490474
}
491475

492476
/// Returns an absolute position of `p` in the `ItemTree`'s coordinate system
@@ -495,18 +479,25 @@ impl ItemRc {
495479
&self,
496480
p: LogicalPoint,
497481
item_tree: &vtable::VRc<ItemTreeVTable>,
482+
) -> LogicalPoint {
483+
self.map_to_item_tree_impl(p, Some(item_tree))
484+
}
485+
486+
fn map_to_item_tree_impl(
487+
&self,
488+
p: LogicalPoint,
489+
item_tree: Option<&vtable::VRc<ItemTreeVTable>>,
498490
) -> LogicalPoint {
499491
let mut current = self.clone();
500492
let mut result = p;
501-
if current.is_root_item_of(item_tree) {
493+
if item_tree.is_some_and(|item_tree| current.is_root_item_of(item_tree)) {
502494
return result;
503495
}
504496
let supports_transformations = self
505497
.window_adapter()
506-
.map(|adapter| adapter.renderer().supports_transformations())
507-
.unwrap_or(true);
498+
.is_none_or(|adapter| adapter.renderer().supports_transformations());
508499
while let Some(parent) = current.parent_item(ParentItemTraversalMode::StopAtPopups) {
509-
if parent.is_root_item_of(item_tree) {
500+
if item_tree.is_some_and(|item_tree| current.is_root_item_of(item_tree)) {
510501
break;
511502
}
512503
let geometry = parent.geometry();

ui-libraries/material/docs/src/content/docs/components/AppBars/search_bar.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ Invoked when a key is pressed in the search bar.
9595
### key-released(event: KeyEvent) -> EventResult
9696
Invoked when a key is released in the search bar.
9797

98+
### item-activated(index: int) -> bool
99+
Invoked when a search item is clicked. If a callback returns 'true', then do not perform the default behavior of changing the search text.
100+
98101
## Functions
99102

100103
### clear-focus()

ui-libraries/material/src/ui/components/search_bar.slint

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export component SearchBar {
132132
callback action_button_clicked(index: int);
133133
callback key_pressed(event: KeyEvent) -> EventResult;
134134
callback key_released(event: KeyEvent) -> EventResult;
135+
callback item-activated(index: int) -> bool;
135136

136137
property <color> color: MaterialPalette.on_surface_variant;
137138
property <length> item_height: MaterialStyleMetrics.size_72;
@@ -288,7 +289,9 @@ export component SearchBar {
288289
action_button_icon: item.action_button_icon;
289290

290291
clicked => {
291-
root.text = self.text;
292+
if (!root.item-activated(index)) {
293+
root.text = self.text;
294+
}
292295
popup.close();
293296
}
294297

0 commit comments

Comments
 (0)