After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710626 - Visual design updates
Visual design updates
Status: RESOLVED FIXED
Product: gnome-sudoku
Classification: Applications
Component: general
git master
Other Linux
: High blocker
: ---
Assigned To: gnome-sudoku-maint
gnome-sudoku-maint
: 664985 (view as bug list)
Depends on: 633464 676954
Blocks:
 
 
Reported: 2013-10-22 10:47 UTC by Allan Day
Modified: 2014-08-13 09:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Visual design updates (5.72 KB, patch)
2014-07-13 21:22 UTC, Parin Porecha
none Details | Review
Visual design updates (5.71 KB, patch)
2014-07-13 22:11 UTC, Parin Porecha
none Details | Review
Visual design updates (5.15 KB, patch)
2014-07-14 17:42 UTC, Parin Porecha
committed Details | Review
screenshot (23.13 KB, image/png)
2014-07-22 15:06 UTC, Michael Catanzaro
  Details

Description Allan Day 2013-10-22 10:47:54 UTC
https://raw.github.com/gnome-design-team/gnome-mockups/master/games/sudoku/sudoku.png

Various visual improvements:

 * Use the same thickness of line between groups of squares (but use different colours)

 * Lighten the colour of completed squares

 * Change the colour and stroke thickness of the selected square
Comment 1 Michael Catanzaro 2014-05-30 13:33:02 UTC
*** Bug 664985 has been marked as a duplicate of this bug. ***
Comment 2 Michael Catanzaro 2014-06-24 22:57:36 UTC
(In reply to comment #0)
>  * Change the colour and stroke thickness of the selected square

By chance, this used to look similar to the design, but after an Adwaita update it has become completely black, which is a big problem since it's our default theme. Parin, you'll need to change your theme and build GTK+ master with jhbuild to test this -- Adwaita recently moved from gnome-themes-standard to gtk+.
Comment 3 Parin Porecha 2014-06-30 16:25:50 UTC
okay, I'm on it
Comment 4 Parin Porecha 2014-07-13 21:22:32 UTC
Created attachment 280604 [details] [review]
Visual design updates

The patch contains fix for 2 of the suggested changes :
* Use the same thickness of line between groups of squares (but use different
colours)
 * Change the colour and stroke thickness of the selected square

I haven't included 'Lighten the colour of completed squares' because right now, the board already has 3 colors - normal bg color, fixed cell bg color and highlighter color. With the possibility of tracker colors also to be included, the no. of resultant colors will become 5. I'm not sure if we want the user to comprehend so many colors for a simple game like this.
But that's just my humble opinion. Let me know if you also want the 2nd suggestion to be included, I'll update the patch.

btw, the board now looks like this - http://i.imgur.com/bBGzwrS.png
I'm not very good with colors, so I've set the selected bg color as close as I could to the one in mockup.
Comment 5 Michael Catanzaro 2014-07-13 22:04:44 UTC
Patch looks good, except that lambda is long enough that I would split it into its own function.

Allan, could you look at that screenshot and let us know if this looks good to you?
Comment 6 Parin Porecha 2014-07-13 22:11:36 UTC
Created attachment 280606 [details] [review]
Visual design updates

Moved the callback lambda to a separate function
Comment 7 Parin Porecha 2014-07-14 17:42:02 UTC
Created attachment 280667 [details] [review]
Visual design updates

I had chat with Allan today, and this is what he suggested -

- Lighten the black color used for block lines
- Remove the 3px stroke inside the selected cell

This patch has the fix for his suggestions.
Here's what the board looks like post this update - http://i.imgur.com/lH4lB60.png
Comment 8 Michael Catanzaro 2014-07-14 19:15:40 UTC
Review of attachment 280667 [details] [review]:

OK
Comment 9 Parin Porecha 2014-07-14 19:18:11 UTC
Attachment 280667 [details] pushed as aef2b5c
Comment 10 Michael Catanzaro 2014-07-15 12:09:50 UTC
Ah I got a bit too confident here from your screenshot; it looks fine in the dark theme, but if you switch to the light theme (use GtkInspector!) you'll see there are no longer borders around the edge of the board.

Other than that, much better!
Comment 11 Michael Catanzaro 2014-07-22 13:03:56 UTC
From a quick skim of the draw_block_lines() function, I think you need to take another look at what's going on here. Besides the missing borders, it doesn't look like you're drawing enough lines inside the board, either.  Maybe you were planning to make this a loop and just forgot?
Comment 12 Parin Porecha 2014-07-22 13:16:38 UTC
I've set the row-spacing and column-spacing of the board to 1px, and set the background color of the board to the color of the lines we want b/w two intra-block cells. This removes the need to draw lines b/w cells.
For inter-block, I'm drawing 4 lines - 2 vertical, 2 horizontal at 1/3 and 2/3 width and length of the board.
This way we don't need a loop.
Comment 13 Parin Porecha 2014-07-22 13:27:15 UTC
For adding a border, I'll need to change the background color to the dark one we use for inter-block. Then, I'll draw 12 lines - 6 vertical, 6 horizontal for intra-block cells.

You may suggest drawing a dark colored rectangle along the board's border instead of this way, but I tried that and it doesn't work. (because max allowed dimensions <= dimensions of the widget)
Comment 14 Michael Catanzaro 2014-07-22 15:06:30 UTC
(In reply to comment #12)
> For inter-block, I'm drawing 4 lines - 2 vertical, 2 horizontal at 1/3 and 2/3
> width and length of the board.
> This way we don't need a loop.

OK, I see. It seems like it should work, but I am not seeing the second horizontal and vertical lines. Maybe they're being drawn over later?  (And even the first lines don't show up when maximized.)

(In reply to comment #13)
> For adding a border, I'll need to change the background color to the dark one
> we use for inter-block. Then, I'll draw 12 lines - 6 vertical, 6 horizontal for
> intra-block cells.

You mean 8, 4, and 4 (not 12, 6, and 6), right?
Comment 15 Michael Catanzaro 2014-07-22 15:06:48 UTC
Created attachment 281397 [details]
screenshot
Comment 16 Parin Porecha 2014-07-22 15:49:34 UTC
> OK, I see. It seems like it should work, but I am not seeing the second
> horizontal and vertical lines. Maybe they're being drawn over later?  (And even
> the first lines don't show up when maximized.)

If you look very very closely in your screenshot, you can see that they are drawn, but they're off by 1px (centre block, look at fixed cell with value 6, you can see that the 2nd horizontal line should be 1px below).
Reason is the double being off by a few decimal places on window size change.

> (In reply to comment #13)
> > For adding a border, I'll need to change the background color to the dark one
> > we use for inter-block. Then, I'll draw 12 lines - 6 vertical, 6 horizontal for
> > intra-block cells.
> 
> You mean 8, 4, and 4 (not 12, 6, and 6), right?

No, 6 vertical - 2 lines b/w 3 cells for each block, and 6 horizontal - again 2 for each block.
Comment 17 Parin Porecha 2014-07-22 19:07:06 UTC
sorry, I didn't think this all the way through. This will cause the same problems as Arnaud mentioned in https://bugzilla.gnome.org/show_bug.cgi?id=733520#c7
Comment 18 Michael Catanzaro 2014-08-06 01:54:00 UTC
Hey Parin, can you prioritize this bug before tracker (but after qqwing)?  We can release without tracker if need be, but we can't release as long as things still look like comment #15. :)
Comment 19 Parin Porecha 2014-08-12 13:26:01 UTC
(In reply to comment #18)
> Hey Parin, can you prioritize this bug before tracker (but after qqwing)?  We
> can release without tracker if need be, but we can't release as long as things
> still look like comment #15. :)

Arnaud's DrawingArea patch (https://bugzilla.gnome.org/show_bug.cgi?id=733730#c9) mostly fixes this. I've rebased it against master and pushed it.

Can you please test if it works for you as well ?
Comment 20 Michael Catanzaro 2014-08-13 01:30:26 UTC
(In reply to comment #19)
> Arnaud's DrawingArea patch
> (https://bugzilla.gnome.org/show_bug.cgi?id=733730#c9) mostly fixes this. I've
> rebased it against master and pushed it.

Yup, looks good.
Comment 21 Allan Day 2014-08-13 09:22:58 UTC
Great stuff!