mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
@@ -2,7 +2,7 @@ use epaint::Shape;
|
||||
|
||||
use crate::{style::WidgetVisuals, *};
|
||||
|
||||
/// Indicate wether or not a popup will be shown above or below the box.
|
||||
/// Indicate whether or not a popup will be shown above or below the box.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum AboveOrBelow {
|
||||
Above,
|
||||
|
||||
@@ -257,7 +257,7 @@ impl GridLayout {
|
||||
|
||||
/// A simple grid layout.
|
||||
///
|
||||
/// The cells are always layed out left to right, top-down.
|
||||
/// The cells are always laid out left to right, top-down.
|
||||
/// The contents of each cell will be aligned to the left and center.
|
||||
///
|
||||
/// If you want to add multiple widgets to a cell you need to group them with
|
||||
|
||||
@@ -423,7 +423,7 @@ impl Painter {
|
||||
self.fonts(|f| f.layout(text, font_id, color, f32::INFINITY))
|
||||
}
|
||||
|
||||
/// Paint text that has already been layed out in a [`Galley`].
|
||||
/// Paint text that has already been laid out in a [`Galley`].
|
||||
///
|
||||
/// You can create the [`Galley`] with [`Self::layout`].
|
||||
///
|
||||
@@ -435,7 +435,7 @@ impl Painter {
|
||||
}
|
||||
}
|
||||
|
||||
/// Paint text that has already been layed out in a [`Galley`].
|
||||
/// Paint text that has already been laid out in a [`Galley`].
|
||||
///
|
||||
/// You can create the [`Galley`] with [`Self::layout`].
|
||||
///
|
||||
|
||||
@@ -508,7 +508,7 @@ pub struct Visuals {
|
||||
/// Draw a vertical lien left of indented region, in e.g. [`crate::CollapsingHeader`].
|
||||
pub indent_has_left_vline: bool,
|
||||
|
||||
/// Wether or not Grids and Tables should be striped by default
|
||||
/// Whether or not Grids and Tables should be striped by default
|
||||
/// (have alternating rows differently colored).
|
||||
pub striped: bool,
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ impl Ui {
|
||||
/// # Sizes etc
|
||||
impl Ui {
|
||||
/// Where and how large the [`Ui`] is already.
|
||||
/// All widgets that have been added ot this [`Ui`] fits within this rectangle.
|
||||
/// All widgets that have been added to this [`Ui`] fits within this rectangle.
|
||||
///
|
||||
/// No matter what, the final Ui will be at least this large.
|
||||
///
|
||||
|
||||
@@ -344,7 +344,7 @@ impl RichText {
|
||||
/// Often a [`WidgetText`] is just a simple [`String`],
|
||||
/// but it can be a [`RichText`] (text with color, style, etc),
|
||||
/// a [`LayoutJob`] (for when you want full control of how the text looks)
|
||||
/// or text that has already been layed out in a [`Galley`].
|
||||
/// or text that has already been laid out in a [`Galley`].
|
||||
#[derive(Clone)]
|
||||
pub enum WidgetText {
|
||||
RichText(RichText),
|
||||
@@ -662,7 +662,7 @@ impl WidgetTextJob {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// Text that has been layed out and ready to be painted.
|
||||
/// Text that has been laid out and ready to be painted.
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct WidgetTextGalley {
|
||||
pub galley: Arc<Galley>,
|
||||
@@ -670,13 +670,13 @@ pub struct WidgetTextGalley {
|
||||
}
|
||||
|
||||
impl WidgetTextGalley {
|
||||
/// Size of the layed out text.
|
||||
/// Size of the laid out text.
|
||||
#[inline]
|
||||
pub fn size(&self) -> crate::Vec2 {
|
||||
self.galley.size()
|
||||
}
|
||||
|
||||
/// Size of the layed out text.
|
||||
/// Size of the laid out text.
|
||||
#[inline]
|
||||
pub fn text(&self) -> &str {
|
||||
self.galley.text()
|
||||
|
||||
Reference in New Issue
Block a user