layout: Extract update_options()

This commit is contained in:
Ivan Molodetskikh
2024-11-26 21:23:20 +03:00
parent 985ca7b643
commit dc14554053
+5 -1
View File
@@ -2400,7 +2400,11 @@ impl<W: LayoutElement> Layout<W> {
}
pub fn update_config(&mut self, config: &Config) {
let options = Rc::new(Options::from_config(config));
self.update_options(Options::from_config(config));
}
fn update_options(&mut self, options: Options) {
let options = Rc::new(options);
if let Some(InteractiveMoveState::Moving(move_)) = &mut self.interactive_move {
let scale = move_.output.current_scale().fractional_scale();