xwayland: allow windows to scale themselves
This commit is contained in:
parent
cc8db84289
commit
19b07fa7dc
40 changed files with 800 additions and 80 deletions
18
src/fixed.rs
18
src/fixed.rs
|
|
@ -1,7 +1,7 @@
|
|||
use std::{
|
||||
cmp::Ordering,
|
||||
fmt::{Debug, Display, Formatter},
|
||||
ops::{Add, AddAssign, Sub, SubAssign},
|
||||
ops::{Add, AddAssign, Div, Mul, Sub, SubAssign},
|
||||
};
|
||||
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
|
||||
|
|
@ -108,6 +108,22 @@ impl Add<i32> for Fixed {
|
|||
}
|
||||
}
|
||||
|
||||
impl Mul<i32> for Fixed {
|
||||
type Output = Self;
|
||||
|
||||
fn mul(self, rhs: i32) -> Self::Output {
|
||||
Self(self.0 * rhs)
|
||||
}
|
||||
}
|
||||
|
||||
impl Div<i32> for Fixed {
|
||||
type Output = Self;
|
||||
|
||||
fn div(self, rhs: i32) -> Self::Output {
|
||||
Self(self.0 / rhs)
|
||||
}
|
||||
}
|
||||
|
||||
impl AddAssign for Fixed {
|
||||
fn add_assign(&mut self, rhs: Self) {
|
||||
self.0 += rhs.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue