[gnome-games/wip/exalm/gtk4: 21/30] game-thumbnail: Drop state argument from GtkStyleContext functions
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/gtk4: 21/30] game-thumbnail: Drop state argument from GtkStyleContext functions
- Date: Sun, 7 Oct 2018 10:35:41 +0000 (UTC)
commit 3704aa089c7eb767cdcb7122990283dd3c24ec46
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Wed Aug 1 15:10:45 2018 +0500
game-thumbnail: Drop state argument from GtkStyleContext functions
src/ui/game-thumbnail.vala | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/game-thumbnail.vala b/src/ui/game-thumbnail.vala
index 61added3..37dfdab4 100644
--- a/src/ui/game-thumbnail.vala
+++ b/src/ui/game-thumbnail.vala
@@ -62,7 +62,6 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
Cairo.Context cr;
Gdk.Surface? surface;
Gtk.StyleContext style;
- Gtk.StateFlags state;
int width;
int height;
}
@@ -86,10 +85,9 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
public void draw (Gtk.DrawingArea area, Cairo.Context cr, int width, int height) {
var surface = get_surface ();
var style = get_style_context ();
- var state = get_state_flags ();
DrawingContext context = {
- cr, surface, style, state, width, height
+ cr, surface, style, width, height
};
if (icon == null)
@@ -131,7 +129,7 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
if (pixbuf == null)
return false;
- var border_radius = (int) context.style.get_property (Gtk.STYLE_PROPERTY_BORDER_RADIUS,
context.state);
+ var border_radius = (int) context.style.get_property (Gtk.STYLE_PROPERTY_BORDER_RADIUS);
context.cr.set_source_rgb (0, 0, 0);
rounded_rectangle (context.cr, 0.5, 0.5, context.width - 1, context.height - 1,
border_radius);
@@ -151,7 +149,7 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
private void draw_emblem_icon (DrawingContext context, string icon_name, double scale) {
Gdk.Pixbuf? emblem = null;
- var color = context.style.get_color (context.state);
+ var color = context.style.get_color ();
var theme = Gtk.IconTheme.get_default ();
var size = int.min (context.width, context.height) * scale;
@@ -311,7 +309,7 @@ private class Games.GameThumbnail: Gtk.DrawingArea {
private Cairo.Surface get_mask (DrawingContext context) {
Cairo.ImageSurface mask = new Cairo.ImageSurface (Cairo.Format.A8, context.width,
context.height);
- var border_radius = (int) context.style.get_property (Gtk.STYLE_PROPERTY_BORDER_RADIUS,
context.state);
+ var border_radius = (int) context.style.get_property (Gtk.STYLE_PROPERTY_BORDER_RADIUS);
Cairo.Context cr = new Cairo.Context (mask);
cr.set_source_rgba (0, 0, 0, 0.9);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]