[gnome-chess] Fix background color regression in 3D view
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Fix background color regression in 3D view
- Date: Sat, 2 Nov 2013 17:33:43 +0000 (UTC)
commit 1d080a2716a395a69cd0859a9ab2b4c4ee171861
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Nov 2 12:31:58 2013 -0500
Fix background color regression in 3D view
We've been painting it black since the switch to Gtk.StyleContext, since
the ChessView's style context does not have a background color.
src/chess-view-3d.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/chess-view-3d.vala b/src/chess-view-3d.vala
index 6bc6f91..9cf00bb 100644
--- a/src/chess-view-3d.vala
+++ b/src/chess-view-3d.vala
@@ -262,7 +262,8 @@ private class ChessView3D : ChessView
for (var i = 0; i < n_passes; i++)
{
- var bg = get_style_context ().get_background_color (get_state_flags ());
+ var window = (Gtk.Window) get_toplevel();
+ var bg = window.get_style_context ().get_background_color (window.get_state_flags ());
glClearColor ((float) bg.red, (float) bg.green, (float) bg.blue, 1.0f);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]