Implement Widget::draw for Checkbox
This commit is contained in:
parent
7c08c6bd13
commit
1397be38ca
4 changed files with 75 additions and 19 deletions
|
|
@ -35,6 +35,10 @@ impl Renderer for Null {
|
|||
impl renderer::Text for Null {
|
||||
type Font = Font;
|
||||
|
||||
const ICON_FONT: Font = Font::Default;
|
||||
const CHECKMARK_ICON: char = '0';
|
||||
const ARROW_DOWN_ICON: char = '0';
|
||||
|
||||
fn default_size(&self) -> u16 {
|
||||
20
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,19 @@ pub trait Text: Renderer {
|
|||
/// The font type used.
|
||||
type Font: Default + Copy;
|
||||
|
||||
/// The icon font of the backend.
|
||||
const ICON_FONT: Self::Font;
|
||||
|
||||
/// The `char` representing a ✔ icon in the [`ICON_FONT`].
|
||||
///
|
||||
/// [`ICON_FONT`]: Self::ICON_FONT
|
||||
const CHECKMARK_ICON: char;
|
||||
|
||||
/// The `char` representing a ▼ icon in the built-in [`ICON_FONT`].
|
||||
///
|
||||
/// [`ICON_FONT`]: Self::ICON_FONT
|
||||
const ARROW_DOWN_ICON: char;
|
||||
|
||||
/// Returns the default size of [`Text`].
|
||||
fn default_size(&self) -> u16;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue