1
0
Fork 0
mirror of synced 2024-06-26 18:20:50 +12:00

ImageSize.Preset: Add equality test

This commit is contained in:
loathingKernel 2023-02-08 17:09:24 +02:00
parent 31757840f0
commit c0d9e5c845

View file

@ -59,6 +59,14 @@ class ImageSize:
if divisor > 2:
self.__smooth_transform = False
def __eq__(self, other: 'ImageSize.Preset'):
return (
self.__size == other.size
and self.__divisor == other.divisor
and self.__smooth_transform == other.smooth
and self.__pixel_ratio == other.pixel_ratio
)
@property
def size(self) -> QSize:
return self.__size