[iagno] Fix a drawing bug.



commit 63662effc35cdf1e817966aa000173b05c69e843
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Jan 24 14:43:04 2020 +0100

    Fix a drawing bug.
    
    Introduced in c63521b183.

 src/reversi-view.vala | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/reversi-view.vala b/src/reversi-view.vala
index ebe1a82..cdca655 100644
--- a/src/reversi-view.vala
+++ b/src/reversi-view.vala
@@ -179,6 +179,8 @@ private class ReversiView : Gtk.DrawingArea
 
         theme_manager.theme_changed.connect (() => {
                 tiles_pattern = null;
+                if (configuration_done)
+                    configure_theme ();
                 queue_draw ();
             });
     }
@@ -203,6 +205,12 @@ private class ReversiView : Gtk.DrawingArea
 
     protected override bool configure_event (Gdk.EventConfigure e)
         requires (game_is_set)
+    {
+        configure_theme ();
+        configuration_done = true;
+        return true;
+    }
+    private void configure_theme ()
     {
         int allocated_width  = get_allocated_width ();
         int allocated_height = get_allocated_height ();
@@ -224,8 +232,6 @@ private class ReversiView : Gtk.DrawingArea
                 tile_ys [x, y] = paving_size * (int) y;
             }
         }
-        configuration_done = true;
-        return true;
     }
     private inline void configure_overture_origin ()
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]