summaryrefslogtreecommitdiffstats
path: root/native/src/widget/radio.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-09-20 15:54:19 +0700
committerLibravatar GitHub <noreply@github.com>2021-09-20 15:54:19 +0700
commit35c4ad6dd950fa91d181f4d3253fcb486bcf1b11 (patch)
tree8420a91cd319a63b1ed257a6334453a1a673bdfb /native/src/widget/radio.rs
parent456a3f15e4226cc781a8825bddaaf066476d4351 (diff)
parenta0ad3996225601aaa1ebe051cba115374b55c80e (diff)
downloadiced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.tar.gz
iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.tar.bz2
iced-35c4ad6dd950fa91d181f4d3253fcb486bcf1b11.zip
Merge pull request #1044 from tarkah/feature/align-fill-variant
Add Align::Fill variant
Diffstat (limited to 'native/src/widget/radio.rs')
-rw-r--r--native/src/widget/radio.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs
index dee82d1f..513b2fce 100644
--- a/native/src/widget/radio.rs
+++ b/native/src/widget/radio.rs
@@ -1,15 +1,16 @@
//! Create choices using radio buttons.
use std::hash::Hash;
+use crate::alignment::{self, Alignment};
use crate::event::{self, Event};
+use crate::layout;
use crate::mouse;
use crate::row;
use crate::text;
use crate::touch;
-use crate::{layout, Color};
use crate::{
- Align, Clipboard, Element, Hasher, HorizontalAlignment, Layout, Length,
- Point, Rectangle, Row, Text, VerticalAlignment, Widget,
+ Clipboard, Color, Element, Hasher, Layout, Length, Point, Rectangle, Row,
+ Text, Widget,
};
/// A circular button representing a choice.
@@ -153,7 +154,7 @@ where
Row::<(), Renderer>::new()
.width(self.width)
.spacing(self.spacing)
- .align_items(Align::Center)
+ .align_items(Alignment::Center)
.push(
Row::new()
.width(Length::Units(self.size))
@@ -214,8 +215,8 @@ where
self.text_size.unwrap_or(renderer.default_size()),
self.font,
self.text_color,
- HorizontalAlignment::Left,
- VerticalAlignment::Center,
+ alignment::Horizontal::Left,
+ alignment::Vertical::Center,
);
let is_mouse_over = bounds.contains(cursor_position);