mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-25 22:20:53 +03:00
fix incorrect orientation of layer surfaces
top and bottom surfaces were not sized & oriented correctly closes #3
This commit is contained in:
@@ -9,6 +9,18 @@ pub enum Position {
|
||||
Top,
|
||||
Bottom,
|
||||
}
|
||||
|
||||
impl Position {
|
||||
pub fn opposite(&self) -> Self {
|
||||
match self {
|
||||
Position::Left => Self::Right,
|
||||
Position::Right => Self::Left,
|
||||
Position::Top => Self::Bottom,
|
||||
Position::Bottom => Self::Top,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Position {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", match self {
|
||||
|
||||
Reference in New Issue
Block a user