[gnome-sudoku/gnome-3-38] Display incorrect earmark as red
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/gnome-3-38] Display incorrect earmark as red
- Date: Sat, 22 Aug 2020 16:31:22 +0000 (UTC)
commit f6b7de97c1ac96c238764c3dbbffa0dec787137c
Author: Andrey Kutejko <andy128k gmail com>
Date: Sat Aug 22 00:36:49 2020 +0000
Display incorrect earmark as red
(cherry picked from commit 4cca1c55fcf26c319a02a2e681d6143762ea5e84)
src/sudoku-view.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 21909c8..df401f0 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -387,7 +387,6 @@ private class SudokuCellView : DrawingArea
{
double possibility_size = get_allocated_height () / size_ratio / 2;
c.set_font_size (possibility_size);
- c.set_source_rgb (0.0, 0.0, 0.0);
double height = (double) get_allocated_height () / game.board.block_rows;
double width = (double) get_allocated_width () / game.board.block_cols;
@@ -401,6 +400,11 @@ private class SudokuCellView : DrawingArea
if (marks[num - 1])
{
+ if (_show_warnings && !game.board.is_possible (row, col, num))
+ c.set_source_rgb (1.0, 0.0, 0.0);
+ else
+ c.set_source_rgb (0.0, 0.0, 0.0);
+
var text = "%d".printf (num);
c.save ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]