Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
e985e13b
by wurstsalat at 2021-02-15T21:08:55+01:00
1 changed file:
Changes:
| ... | ... | @@ -231,7 +231,7 @@ def get_pixbuf(self): |
| 231 | 231 |
width = min(self._crop.width, width - self._crop.x)
|
| 232 | 232 |
height = min(self._crop.height, height - self._crop.y)
|
| 233 | 233 |
|
| 234 |
- if width <= 0 or height <=0:
|
|
| 234 |
+ if width <= 0 or height <= 0:
|
|
| 235 | 235 |
return None
|
| 236 | 236 |
|
| 237 | 237 |
return GdkPixbuf.Pixbuf.new_subpixbuf(
|
| ... | ... | @@ -661,7 +661,7 @@ def _eval_radial_line(center_x, center_y, bounds_x, bounds_y, user_x): |
| 661 | 661 |
# Prevent division by zero
|
| 662 | 662 |
return 0
|
| 663 | 663 |
|
| 664 |
- decision_slope = float(bounds_y - center_y) / (bounds_x - center_x)
|
|
| 664 |
+ decision_slope = slope_y / slope_x
|
|
| 665 | 665 |
decision_intercept = - float(decision_slope * bounds_x)
|
| 666 | 666 |
return int(decision_slope * user_x + decision_intercept)
|
| 667 | 667 |
|