Skip to content

Commit

Permalink
radio now accepts size and padding for the individual Radio of the gr…
Browse files Browse the repository at this point in the history
…oup.
  • Loading branch information
josefc12 committed May 3, 2024
1 parent 06aa110 commit 9960b42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions druid/src/widget/radio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use crate::widget::{Axis, CrossAxisAlignment, Flex, Label, LabelText};
use crate::{theme, Data, LinearGradient, UnitPoint};
use tracing::{instrument, trace};

const DEFAULT_RADIO_RADIUS: f64 = 7.0;
const INNER_CIRCLE_RADIUS: f64 = 2.0;
//const DEFAULT_RADIO_RADIUS: f64 = 7.0;
//const INNER_CIRCLE_RADIUS: f64 = 2.0;
/// A group of radio buttons
#[derive(Debug, Clone)]
pub struct RadioGroup;
Expand Down Expand Up @@ -171,7 +171,7 @@ impl<T: Data + PartialEq> Widget<T> for Radio<T> {

// Check if data enum matches our variant
if *data == self.variant {
let inner_circle = Circle::new((size / 2., size / 2.), (size/3.).ceil());
let inner_circle = Circle::new((size / 2., size / 2.), (size/4.).ceil());

let fill = if ctx.is_disabled() {
env.get(theme::DISABLED_TEXT_COLOR)
Expand Down

0 comments on commit 9960b42

Please sign in to comment.