Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gajim/gtk/avatar.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/gajim/gtk/avatar.py b/gajim/gtk/avatar.py
index b25419426..1f144c1f9 100644
--- a/gajim/gtk/avatar.py
+++ b/gajim/gtk/avatar.py
@@ -243,17 +243,20 @@ def get_show_circle(show: str | types.PresenceShowT,
if not isinstance(show, str):
show = show.value
- size = size * scale
- center = size / 2
- radius = size / 3
+ width = size * scale
+ height = width
- surface = cairo.ImageSurface(cairo.Format.ARGB32, size, size)
+ surface = cairo.ImageSurface(cairo.Format.ARGB32, width, height)
+ surface.set_device_scale(scale, scale)
context = cairo.Context(surface)
css_color = get_css_show_class(show)
color = convert_rgb_string_to_float(
app.css_config.get_value(css_color, StyleAttr.COLOR))
+ center = size / 2
+ radius = size / 3
+
context.set_source_rgb(*color)
context.set_operator(cairo.Operator.OVER)
context.arc(center, center, radius, 0, 2 * pi)