Allow to scroll the window if it becomes too long

This commit is contained in:
Quentin Boyer 2023-11-12 19:51:50 +01:00
parent 017137dc33
commit 1f24117e96

View file

@ -10,7 +10,8 @@ use directories::ProjectDirs;
use iced::{
font, subscription, theme,
widget::{
button, column, component, horizontal_rule, horizontal_space, row, rule, text, text_input,
button, column, component, horizontal_rule, horizontal_space, row, rule, scrollable, text,
text_input,
},
window, Application, Command, Event, Length, Renderer, Settings, Theme,
};
@ -667,6 +668,7 @@ impl Application for Glaurung {
.chain(self.variable.values().flat_map(|(_, f)| f))
.sum::<f64>();
scrollable(
column![
text("Spendings").size(TEXT_H1),
component(FixedAmounts {
@ -722,8 +724,8 @@ impl Application for Glaurung {
on_add: Message::AddSaving,
}),
]
.max_width(500)
.padding(5)
.padding(5),
)
.into()
}