Append _fit to animate_view_offset_to_column()
Browse files at this commit077f22edd6e562e2cfed626afaedd095997eb013Parent: 4f7c3301 changed file +6 -6
- src/layout/workspace.rs +6 -6
src/layout/workspace.rsmodified+6 -6
| @@ -428,7 +428,7 @@ impl<W: LayoutElement> Workspace<W> { | ||
| 428 | 428 | )); |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | - fn animate_view_offset_to_column(&mut self, current_x: i32, idx: usize) { | |
| 431 | + fn animate_view_offset_to_column_fit(&mut self, current_x: i32, idx: usize) { | |
| 432 | 432 | let new_view_offset = self.compute_new_view_offset_for_column(current_x, idx); |
| 433 | 433 | self.animate_view_offset(current_x, idx, new_view_offset); |
| 434 | 434 | } |
| @@ -440,7 +440,7 @@ impl<W: LayoutElement> Workspace<W> { | ||
| 440 | 440 | |
| 441 | 441 | let col = &self.columns[idx]; |
| 442 | 442 | if col.is_fullscreen { |
| 443 | - self.animate_view_offset_to_column(current_x, idx); | |
| 443 | + self.animate_view_offset_to_column_fit(current_x, idx); | |
| 444 | 444 | return; |
| 445 | 445 | } |
| 446 | 446 | |
| @@ -450,7 +450,7 @@ impl<W: LayoutElement> Workspace<W> { | ||
| 450 | 450 | // edge alignment by the usual positioning code, so there's no use in trying to center it |
| 451 | 451 | // here. |
| 452 | 452 | if self.working_area.size.w <= width { |
| 453 | - self.animate_view_offset_to_column(current_x, idx); | |
| 453 | + self.animate_view_offset_to_column_fit(current_x, idx); | |
| 454 | 454 | return; |
| 455 | 455 | } |
| 456 | 456 | |
| @@ -493,12 +493,12 @@ impl<W: LayoutElement> Workspace<W> { | ||
| 493 | 493 | |
| 494 | 494 | // If it fits together, do a normal animation, otherwise center the new column. |
| 495 | 495 | if total_width <= self.working_area.size.w { |
| 496 | - self.animate_view_offset_to_column(current_x, idx); | |
| 496 | + self.animate_view_offset_to_column_fit(current_x, idx); | |
| 497 | 497 | } else { |
| 498 | 498 | self.animate_view_offset_to_column_centered(current_x, idx); |
| 499 | 499 | } |
| 500 | 500 | } |
| 501 | - CenterFocusedColumn::Never => self.animate_view_offset_to_column(current_x, idx), | |
| 501 | + CenterFocusedColumn::Never => self.animate_view_offset_to_column_fit(current_x, idx), | |
| 502 | 502 | }; |
| 503 | 503 | |
| 504 | 504 | self.active_column_idx = idx; |
| @@ -771,7 +771,7 @@ impl<W: LayoutElement> Workspace<W> { | ||
| 771 | 771 | // continuously resizing windows not look janky. |
| 772 | 772 | self.animate_view_offset_to_column_centered(current_x, idx); |
| 773 | 773 | } else { |
| 774 | - self.animate_view_offset_to_column(current_x, idx); | |
| 774 | + self.animate_view_offset_to_column_fit(current_x, idx); | |
| 775 | 775 | } |
| 776 | 776 | } |
| 777 | 777 | } |