mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Fix center-column regression
Mistake introduced along with the horizontal gesture.
This commit is contained in:
+2
-11
@@ -171,15 +171,6 @@ impl OutputId {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ViewOffsetAdjustment {
|
|
||||||
pub fn current_view_offset(&self) -> f64 {
|
|
||||||
match self {
|
|
||||||
ViewOffsetAdjustment::Animation(anim) => anim.value(),
|
|
||||||
ViewOffsetAdjustment::Gesture(gesture) => gesture.current_view_offset,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ColumnWidth {
|
impl ColumnWidth {
|
||||||
fn resolve(self, options: &Options, view_width: i32) -> i32 {
|
fn resolve(self, options: &Options, view_width: i32) -> i32 {
|
||||||
match self {
|
match self {
|
||||||
@@ -401,8 +392,8 @@ impl<W: LayoutElement> Workspace<W> {
|
|||||||
|
|
||||||
let new_col_x = self.column_x(idx);
|
let new_col_x = self.column_x(idx);
|
||||||
|
|
||||||
let final_x = if let Some(adj) = &self.view_offset_adj {
|
let final_x = if let Some(ViewOffsetAdjustment::Animation(anim)) = &self.view_offset_adj {
|
||||||
current_x - self.view_offset + adj.current_view_offset().round() as i32
|
current_x - self.view_offset + anim.to().round() as i32
|
||||||
} else {
|
} else {
|
||||||
current_x
|
current_x
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user