Pull Checkbox default constants from its Renderer

This commit is contained in:
Héctor Ramón Jiménez 2020-02-18 02:28:15 +01:00
parent 668f627532
commit 6922160423
6 changed files with 28 additions and 31 deletions

View file

@ -3,14 +3,11 @@ use iced_native::{
checkbox, HorizontalAlignment, MouseCursor, Rectangle, VerticalAlignment,
};
const SIZE: f32 = 28.0;
impl checkbox::Renderer for Renderer {
type Style = Box<dyn StyleSheet>;
fn default_size(&self) -> u32 {
SIZE as u32
}
const DEFAULT_SIZE: u16 = 20;
const DEFAULT_SPACING: u16 = 15;
fn draw(
&mut self,