Write documentation for iced_core
This commit is contained in:
parent
63dbf078fe
commit
d3553adf27
16 changed files with 216 additions and 44 deletions
|
|
@ -12,6 +12,7 @@ use crate::{Color, Font, Length};
|
|||
/// .size(40);
|
||||
/// ```
|
||||
#[derive(Debug, Clone)]
|
||||
#[allow(missing_docs)]
|
||||
pub struct Text {
|
||||
pub content: String,
|
||||
pub size: Option<u16>,
|
||||
|
|
@ -48,14 +49,19 @@ impl Text {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the `Color` of the [`Text`].
|
||||
/// Sets the [`Color`] of the [`Text`].
|
||||
///
|
||||
/// [`Text`]: struct.Text.html
|
||||
/// [`Color`]: ../../struct.Color.html
|
||||
pub fn color<C: Into<Color>>(mut self, color: C) -> Self {
|
||||
self.color = Some(color.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the [`Font`] of the [`Text`].
|
||||
///
|
||||
/// [`Text`]: struct.Text.html
|
||||
/// [`Font`]: ../../struct.Font.html
|
||||
pub fn font(mut self, font: Font) -> Self {
|
||||
self.font = font;
|
||||
self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue