mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
fix(app): the highest episode row on screen no longer stretches to the window bottom
The watched and download buttons were laid out with with_layout(right_to_left, Center), which takes every point of height the scroll area has left and centres the buttons in it. Give the cluster the still's height instead.
This commit is contained in:
1 parent
558446b9e4
commit
2128a2d705
1 file changed
+7
-2
@@ -643,8 +643,13 @@ fn episode_row(
|
||||
}
|
||||
});
|
||||
|
||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
|
||||
ui.set_min_height(STILL.y);
|
||||
// A fixed height, the still's. `with_layout` would hand the
|
||||
// buttons all the height left in the scroll area's viewport and
|
||||
// centre them in it, so whichever row sat highest on screen
|
||||
// stretched down to the bottom of the window.
|
||||
let cluster = egui::vec2(ui.available_width(), STILL.y);
|
||||
let layout = egui::Layout::right_to_left(egui::Align::Center);
|
||||
ui.allocate_ui_with_layout(cluster, layout, |ui| {
|
||||
if ui::widgets::watched_mark(ui, watched)
|
||||
.on_hover_text(if watched {
|
||||
"Mark unwatched"
|
||||
|
||||
Reference in new issue
Block a user