forge
Explore
Log in

Don't you dare go Hollow

The library still lists what was imported at the 640x360 floor

Browse files at this commit

c003414fe96cbb26bb963b87e930bed897cc32a2Ahmet Kaan GümüşParent: 5a36eae
  • fix
    • the library still lists what was imported at the 640x360 floor
Show full message
🐛 fix(ui): the library still lists what was imported at the 640x360 floor

Five stacked things in that column want 140 px and the floor gives the
region 136, so the one child allowed to shrink -- the media list -- was
shrunk to nothing: tabs, an Import button, a dimmed way to add at the
playhead, and no sign of the file that had just been imported. Found by
photographing the floor, not by reading the layout.

The list keeps a row's height at minimum and the column carries the
remainder on its own scroll, which is the answer the lanes and the inspector
already give. Everything in it stays reachable; nothing is clipped.
crates/app/src/ui/library.rsmodified+12 -1
@@ -212,6 +212,7 @@ impl Player {
212 })212 })
213 .collect();213 .collect();
214 div()214 div()
215+ .id("library")
215 .flex_none()216 .flex_none()
216 .w(px(width))217 .w(px(width))
217 .h_full()218 .h_full()
@@ -220,6 +221,14 @@ impl Player {
220 .gap(px(6.))221 .gap(px(6.))
221 .p(px(8.))222 .p(px(8.))
222 .bg(rgb(BG_PANEL))223 .bg(rgb(BG_PANEL))
224+ // The column itself scrolls at a short window. Its five stacked
225+ // things want 140 px and the 640x360 floor gives the region 136, so
226+ // the list -- the only child that may shrink -- was being squeezed to
227+ // nothing: tabs, an Import button, a way to add at the playhead, and
228+ // no sight of what had been imported. Everything keeps its own size
229+ // and the column carries the remainder, which is the same answer the
230+ // lanes and the inspector give.
231+ .overflow_y_scroll()
223 .child(232 .child(
224 div()233 div()
225 .flex_none()234 .flex_none()
@@ -299,7 +308,9 @@ impl Player {
299 div()308 div()
300 .id("library-rows")309 .id("library-rows")
301 .flex_1()310 .flex_1()
302- .min_h(px(0.))311+ // Never nothing: a media list with no room left is a library
312+ // column that has stopped being a library column.
313+ .min_h(px(ROW_H))
303 .flex()314 .flex()
304 .flex_col()315 .flex_col()
305 .gap(px(2.))316 .gap(px(2.))