ui: Clean up doc comments for Vector
(#17834)
This PR cleans up the doc comments for the `Vector` component. Release Notes: - N/A
This commit is contained in:
parent
d56fa25830
commit
6f337de440
1 changed files with 6 additions and 6 deletions
|
@ -27,9 +27,9 @@ pub enum VectorName {
|
||||||
|
|
||||||
/// A vector image, such as an SVG.
|
/// A vector image, such as an SVG.
|
||||||
///
|
///
|
||||||
/// A [Vector] is different from an [Icon] in that it is intended
|
/// A [`Vector`] is different from an [`Icon`] in that it is intended
|
||||||
/// to be displayed at a specific size, or series of sizes, rather
|
/// to be displayed at a specific size, or series of sizes, rather
|
||||||
/// than conforming to the standard size of an icons.
|
/// than conforming to the standard size of an icon.
|
||||||
#[derive(IntoElement)]
|
#[derive(IntoElement)]
|
||||||
pub struct Vector {
|
pub struct Vector {
|
||||||
path: &'static str,
|
path: &'static str,
|
||||||
|
@ -38,7 +38,7 @@ pub struct Vector {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Vector {
|
impl Vector {
|
||||||
/// Create a new [Vector] image with the given [VectorName] and size.
|
/// Creates a new [`Vector`] image with the given [`VectorName`] and size.
|
||||||
pub fn new(vector: VectorName, width: Rems, height: Rems) -> Self {
|
pub fn new(vector: VectorName, width: Rems, height: Rems) -> Self {
|
||||||
Self {
|
Self {
|
||||||
path: vector.path(),
|
path: vector.path(),
|
||||||
|
@ -47,18 +47,18 @@ impl Vector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new [Vector] image where the width and height are the same.
|
/// Creates a new [`Vector`] image where the width and height are the same.
|
||||||
pub fn square(vector: VectorName, size: Rems) -> Self {
|
pub fn square(vector: VectorName, size: Rems) -> Self {
|
||||||
Self::new(vector, size, size)
|
Self::new(vector, size, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the image color
|
/// Sets the vector color.
|
||||||
pub fn color(mut self, color: Color) -> Self {
|
pub fn color(mut self, color: Color) -> Self {
|
||||||
self.color = color;
|
self.color = color;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the image size
|
/// Sets the vector size.
|
||||||
pub fn size(mut self, size: impl Into<Size<Rems>>) -> Self {
|
pub fn size(mut self, size: impl Into<Size<Rems>>) -> Self {
|
||||||
let size = size.into();
|
let size = size.into();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue