[gnome-sudoku] Restore original behavior of "warn about unfillable squares"



commit fa4db028a7359b017119b1a1e612b66395d719ad
Author: Parin Porecha <parinporecha gmail com>
Date:   Thu Jun 26 18:39:30 2014 +0530

    Restore original behavior of "warn about unfillable squares"
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731140

 src/sudoku-view.vala |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 263d37d..210e18a 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -399,11 +399,15 @@ private class SudokuCellView : Gtk.DrawingArea
         if (is_fixed)
             return false;
 
-        c.move_to (0, (get_allocated_height () - 3));
         if (_warn_about_unfillable_squares)
         {
+            string warning = "X";
+            Cairo.TextExtents extents;
+            c.set_font_size (get_allocated_height () / 2);
+            c.text_extents (warning, out extents);
+            c.move_to ((get_allocated_width () - extents.width) / 2 - 1, (get_allocated_height () + 
extents.height) / 2 + 1);
             c.set_source_rgb (1.0, 0.0, 0.0);
-            c.show_text ("None");
+            c.show_text (warning);
         }
         else
         {


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