Added ability to drag windows.
This commit is contained in:
parent
0e4f2324f5
commit
4cea15f4f1
3 changed files with 129 additions and 46 deletions
|
|
@ -50,6 +50,12 @@ class Position(StructureBase):
|
|||
other = Position.from_value(other)
|
||||
return Position(self.x-other.x, self.y-other.y)
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.x == other.x and self.y == other.y
|
||||
|
||||
def __ne__(self, other):
|
||||
return not(self == other)
|
||||
|
||||
@classmethod
|
||||
def from_value(cls, value):
|
||||
if not value:
|
||||
|
|
@ -75,6 +81,12 @@ class Size(StructureBase):
|
|||
other = Size.from_value(other)
|
||||
return Size(self.width-other.width, self.height-other.height)
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.width == other.width and self.height == other.height
|
||||
|
||||
def __ne__(self, other):
|
||||
return not(self == other)
|
||||
|
||||
@classmethod
|
||||
def from_value(cls, value):
|
||||
if not value:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue