mirror of
https://github.com/veeso/termscp.git
synced 2026-04-12 13:11:44 -07:00
Redraw UI on window resize
This commit is contained in:
committed by
Christian Visintin
parent
c1edc20462
commit
edd0842273
@@ -69,6 +69,7 @@ impl Component<Msg, NoUserEvent> for GlobalListener {
|
||||
code: Key::Char('h') | Key::Function(1),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
}) => Some(Msg::Ui(UiMsg::ShowKeybindingsPopup)),
|
||||
Event::WindowResize(_, _) => Some(Msg::Ui(UiMsg::WindowResized)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ enum UiMsg {
|
||||
ShowSymlinkPopup,
|
||||
ToggleHiddenFiles,
|
||||
ToggleSyncBrowsing,
|
||||
WindowResized,
|
||||
}
|
||||
|
||||
/// Log level type
|
||||
|
||||
@@ -503,6 +503,9 @@ impl FileTransferActivity {
|
||||
self.browser.toggle_sync_browsing();
|
||||
self.refresh_remote_status_bar();
|
||||
}
|
||||
UiMsg::WindowResized => {
|
||||
self.redraw = true;
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
@@ -896,6 +896,7 @@ impl FileTransferActivity {
|
||||
}),
|
||||
Self::no_popup_mounted_clause(),
|
||||
),
|
||||
Sub::new(SubEventClause::WindowResize, SubClause::Always)
|
||||
]
|
||||
)
|
||||
.is_ok());
|
||||
|
||||
Reference in New Issue
Block a user