Skip to content

Commit

Permalink
Replace "an ui" with "a ui" (#5185)
Browse files Browse the repository at this point in the history
Since ui's initial sound is a "y", it should be "a ui", not "an ui". 
Replaced case-sensitively using regex `([aA])n ([uU][iI])` replacement
`$1 $2`

* [x] I have followed the instructions in the PR template
  • Loading branch information
MeGaGiGaGon authored Sep 30, 2024
1 parent 59d7183 commit 679f6f5
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ egui_extras::install_image_loaders(egui_ctx);
* Added `Slider::step_by` ([1225](https://github.com/emilk/egui/pull/1225)).
* Added `Context::move_to_top` and `Context::top_most_layer` for managing the layer on the top ([#1242](https://github.com/emilk/egui/pull/1242)).
* Support a subset of macOS' emacs input field keybindings in `TextEdit` ([#1243](https://github.com/emilk/egui/pull/1243)).
* Added ability to scroll an UI into view without specifying an alignment ([1247](https://github.com/emilk/egui/pull/1247)).
* Added ability to scroll a UI into view without specifying an alignment ([1247](https://github.com/emilk/egui/pull/1247)).
* Added `Ui::scroll_to_rect` ([1252](https://github.com/emilk/egui/pull/1252)).

### 🔧 Changed
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ impl Region {
}

/// Ensure we are big enough to contain the given X-coordinate.
/// This is sometimes useful to expand an ui to stretch to a certain place.
/// This is sometimes useful to expand a ui to stretch to a certain place.
pub fn expand_to_include_x(&mut self, x: f32) {
self.min_rect.extend_with_x(x);
self.max_rect.extend_with_x(x);
self.cursor.extend_with_x(x);
}

/// Ensure we are big enough to contain the given Y-coordinate.
/// This is sometimes useful to expand an ui to stretch to a certain place.
/// This is sometimes useful to expand a ui to stretch to a certain place.
pub fn expand_to_include_y(&mut self, y: f32) {
self.min_rect.extend_with_y(y);
self.max_rect.extend_with_y(y);
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,13 +916,13 @@ impl Ui {
}

/// Ensure we are big enough to contain the given x-coordinate.
/// This is sometimes useful to expand an ui to stretch to a certain place.
/// This is sometimes useful to expand a ui to stretch to a certain place.
pub fn expand_to_include_x(&mut self, x: f32) {
self.placer.expand_to_include_x(x);
}

/// Ensure we are big enough to contain the given y-coordinate.
/// This is sometimes useful to expand an ui to stretch to a certain place.
/// This is sometimes useful to expand a ui to stretch to a certain place.
pub fn expand_to_include_y(&mut self, y: f32) {
self.placer.expand_to_include_y(y);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
/// }
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Button<'a> {
image: Option<Image<'a>>,
text: Option<WidgetText>,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
/// ui.add(egui::Checkbox::new(&mut my_bool, "Checked"));
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Checkbox<'a> {
checked: &'a mut bool,
text: WidgetText,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/drag_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn set(get_set_value: &mut GetSetValue<'_>, value: f64) {
/// ui.add(egui::DragValue::new(&mut my_f32).speed(0.1));
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct DragValue<'a> {
get_set_value: GetSetValue<'a>,
speed: f64,
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/widgets/hyperlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use self::text_selection::LabelSelectionState;
/// }
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Link {
text: WidgetText,
}
Expand Down Expand Up @@ -88,7 +88,7 @@ impl Widget for Link {
/// ui.add(egui::Hyperlink::from_label_and_url("My favorite repo", "https://github.com/emilk/egui"));
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Hyperlink {
url: String,
text: WidgetText,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use crate::{
/// # });
/// ```
///
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
#[derive(Debug, Clone)]
pub struct Image<'a> {
source: ImageSource<'a>,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/image_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};

/// A clickable image within a frame.
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
#[derive(Clone, Debug)]
pub struct ImageButton<'a> {
pub(crate) image: Image<'a>,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use self::text_selection::LabelSelectionState;
///
/// For full control of the text you can use [`crate::text::LayoutJob`]
/// as argument to [`Self::new`].
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Label {
text: WidgetText,
wrap_mode: Option<TextWrapMode>,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub use self::{
/// Tip: you can `impl Widget for &mut YourThing { }`.
///
/// `|ui: &mut Ui| -> Response { … }` also implements [`Widget`].
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub trait Widget {
/// Allocate space, interact, paint, and return a [`Response`].
///
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/progress_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enum ProgressBarText {
/// A simple progress bar.
///
/// See also: [`crate::Spinner`].
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct ProgressBar {
progress: f32,
desired_width: Option<f32>,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/radio_button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::{
/// }
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct RadioButton {
checked: bool,
text: WidgetText,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/selected_label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{NumExt, Response, Sense, TextStyle, Ui, Widget, WidgetInfo, WidgetTe
/// }
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct SelectableLabel {
selected: bool,
text: WidgetText,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/separator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{vec2, Response, Sense, Ui, Vec2, Widget};
/// ui.add(egui::Separator::default());
/// # });
/// ```
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Separator {
spacing: f32,
grow: f32,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub enum SliderClamping {
/// ```
///
/// The default [`Slider`] size is set by [`crate::style::Spacing::slider_width`].
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct Slider<'a> {
get_set_value: GetSetValue<'a>,
range: RangeInclusive<f64>,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/spinner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{Response, Sense, Ui, Widget, WidgetInfo, WidgetType};
/// A spinner widget used to indicate loading.
///
/// See also: [`crate::ProgressBar`].
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
#[derive(Default)]
pub struct Spinner {
/// Uses the style's `interact_size` if `None`.
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/text_edit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ use super::{TextEditOutput, TextEditState};
///
/// ## Other
/// The background color of a [`crate::TextEdit`] is [`crate::Visuals::extreme_bg_color`].
#[must_use = "You should put this widget in an ui with `ui.add(widget);`"]
#[must_use = "You should put this widget in a ui with `ui.add(widget);`"]
pub struct TextEdit<'t> {
text: &'t mut dyn TextBuffer,
hint_text: WidgetText,
Expand Down

0 comments on commit 679f6f5

Please sign in to comment.