[gnome-games/wip/exalm/gamepad-drawing: 2/2] ui: Draw each highlighted part separately in GamepadView
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gamepad-drawing: 2/2] ui: Draw each highlighted part separately in GamepadView
- Date: Thu, 13 Sep 2018 19:42:19 +0000 (UTC)
commit 495d2e28dc008744884f7209618a8cd5f927c120
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Thu Sep 13 21:50:05 2018 +0500
ui: Draw each highlighted part separately in GamepadView
src/ui/gamepad-view.vala | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/ui/gamepad-view.vala b/src/ui/gamepad-view.vala
index 702816e2..340af6b4 100644
--- a/src/ui/gamepad-view.vala
+++ b/src/ui/gamepad-view.vala
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]