gpui: Further docs refinement & moved some reexports into 'private' module (#3935)
This commit mostly fixes invalid URLs in docstrings. It also encapsulates crates we reexport (serde stuff + linkme) into a public module named "private" in order to reduce the API surfaced through docs. Moreover, I fixed up a bunch of crates that were pulling serde_json in through gpui explicitly instead of using Cargo manifest. Release Notes: - N/A
This commit is contained in:
parent
eb9ddef083
commit
d475f1373a
34 changed files with 91 additions and 72 deletions
|
@ -1582,7 +1582,6 @@ impl From<f32> for Edges<Pixels> {
|
|||
/// Represents the corners of a box in a 2D space, such as border radius.
|
||||
///
|
||||
/// Each field represents the size of the corner on one side of the box: `top_left`, `top_right`, `bottom_right`, and `bottom_left`.
|
||||
/// ```
|
||||
#[derive(Refineable, Clone, Default, Debug, Eq, PartialEq)]
|
||||
#[refineable(Debug)]
|
||||
#[repr(C)]
|
||||
|
@ -2263,7 +2262,7 @@ impl From<f64> for GlobalPixels {
|
|||
}
|
||||
}
|
||||
|
||||
/// Represents a length in rems, a unit based on the font-size of the window, which can be assigned with [WindowContext::set_rem_size].
|
||||
/// Represents a length in rems, a unit based on the font-size of the window, which can be assigned with [`WindowContext::set_rem_size`][set_rem_size].
|
||||
///
|
||||
/// Rems are used for defining lengths that are scalable and consistent across different UI elements.
|
||||
/// The value of `1rem` is typically equal to the font-size of the root element (often the `<html>` element in browsers),
|
||||
|
@ -2271,6 +2270,8 @@ impl From<f64> for GlobalPixels {
|
|||
/// purpose, allowing for scalable and accessible design that can adjust to different display settings or user preferences.
|
||||
///
|
||||
/// For example, if the root element's font-size is `16px`, then `1rem` equals `16px`. A length of `2rems` would then be `32px`.
|
||||
///
|
||||
/// [set_rem_size]: crate::WindowContext::set_rem_size
|
||||
#[derive(Clone, Copy, Default, Add, Sub, Mul, Div, Neg)]
|
||||
pub struct Rems(pub f32);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue