Fix center-column regression
Browse files at this commit6e5426ef225f5720a97cf7e2def25132bfc2cf0cParent: 202406a1 changed file +2 -11
- src/layout/workspace.rs +2 -11
src/layout/workspace.rsmodified+2 -11
| @@ -171,15 +171,6 @@ impl OutputId { | |||
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | -impl ViewOffsetAdjustment { | ||
| 175 | - pub fn current_view_offset(&self) -> f64 { | ||
| 176 | - match self { | ||
| 177 | - ViewOffsetAdjustment::Animation(anim) => anim.value(), | ||
| 178 | - ViewOffsetAdjustment::Gesture(gesture) => gesture.current_view_offset, | ||
| 179 | - } | ||
| 180 | - } | ||
| 181 | -} | ||
| 182 | - | ||
| 183 | impl ColumnWidth { | 174 | impl ColumnWidth { |
| 184 | fn resolve(self, options: &Options, view_width: i32) -> i32 { | 175 | fn resolve(self, options: &Options, view_width: i32) -> i32 { |
| 185 | match self { | 176 | match self { |
| @@ -401,8 +392,8 @@ impl<W: LayoutElement> Workspace<W> { | |||
| 401 | 392 | ||
| 402 | let new_col_x = self.column_x(idx); | 393 | let new_col_x = self.column_x(idx); |
| 403 | 394 | ||
| 404 | - let final_x = if let Some(adj) = &self.view_offset_adj { | 395 | + let final_x = if let Some(ViewOffsetAdjustment::Animation(anim)) = &self.view_offset_adj { |
| 405 | - current_x - self.view_offset + adj.current_view_offset().round() as i32 | 396 | + current_x - self.view_offset + anim.to().round() as i32 |
| 406 | } else { | 397 | } else { |
| 407 | current_x | 398 | current_x |
| 408 | }; | 399 | }; |