Pull Checkbox default constants from its Renderer
This commit is contained in:
parent
668f627532
commit
6922160423
6 changed files with 28 additions and 31 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -6,13 +6,8 @@ use iced_native::{
|
|||
|
||||
use std::f32;
|
||||
|
||||
// TODO: Obtain from renderer configuration
|
||||
const DEFAULT_TEXT_SIZE: f32 = 20.0;
|
||||
|
||||
impl text::Renderer for Renderer {
|
||||
fn default_size(&self) -> u16 {
|
||||
DEFAULT_TEXT_SIZE as u16
|
||||
}
|
||||
const DEFAULT_SIZE: u16 = 20;
|
||||
|
||||
fn measure(
|
||||
&self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue