| ... |
... |
@@ -97,22 +97,35 @@ def add_status_to_avatar(surface, show): |
|
97
|
97
|
width = width / scale
|
|
98
|
98
|
height = height / scale
|
|
99
|
99
|
|
|
100
|
|
- clip_size = width / 6.5
|
|
|
100
|
+ clip_radius = width / 5.5
|
|
|
101
|
+ center_x = width - clip_radius
|
|
|
102
|
+ center_y = height - clip_radius
|
|
|
103
|
+
|
|
101
|
104
|
context.set_source_rgb(255, 255, 255)
|
|
102
|
105
|
context.set_operator(cairo.Operator.CLEAR)
|
|
103
|
|
- context.arc(width - clip_size, height - clip_size, clip_size, 0, 2 * pi)
|
|
|
106
|
+ context.arc(center_x, center_y, clip_radius, 0, 2 * pi)
|
|
104
|
107
|
context.fill()
|
|
105
|
108
|
|
|
106
|
109
|
css_color = get_css_show_class(show)
|
|
107
|
110
|
color = convert_rgb_string_to_float(
|
|
108
|
111
|
app.css_config.get_value(css_color, StyleAttr.COLOR))
|
|
109
|
|
- show_size = width / 6.5
|
|
110
|
|
- show_radius = show_size * 0.80
|
|
|
112
|
+
|
|
|
113
|
+ show_radius = clip_radius * 0.75
|
|
|
114
|
+
|
|
111
|
115
|
context.set_source_rgb(*color)
|
|
112
|
116
|
context.set_operator(cairo.Operator.OVER)
|
|
113
|
|
- context.arc(width - show_size, height - show_size, show_radius, 0, 2 * pi)
|
|
|
117
|
+ context.arc(center_x, center_y, show_radius, 0, 2 * pi)
|
|
114
|
118
|
context.fill()
|
|
115
|
119
|
|
|
|
120
|
+ if show == 'dnd':
|
|
|
121
|
+ line_length = clip_radius / 2
|
|
|
122
|
+ context.move_to(center_x - line_length, center_y)
|
|
|
123
|
+ context.line_to(center_x + line_length, center_y)
|
|
|
124
|
+
|
|
|
125
|
+ context.set_source_rgb(255, 255, 255)
|
|
|
126
|
+ context.set_line_width(clip_radius / 4)
|
|
|
127
|
+ context.stroke()
|
|
|
128
|
+
|
|
116
|
129
|
return context.get_target()
|
|
117
|
130
|
|
|
118
|
131
|
|