forge
Explore
Log in

Don't you dare go Hollow

The equalizer card stays inside the window

Browse files at this commit

33db3c025b5a85d26932f9c59f5e69a6b9a94ae3Ahmet Kaan GümüşParent: cd9aea8
  • fix
    • the equalizer card stays inside the window
Show full message
🐛 fix(ui): the equalizer card stays inside the window

The card is docked in the inspector now, and it was still asking for
`eq_card_w` of the room outright -- a floor of 480 px in a column of
307 at 1280x720, so a third of the card hung off the right edge of the
window with the Q stepper and the spectrum switch on it. A cap over
`w_full`, which is how the two cards beside it are built, and the row
of numbers wraps rather than running past the edge it is capped to.
crates/app/src/ui/cards.rsmodified+12 -1
@@ -763,7 +763,14 @@ impl Player {
763763 )
764764 .child(
765765 div()
766- .w(px(eq_card_w(f32::from(viewport.width))))
766+ // A cap, not a width: the card is docked in the
767+ // inspector now, and that column is narrower than the
768+ // floor a graph wants -- asking for [`eq_card_w`]
769+ // outright hung the card's right-hand third off the edge
770+ // of the window. The two cards beside it are built this
771+ // way for the same reason.
772+ .w_full()
773+ .max_w(px(eq_card_w(f32::from(viewport.width))))
767774 .on_mouse_down(MouseButton::Left, swallow)
768775 .flex()
769776 .flex_col()
@@ -899,6 +906,10 @@ impl Player {
899906 let row = div()
900907 .flex_none()
901908 .flex()
909+ // Three numbers and their steppers are wider than the inspector
910+ // column: without this the Q pair and the flatten button hang off
911+ // the card, which off the right-hand column means off the window.
912+ .flex_wrap()
902913 .items_center()
903914 .gap(px(10.))
904915 .px(px(6.))