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

[Merged by Bors] - Size::height sets width not height #7478

Closed
wants to merge 10 commits into from

Conversation

ickshonpe
Copy link
Contributor

Objective

pub const fn height(width: Val) -> Self {
        Self {
            width,
            height: Val::DEFAULT,
        }
    }

😓

Solution

Swap width and height.

    * added `width`, `height`, and `all` const functions to `Size`
    * added the constant `Size::FILL`, a `Size` with width and height set to `Val::Percent(100.0)`
…e given value. Fixed it so it sets the value for height.
@ickshonpe ickshonpe changed the title Size::height sets the width not the height Size::height sets width not height Feb 2, 2023
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels Feb 2, 2023
@alice-i-cecile
Copy link
Member

Can you rebase to give better clarity + fix conflicts?

    * added `width`, `height`, and `all` const functions to `Size`
    * added the constant `Size::FILL`, a `Size` with width and height set to `Val::Percent(100.0)`
…e given value. Fixed it so it sets the value for height.
@ickshonpe
Copy link
Contributor Author

Can you rebase to give better clarity + fix conflicts?

I tried, is this right now?

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much clearer. Yes, that's a good fix.

bors r+

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 2, 2023
bors bot pushed a commit that referenced this pull request Feb 2, 2023
# Objective
```rust
pub const fn height(width: Val) -> Self {
        Self {
            width,
            height: Val::DEFAULT,
        }
    }
```
:sweat:

## Solution
Swap `width` and `height`.
@bors bors bot changed the title Size::height sets width not height [Merged by Bors] - Size::height sets width not height Feb 2, 2023
@bors bors bot closed this Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants