Philipp Hörist pushed to branch master at gajim / gajim
Commits: 1cff6a34 by lovetox at 2020-05-27T22:26:49+02:00 Change look of DND status
- - - - - f7c0f2d3 by lovetox at 2020-05-27T22:26:49+02:00 Change color of XA status
- - - - -
2 changed files:
- gajim/gtk/avatar.py - gajim/gtk/util.py
Changes:
===================================== gajim/gtk/avatar.py ===================================== @@ -97,22 +97,35 @@ def add_status_to_avatar(surface, show): width = width / scale height = height / scale
- clip_size = width / 6.5 + clip_radius = width / 5.5 + center_x = width - clip_radius + center_y = height - clip_radius + context.set_source_rgb(255, 255, 255) context.set_operator(cairo.Operator.CLEAR) - context.arc(width - clip_size, height - clip_size, clip_size, 0, 2 * pi) + context.arc(center_x, center_y, clip_radius, 0, 2 * pi) context.fill()
css_color = get_css_show_class(show) color = convert_rgb_string_to_float( app.css_config.get_value(css_color, StyleAttr.COLOR)) - show_size = width / 6.5 - show_radius = show_size * 0.80 + + show_radius = clip_radius * 0.75 + context.set_source_rgb(*color) context.set_operator(cairo.Operator.OVER) - context.arc(width - show_size, height - show_size, show_radius, 0, 2 * pi) + context.arc(center_x, center_y, show_radius, 0, 2 * pi) context.fill()
+ if show == 'dnd': + line_length = clip_radius / 2 + context.move_to(center_x - line_length, center_y) + context.line_to(center_x + line_length, center_y) + + context.set_source_rgb(255, 255, 255) + context.set_line_width(clip_radius / 4) + context.stroke() + return context.get_target()
===================================== gajim/gtk/util.py ===================================== @@ -677,9 +677,9 @@ def generate_account_badge(account): def get_css_show_class(show): if show in ('online', 'chat'): return '.gajim-status-online' - if show in ('away', 'xa'): + if show == 'away': return '.gajim-status-away' - if show == 'dnd': + if show in ('dnd', 'xa'): return '.gajim-status-dnd' # 'offline', 'not in roster', 'requested' return '.gajim-status-offline'
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/12d9b099057ce56bd694eb8345c4e323...