Move all operations to widget::operation module

This commit is contained in:
Héctor Ramón Jiménez 2025-08-23 03:54:54 +02:00
parent 885d45f435
commit 34a42b5ad4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
14 changed files with 124 additions and 136 deletions

View file

@ -5,8 +5,8 @@ use iced::clipboard;
use iced::highlighter;
use iced::time::{self, Instant, milliseconds};
use iced::widget::{
self, button, center_x, container, horizontal_space, hover, image,
markdown, right, row, scrollable, sensor, text_editor, toggler,
button, center_x, container, horizontal_space, hover, image, markdown,
operation, right, row, scrollable, sensor, text_editor, toggler,
};
use iced::window;
use iced::{
@ -78,7 +78,7 @@ impl Markdown {
theme: Theme::TokyoNight,
now: Instant::now(),
},
widget::focus_next(),
operation::focus_next(),
)
}
@ -140,10 +140,7 @@ impl Markdown {
pending: self.raw.text(),
};
scrollable::snap_to(
"preview",
scrollable::RelativeOffset::END,
)
operation::snap_to_end("preview")
} else {
self.mode = Mode::Preview;