Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
e52f7b78 by wurstsalat at 2022-12-14T19:34:29+01:00
fix: AvatarSelector: Set default crop scale to 1.0
Fixes #11331
- - - - -
1 changed file:
- gajim/gtk/avatar_selector.py
Changes:
=====================================
gajim/gtk/avatar_selector.py
=====================================
@@ -217,7 +217,7 @@ def __init__(self) -> None:
self._color_shifted_pixbuf: Optional[GdkPixbuf.Pixbuf] = None
self._current_cursor: Optional[Gdk.CursorType] = None
- self._scale = float(0.0)
+ self._scale = 1.0
self._image.x = 0
self._image.y = 0
self._image.width = 0
@@ -266,7 +266,7 @@ def set_pixbuf(self, pixbuf: Optional[GdkPixbuf.Pixbuf]) ->
None:
self._crop.x = int(abs((width - self._crop.width) / 2))
self._crop.y = int(abs((height - self._crop.height) / 2))
- self._scale = 0.0
+ self._scale = 1.0
self._image.x = 0
self._image.y = 0
self._image.width = 0
@@ -662,7 +662,7 @@ def _update_pixbufs(self) -> None:
self._generate_color_shifted_pixbuf()
- if self._scale == 0.0:
+ if self._scale == 1.0:
scale_to_80 = float(min(
(self._pixbuf.get_width() * 0.8 / self._base_width),
(self._pixbuf.get_height() * 0.8 / self._base_height)))
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e52f7b782ee33a40917e31501e76cf39d6771127
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e52f7b782ee33a40917e31501e76cf39d6771127
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits