mirror of
https://github.com/veeso/termscp.git
synced 2026-09-27 14:31:18 -07:00
Redraw UI on window resize
This commit is contained in:
committed by
Christian Visintin
parent
c1edc20462
commit
edd0842273
@@ -84,6 +84,7 @@ impl Component<Msg, NoUserEvent> for GlobalListener {
|
||||
code: Key::Char('s'),
|
||||
modifiers: KeyModifiers::CONTROL,
|
||||
}) => Some(Msg::Ui(UiMsg::ShowSaveBookmarkPopup)),
|
||||
Event::WindowResize(_, _) => Some(Msg::Ui(UiMsg::WindowResized)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ pub enum UiMsg {
|
||||
ShowSaveBookmarkPopup,
|
||||
UsernameBlurDown,
|
||||
UsernameBlurUp,
|
||||
WindowResized,
|
||||
}
|
||||
|
||||
/// Auth form input mask
|
||||
|
||||
@@ -255,6 +255,9 @@ impl AuthActivity {
|
||||
UiMsg::UsernameBlurUp => {
|
||||
assert!(self.app.active(&Id::Port).is_ok());
|
||||
}
|
||||
UiMsg::WindowResized => {
|
||||
self.redraw = true;
|
||||
}
|
||||
}
|
||||
|
||||
None
|
||||
|
||||
@@ -842,6 +842,7 @@ impl AuthActivity {
|
||||
}),
|
||||
Self::no_popup_mounted_clause(),
|
||||
),
|
||||
Sub::new(SubEventClause::WindowResize, SubClause::Always)
|
||||
]
|
||||
)
|
||||
.is_ok());
|
||||
|
||||
Reference in New Issue
Block a user