Commit 57cdb629 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko
Browse files

ui: Draw highlighted parts separately in GamepadView

For some reason, drawing them all in one group results in all parts but
the first one being misplaced. Hence draw each one in a separate group.


(cherry picked from commit f82701d2)
parent 9097ab81
Pipeline #30612 passed with stages
in 30 minutes and 31 seconds
......@@ -65,16 +65,17 @@ private class Games.GamepadView : Gtk.DrawingArea {
}
private void highlight_gamepad (Cairo.Context context) {
context.push_group ();
for (var i = 0; i < configuration.input_paths.length; ++i)
if (input_highlights[i])
if (input_highlights[i]) {
context.push_group ();
handle.render_cairo_sub (context, "#" + configuration.input_paths[i].path);
var group = context.pop_group ();
var group = context.pop_group ();
Gdk.RGBA color;
get_style_context ().lookup_color ("theme_selected_bg_color", out color);
context.set_source_rgba (color.red, color.green, color.blue, color.alpha);
context.mask (group);
Gdk.RGBA color;
get_style_context ().lookup_color ("theme_selected_bg_color", out color);
context.set_source_rgba (color.red, color.green, color.blue, color.alpha);
context.mask (group);
}
}
private void calculate_image_dimensions (out double x, out double y, out double scale) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment