summaryrefslogtreecommitdiffstats
path: root/native/src/widget/radio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/radio.rs')
-rw-r--r--native/src/widget/radio.rs44
1 files changed, 24 insertions, 20 deletions
diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs
index 7d39c526..86ad4c4e 100644
--- a/native/src/widget/radio.rs
+++ b/native/src/widget/radio.rs
@@ -10,8 +10,8 @@ use crate::text;
use crate::touch;
use crate::widget::{self, Row, Text};
use crate::{
- Alignment, Background, Clipboard, Color, Element, Hasher, Layout, Length,
- Point, Rectangle, Widget,
+ Alignment, Clipboard, Color, Element, Hasher, Layout, Length, Point,
+ Rectangle, Widget,
};
pub use iced_style::radio::{Style, StyleSheet};
@@ -243,27 +243,31 @@ where
self.style_sheet.active()
};
- renderer.fill_rectangle(renderer::Quad {
- bounds,
- background: style.background,
- border_radius: size / 2.0,
- border_width: style.border_width,
- border_color: style.border_color,
- });
+ renderer.fill_quad(
+ renderer::Quad {
+ bounds,
+ border_radius: size / 2.0,
+ border_width: style.border_width,
+ border_color: style.border_color,
+ },
+ style.background,
+ );
if self.is_selected {
- renderer.fill_rectangle(renderer::Quad {
- bounds: Rectangle {
- x: bounds.x + dot_size / 2.0,
- y: bounds.y + dot_size / 2.0,
- width: bounds.width - dot_size,
- height: bounds.height - dot_size,
+ renderer.fill_quad(
+ renderer::Quad {
+ bounds: Rectangle {
+ x: bounds.x + dot_size / 2.0,
+ y: bounds.y + dot_size / 2.0,
+ width: bounds.width - dot_size,
+ height: bounds.height - dot_size,
+ },
+ border_radius: dot_size / 2.0,
+ border_width: 0.0,
+ border_color: Color::TRANSPARENT,
},
- background: Background::Color(style.dot_color),
- border_radius: dot_size / 2.0,
- border_width: 0.0,
- border_color: Color::TRANSPARENT,
- });
+ style.dot_color,
+ );
}
}