Remove Pixels: Mul<Pixels, Output = Pixels>
impl, add ScaledPixels ops (#27451)
It doesn't make sense to have `Pixels: Mul<Pixels, Output = Pixels>` as the output should be `Pixels^2` (area), so these impls are removed. All code where these impls were used are improved by instead multiplying by `f32` or `usize`. Also adds math op impls that are present for `Pixels` but absent for `ScaledPixels`. Adds missing `Mul<Pixels> for usize` to both. Release Notes: - N/A
This commit is contained in:
parent
581d67398a
commit
9fc570c4be
9 changed files with 120 additions and 56 deletions
|
@ -172,10 +172,10 @@ mod uniform_list {
|
|||
.map(|layout| RenderedIndentGuide {
|
||||
bounds: Bounds::new(
|
||||
point(
|
||||
px(layout.offset.x as f32) * self.indent_size,
|
||||
px(layout.offset.y as f32) * item_height,
|
||||
layout.offset.x * self.indent_size,
|
||||
layout.offset.y * item_height,
|
||||
),
|
||||
size(px(1.), px(layout.length as f32) * item_height),
|
||||
size(px(1.), layout.length * item_height),
|
||||
),
|
||||
layout,
|
||||
is_active: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue