From 692216042307c0ff0d792d1bba6928e499a65d1f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 18 Feb 2020 02:28:15 +0100 Subject: Pull `Checkbox` default constants from its `Renderer` --- native/src/renderer/null.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'native/src/renderer') diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index 2e0b6f32..0fcce5ad 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -47,9 +47,7 @@ impl row::Renderer for Null { } impl text::Renderer for Null { - fn default_size(&self) -> u16 { - 20 - } + const DEFAULT_SIZE: u16 = 20; fn measure( &self, @@ -179,9 +177,8 @@ impl radio::Renderer for Null { impl checkbox::Renderer for Null { type Style = (); - fn default_size(&self) -> u32 { - 20 - } + const DEFAULT_SIZE: u16 = 20; + const DEFAULT_SPACING: u16 = 15; fn draw( &mut self, -- cgit