GNOME Bugzilla – Bug 648676
selection unrecognizable
Last modified: 2012-06-05 14:03:18 UTC
The selection of cells used to be lightly shaded. THis was especially important when one created disjointed ctrl-click selections. Now the selection is not shaded anymore so it is nearly impossible to tell what is selected (since the only indicators are the highlighted row & column headers and in the case of disjointed selection they do not detyermine the selection uniquely.)
Strange, I can't replicate anymore....
I can replicate: seems that theme->light[GTK_STATE_SELECTED] is white at least in some cases. Should be use gs_lavender if the color is white or nearly white?
We need to use another colour, but I am not sure gs_lavender is the right answer. I we had a theme colour that was guaranteed to be in contrast to [GTK_STATE_SELECTED] then we could use something like... 0.1*other_colour + 0.9*theme->light[GTK_STATE_SELECTED] That would, I think, produce something in the same colour scheme as the theme.
If theme->light[GTK_STATE_SELECTED]is not white, then that colour works just fine. If it is white than 0.1*other_colour + 0.9*theme->light[GTK_STATE_SELECTED] doesn't yield anything interesting. perhaps a light version of the colour we are using for the selected row/column headers would work in that case.
Anyway, there is no equivalent for theme->light in gtk+-3.0.
More seriously, and a related issue, is that the selection is unrecognizable, independent of theme if a background colour is set, We used to highlight the selection as in https://bugzilla.gnome.org/attachment.cgi?id=409 but now one can't see the selection anymore!
I'm seeing that too. Seems I missed something when I implemented the new canvas.
It might just be the order in which things are drawn. Perhaps there is a shaded area behind the background :-)
No, I just removed the use of GnmColor::selected_color when switching the canvas and then Morten removed that field because it was not used anymore. I'll reimplement that asap (next week I guess).
We need to define how the selection background color is evaluated. Previously, we used (bg_color + selection_color)/2, but this is not perfect when the two colors are the same.
Created attachment 191957 [details] [review] Proposed patch This will not work with gtk+3 (there is no GtkTheme::light equivalent).
Patch is incomplete. Cut-and-paste problem?
Created attachment 191995 [details] [review] Fixed patch Don't know what happened.
This looks god to me. I think it should go in before the branch. After branch we will need to come up with something new anyways.
THis appears to be fixed now in 1.10.17. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
We'll have to reopen after branching
I should have reopen it much earlier. The issue here is how to decide which color to use.
Created attachment 213015 [details] [review] Proposed patch
*** Bug 675090 has been marked as a duplicate of this bug. ***
Above patch is not correct. Although the result for ItemBar seems correct. But for ItemGrid, it is wrong. I don't understand everything in GtkStyleContext. May be as we just use a white background whatever the theme we might also use a selection color defined internally without any reference to the theme.
Created attachment 215642 [details] [review] Commited patch
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.