Skip to content

Commit

Permalink
Update auto scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxxcode committed Jan 28, 2024
1 parent be93aaa commit 5e27b12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/create_directory_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl CreateDirectoryDialog {
let response = ui.text_edit_singleline(&mut self.input);

if self.init {
response.scroll_to_me(None);
response.scroll_to_me(Some(egui::Align::Center));
response.request_focus();

self.error = self.validate_input();
Expand Down
2 changes: 1 addition & 1 deletion src/file_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl FileDialog {
ui.selectable_label(selected, format!("{} {}", icon, file_name));

if selected && self.scroll_to_selection {
response.scroll_to_me(None);
response.scroll_to_me(Some(egui::Align::Center));
self.scroll_to_selection = false;
}

Expand Down

0 comments on commit 5e27b12

Please sign in to comment.