parent
39d45bcbc1
commit
5bd7eaa173
35 changed files with 99 additions and 89 deletions
|
@ -349,8 +349,8 @@ impl ButtonCommon for Button {
|
|||
/// Sets a tooltip for the button.
|
||||
///
|
||||
/// This method allows a tooltip to be set for the button. The tooltip is a function that
|
||||
/// takes a mutable reference to a [`WindowContext`] and returns an [`AnyView`]. The tooltip
|
||||
/// is displayed when the user hovers over the button.
|
||||
/// takes a mutable references to [`Window`] and [`App`], and returns an [`AnyView`]. The
|
||||
/// tooltip is displayed when the user hovers over the button.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
|
@ -31,7 +31,7 @@ pub struct ContentGroup {
|
|||
}
|
||||
|
||||
impl ContentGroup {
|
||||
/// Creates a new [ContentBox].
|
||||
/// Creates a new [`ContentGroup`].
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
base: div(),
|
||||
|
@ -41,13 +41,13 @@ impl ContentGroup {
|
|||
}
|
||||
}
|
||||
|
||||
/// Removes the border from the [ContentBox].
|
||||
/// Removes the border from the [`ContentGroup`].
|
||||
pub fn borderless(mut self) -> Self {
|
||||
self.border = false;
|
||||
self
|
||||
}
|
||||
|
||||
/// Removes the background fill from the [ContentBox].
|
||||
/// Removes the background fill from the [`ContentGroup`].
|
||||
pub fn unfilled(mut self) -> Self {
|
||||
self.fill = false;
|
||||
self
|
||||
|
|
|
@ -28,7 +28,7 @@ pub enum VectorName {
|
|||
|
||||
/// 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 [`crate::Icon`] in that it is intended
|
||||
/// to be displayed at a specific size, or series of sizes, rather
|
||||
/// than conforming to the standard size of an icon.
|
||||
#[derive(IntoElement)]
|
||||
|
|
|
@ -42,8 +42,9 @@ impl Navigable {
|
|||
}
|
||||
|
||||
/// Add a new entry that can be navigated to via keyboard.
|
||||
/// The order of calls to [Navigable::entry] determines the order of traversal of elements via successive
|
||||
/// uses of [menu:::SelectNext]/[menu::SelectPrev]
|
||||
///
|
||||
/// The order of calls to [Navigable::entry] determines the order of traversal of
|
||||
/// elements via successive uses of `menu:::SelectNext/SelectPrev`
|
||||
pub fn entry(mut self, child: NavigableEntry) -> Self {
|
||||
self.selectable_children.push(child);
|
||||
self
|
||||
|
@ -59,6 +60,7 @@ impl Navigable {
|
|||
.position(|entry| entry.focus_handle.contains_focused(window, cx))
|
||||
}
|
||||
}
|
||||
|
||||
impl RenderOnce for Navigable {
|
||||
fn render(self, _window: &mut Window, _: &mut App) -> impl crate::IntoElement {
|
||||
div()
|
||||
|
|
|
@ -5,6 +5,8 @@ use std::sync::Arc;
|
|||
use crate::prelude::*;
|
||||
|
||||
/// A [`Checkbox`] that has a [`Label`].
|
||||
///
|
||||
/// [`Checkbox`]: crate::components::Checkbox
|
||||
#[derive(IntoElement)]
|
||||
pub struct RadioWithLabel {
|
||||
id: ElementId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue