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 733730 - [PATCHes] Use a DrawingArea for the board.
[PATCHes] Use a DrawingArea for the board.
Status: RESOLVED FIXED
Product: gnome-sudoku
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-sudoku-maint
gnome-sudoku-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-25 10:40 UTC by Arnaud B.
Modified: 2014-08-17 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use a DrawingArea for the board. (7.47 KB, patch)
2014-07-25 10:40 UTC, Arnaud B.
none Details | Review
Notations. (11.70 KB, patch)
2014-07-25 10:40 UTC, Arnaud B.
none Details | Review
Remove unused functionality. (5.15 KB, patch)
2014-07-25 11:55 UTC, Arnaud B.
none Details | Review
Use a DrawingArea for the board. (6.14 KB, patch)
2014-07-25 19:43 UTC, Arnaud B.
committed Details | Review
Remove unused functionality. (5.10 KB, patch)
2014-07-25 19:52 UTC, Arnaud B.
committed Details | Review

Description Arnaud B. 2014-07-25 10:40:19 UTC
Created attachment 281684 [details] [review]
Use a DrawingArea for the board.

As explained elsewhere [1], there are some problems with the drawing of the board, notably the lines between the main blocks. With approximations, the lines are often not drawn on screen with big resolution, depending of the window size. I’ve tried many things to correct that in a “GTK way” (Grid of 3 under a Grid of 9…), but didn’t found a great solution.

Here is a patch to use a DrawingArea for both the background colors and the lines, with an Overlay containing a Grid for the numbers. I think it works in every case, even if it’s not perfect.

The second patch is just some notations things and some cleaning.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=733520#c7
Comment 1 Arnaud B. 2014-07-25 10:40:43 UTC
Created attachment 281685 [details] [review]
Notations.
Comment 2 Arnaud B. 2014-07-25 11:55:23 UTC
Created attachment 281691 [details] [review]
Remove unused functionality.

Another cleaning, the unused ability to use a non-squared grid. I didn’t remove the variable that permits that, for now.
Comment 3 Michael Catanzaro 2014-07-25 13:20:09 UTC
Ah, huge improvement. Parin, from here on I'm going to trust you to review patches that come in.  Note that the border around the edge of this board seems slightly fuzzy.

Arnaud, if you're planning to keep contributing and are interested in maintaining any of our games, let me know (email or IRC).
Comment 4 Arnaud B. 2014-07-25 19:43:28 UTC
Created attachment 281725 [details] [review]
Use a DrawingArea for the board.

Here is an new version to patch on top of the updated AspectFrame bug’s patches [1]. I changed a little the border, it could be done in other ways if it’s not better.

I’m regularly on IRC under the pseudo The_gull, if you want to contact me directly.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=733520
Comment 5 Arnaud B. 2014-07-25 19:52:24 UTC
Created attachment 281726 [details] [review]
Remove unused functionality.
Comment 6 Mario Wenzel 2014-07-25 22:16:25 UTC
Is this rebased against master? I can't seem to test it properly.
Comment 7 Arnaud B. 2014-07-25 22:35:05 UTC
It's built on top of the AspectFrame bug’s patches [1]. I'm not enough organized to properly manage branches. /o\

[1] https://bugzilla.gnome.org/show_bug.cgi?id=733520
Comment 8 Parin Porecha 2014-08-11 23:00:23 UTC
Comment on attachment 281726 [details] [review]
Remove unused functionality.

Rebased it against master, and pushed as 5c483b9
Comment 9 Parin Porecha 2014-08-12 13:21:57 UTC
Comment on attachment 281725 [details] [review]
Use a DrawingArea for the board.

This patch almost fixes the bug Michael mentioned in https://bugzilla.gnome.org/show_bug.cgi?id=710626#c15
I've rebased it against master, and pushed as 1263d5e .

However on resizing the board, sometimes the black block lines disappear (or become off by a few px) revealing another dark color beneath, the same used in the board's borders. This is not a major bug, but it does need fixing.
Comment 10 Arnaud B. 2014-08-17 16:52:15 UTC
Thanks a lot. Yeah, it has two different looks, depending on the size; Allan Day opened the bug “Blurry lines”[1] for that, we should use it as it’s specific and more clear, so I close here.
Comment 11 Arnaud B. 2014-08-17 16:53:18 UTC
[1] https://bugzilla.gnome.org/show_bug.cgi?id=734797