Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some comments #2317

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/background.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub enum Background {
}

impl Background {
/// Scales the the alpha channel of the [`Background`] by the given
/// Scales the alpha channel of the [`Background`] by the given
/// factor.
pub fn scale_alpha(self, factor: f32) -> Self {
match self {
Expand Down
2 changes: 1 addition & 1 deletion core/src/widget/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ where
}
}

/// The apperance of some text.
/// The appearance of some text.
#[derive(Debug, Clone, Copy, Default)]
pub struct Appearance {
/// The [`Color`] of the text.
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cargo run --package integration_wgpu
```

### How to run this example with WebGL backend
NOTE: Currently, WebGL backend is is still experimental, so expect bugs.
NOTE: Currently, WebGL backend is still experimental, so expect bugs.

```sh
# 0. Install prerequisites
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {

// Run event loop
event_loop.run(move |event, window_target| {
// You should change this if you want to render continuosly
// You should change this if you want to render continuously
window_target.set_control_flow(ControlFlow::Wait);

match event {
Expand Down
4 changes: 2 additions & 2 deletions graphics/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum Error {
#[error("a suitable graphics adapter or device could not be found")]
GraphicsAdapterNotFound,

/// An error occured in the context's internal backend
#[error("an error occured in the context's internal backend")]
/// An error occurred in the context's internal backend
#[error("an error occurred in the context's internal backend")]
BackendError(String),
}
2 changes: 1 addition & 1 deletion wgpu/src/shader/quad.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn rounded_box_sdf(to_center: vec2<f32>, size: vec2<f32>, radius: f32) -> f32 {
return length(max(abs(to_center) - size + vec2<f32>(radius, radius), vec2<f32>(0.0, 0.0))) - radius;
}

// Based on the fragement position and the center of the quad, select one of the 4 radi.
// Based on the fragment position and the center of the quad, select one of the 4 radi.
// Order matches CSS border radius attribute:
// radi.x = top-left, radi.y = top-right, radi.z = bottom-right, radi.w = bottom-left
fn select_border_radius(radi: vec4<f32>, position: vec2<f32>, center: vec2<f32>) -> f32 {
Expand Down
2 changes: 1 addition & 1 deletion widget/src/image/viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ where
};

// Only calculate viewport sizes if the images are constrained to a limited space.
// If they are Fill|Portion let them expand within their alotted space.
// If they are Fill|Portion let them expand within their allotted space.
match expansion_size {
Length::Shrink | Length::Fixed(_) => {
let aspect_ratio = width as f32 / height as f32;
Expand Down
Loading