GNOME Bugzilla – Bug 727963
Game buttons should have a fixed distance from the playing area
Last modified: 2015-01-17 08:08:45 UTC
Created attachment 273983 [details] illustration If you resize the Mines window, the buttons move away from the playing grid. This looks bad, and can leave the buttons in an inconvenient position. Keeping the buttons a fixed distance from the playing area would look a lot better. I've attached a visual illustration.
Hey, I can work on this. Any preferred distance between the buttons and the playing area?
(In reply to comment #1) > Hey, I can work on this. Any preferred distance between the buttons and the > playing area? Contributions are welcome, thanks for your interest in this. As for the distance, usually something like 6 or 12 px is used for loose coupling, so let's try those values first, and we'll get some designer input from Allan based on the screenshots with those values.
I think Arnaud is our expert on the "playing area on the left, buttons on the right" layout. Take a look at how he used a GtkAspectFrame to create the layout for Iagno, Four-in-a-row, and Sudoku. Arnaud, can I count on you to review patches in this bug?
Yeah, I’m here. The layout described here by Allan with a fixed distance between the board and the right column would be done another way than with a GtkAspectFrame (probably a horizontal GtkBox of four elements with the first and the last in a GtkSizeGroup, but I didn’t test). The AspectFrame thing I used in Iagno, Four-in-a-row[1] and Sudoku helps not having a right column looking too thin –squeezed on the board– when playing on a big screen, and looks a little better on large horizontal windows (but there’s no perfect solution for that case). If all the games that have a “board” and a right column could use the same behavior, it would be great (Chess and Hitori should have one in my mind… I’ll try). But the difficulty with Mines (or with Klotski, or with Five or More) is that the board isn’t all the time square… [1] in the GtkBuilder patch, https://bugzilla.gnome.org/show_bug.cgi?id=735073
I will try making it similar to Sudoku/Iagno. I'll ask if I have any questions.
(In reply to comment #4) >(Chess and Hitori should have one in my mind… I’ll > try). But these games don't have right columns? :p
Created attachment 294569 [details] [review] Attach the game buttons to the game area
Attachment 294569 [details] pushed as e6cb7ba - Attach the game buttons to the game area
One issue that I see with master is that the buttons aren't vertically aligned with the top and bottom of the grid. This creates a rather awkward visual layout. Also, would it be possible to increase the padding between the buttons and the game grid? Right now they're a bit close for comfort.
Increased the spacing between the grid and the buttons to 24px (from 18px), and aligned the buttons to top and bottom of the grid. This results in occasional tile ratio changes, not resulting in square tiles, but slightly rectangular ones. I will take a look into that later, but it's not as awkward as the not aligned buttons, so for now, I think it looks better.