GNOME Bugzilla – Bug 732300
No longer easy to distinguish painted from unpainted squares
Last modified: 2014-07-07 00:26:20 UTC
I guess due to Adwaita changes, with the latest GTK+ it's no longer easy to see which squares are painted and which are not -- the numbers become smaller, but that's it.
This is something which has been on my list for a little while: the drawing code should be modified to use a GtkCssProvider to provide its colours. They can then come from a custom CSS file which could be customised for different themes (if necessary). Currently the tag colours are hard-coded, and the cells themselves use the default GtkStyleContext background colours for the default and insensitive widget states. I guess those two colours have been changed to be the same in GTK+.
Created attachment 279958 [details] [review] Use CSS provider to control colors used in UI This style looks the same as Hitori using Adwaita prior to GTK+ 3.13.3
Review of attachment 279958 [details] [review]: This looks good to me apart from the one comment below. Ideally, the grid would be rearchitected as a GtkWidget subclass, and the CSS would be rearranged to use properties, rather than defined colours. Then the defines like BORDER_LEFT and *_FONT_SCALE could be moved into the CSS file too. That can be done as a separate bug at some point in the future though. ::: src/interface.c @@ +204,3 @@ if (hitori->board[iter.x][iter.y].status & CELL_TAG1) { + lookup_color (style_context, "tag1-color", &colour); + colour.alpha = painted ? PAINTED_ALPHA : NORMAL_ALPHA; I think the alphas should be defined in the CSS file.
(In reply to comment #3) > Ideally, the grid would be rearchitected as a GtkWidget subclass, and the CSS > would be rearranged to use properties, rather than defined colours. Then the > defines like BORDER_LEFT and *_FONT_SCALE could be moved into the CSS file too. > That can be done as a separate bug at some point in the future though. That would be best. I was worried that would be the only way to fix this. (I wasn't keen on doing that work.) > ::: src/interface.c > @@ +204,3 @@ > if (hitori->board[iter.x][iter.y].status & CELL_TAG1) { > + lookup_color (style_context, "tag1-color", &colour); > + colour.alpha = painted ? PAINTED_ALPHA : NORMAL_ALPHA; > > I think the alphas should be defined in the CSS file. Definitely.
Created attachment 279997 [details] [review] Use CSS provider to control colors used in UI This style looks the same as Hitori using Adwaita prior to GTK+ 3.13.3
Created attachment 279998 [details] [review] Use CSS provider to control colors used in UI This style looks the same as Hitori using Adwaita prior to GTK+ 3.13.3
Review of attachment 279998 [details] [review]: Go for it.
Attachment 279998 [details] pushed as 9effdc2 - Use CSS provider to control colors used in UI