summaryrefslogtreecommitdiffstats
path: root/core/src/pixels.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-04 13:00:16 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-04 18:39:31 +0200
commit9499a8f9e6f9971dedfae563cb133232aa3cebc2 (patch)
tree54074dd8b1fc17d63ad92d84b6d2b4415ad29df6 /core/src/pixels.rs
parent8e8808f0e187ed6671441f5016f07bfcba426452 (diff)
downloadiced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.tar.gz
iced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.tar.bz2
iced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.zip
Support configurable `LineHeight` in text widgets
Diffstat (limited to 'core/src/pixels.rs')
-rw-r--r--core/src/pixels.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/pixels.rs b/core/src/pixels.rs
index e42cd9f9..6a9e5c88 100644
--- a/core/src/pixels.rs
+++ b/core/src/pixels.rs
@@ -20,3 +20,9 @@ impl From<u16> for Pixels {
Self(f32::from(amount))
}
}
+
+impl From<Pixels> for f32 {
+ fn from(pixels: Pixels) -> Self {
+ pixels.0
+ }
+}