Add basic methods into NavigatedPage

This commit is contained in:
2026-08-13 22:03:47 +03:00
parent d8e7cbbc36
commit 4ca7aa7044
17 changed files with 590 additions and 324 deletions
+19 -18
View File
@@ -25,6 +25,25 @@ impl NavigatedPage<HistoryMessage> for HistoryState {
}
fn navigated(&mut self) {
}
fn update(&mut self, _: HistoryMessage) -> Task<RootMessage> {
Task::none()
}
fn view(&self) -> Element<'_, HistoryMessage> {
back_overlay(
iced::widget::row![
horizontal().width(FillPortion(1)),
scrollable(self.history_lines().padding(DEFAULT_SPACING))
.height(Fill)
.width(FillPortion(5)),
horizontal().width(FillPortion(1))
]
.height(Fill)
.width(Fill)
.into(),
Back,
)
}
}
impl HistoryState {
@@ -49,25 +68,7 @@ impl HistoryState {
}
}
pub fn update(&mut self, _: HistoryMessage) -> Task<RootMessage> {
Task::none()
}
pub fn view(&self) -> Element<'_, HistoryMessage> {
back_overlay(
iced::widget::row![
horizontal().width(FillPortion(1)),
scrollable(self.history_lines().padding(DEFAULT_SPACING))
.height(Fill)
.width(FillPortion(5)),
horizontal().width(FillPortion(1))
]
.height(Fill)
.width(Fill)
.into(),
Back,
)
}
fn history_lines(&self) -> Column<'_, HistoryMessage> {
let mut column = Column::new();