summaryrefslogtreecommitdiffstats
path: root/glow/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-20 15:09:55 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-20 15:14:08 +0700
commita0ad3996225601aaa1ebe051cba115374b55c80e (patch)
tree8420a91cd319a63b1ed257a6334453a1a673bdfb /glow/src/backend.rs
parent5fae6e59ffbc5913761df638dc7f0c35b7f43bc9 (diff)
downloadiced-a0ad3996225601aaa1ebe051cba115374b55c80e.tar.gz
iced-a0ad3996225601aaa1ebe051cba115374b55c80e.tar.bz2
iced-a0ad3996225601aaa1ebe051cba115374b55c80e.zip
Refactor alignment types into an `alignment` module
Diffstat (limited to '')
-rw-r--r--glow/src/backend.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/glow/src/backend.rs b/glow/src/backend.rs
index 526965cb..9a9457cf 100644
--- a/glow/src/backend.rs
+++ b/glow/src/backend.rs
@@ -7,8 +7,9 @@ use iced_graphics::backend;
use iced_graphics::font;
use iced_graphics::Layer;
use iced_graphics::Primitive;
+use iced_native::alignment;
use iced_native::mouse;
-use iced_native::{Font, HorizontalAlignment, Size, VerticalAlignment};
+use iced_native::{Font, Size};
/// A [`glow`] graphics backend for [`iced`].
///
@@ -147,24 +148,24 @@ impl Backend {
}],
layout: glow_glyph::Layout::default()
.h_align(match text.horizontal_alignment {
- HorizontalAlignment::Left => {
+ alignment::Horizontal::Left => {
glow_glyph::HorizontalAlign::Left
}
- HorizontalAlignment::Center => {
+ alignment::Horizontal::Center => {
glow_glyph::HorizontalAlign::Center
}
- HorizontalAlignment::Right => {
+ alignment::Horizontal::Right => {
glow_glyph::HorizontalAlign::Right
}
})
.v_align(match text.vertical_alignment {
- VerticalAlignment::Top => {
+ alignment::Vertical::Top => {
glow_glyph::VerticalAlign::Top
}
- VerticalAlignment::Center => {
+ alignment::Vertical::Center => {
glow_glyph::VerticalAlign::Center
}
- VerticalAlignment::Bottom => {
+ alignment::Vertical::Bottom => {
glow_glyph::VerticalAlign::Bottom
}
}),