[gnome-games/wip/exalm/thumbnails: 1/3] game-thumbnail: Account for box-shadow when clipping
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/thumbnails: 1/3] game-thumbnail: Account for box-shadow when clipping
- Date: Thu, 4 Jun 2020 12:46:54 +0000 (UTC)
commit 14a79a7dba160aa9c37cd476c66d541984e5f9f6
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jun 4 17:37:31 2020 +0500
game-thumbnail: Account for box-shadow when clipping
This will allow to have outset box-shadow later.
src/ui/game-thumbnail.vala | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/src/ui/game-thumbnail.vala b/src/ui/game-thumbnail.vala
index de893cd9..67810877 100644
--- a/src/ui/game-thumbnail.vala
+++ b/src/ui/game-thumbnail.vala
@@ -63,6 +63,20 @@ private class Games.GameThumbnail : Gtk.DrawingArea {
minimum_height = natural_height = width;
}
+ public override void size_allocate (Gtk.Allocation alloc) {
+ var context = get_style_context ();
+ var clip = context.render_background_get_clip (
+ alloc.x,
+ alloc.y,
+ alloc.width,
+ alloc.height
+ );
+
+ base.size_allocate (alloc);
+
+ set_clip (clip);
+ }
+
public override bool draw (Cairo.Context cr) {
var style = get_style_context ();
var state = get_state_flags ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]