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 648676 - selection unrecognizable
selection unrecognizable
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
: 675090 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-26 16:10 UTC by Andreas J. Guelzow
Modified: 2012-06-05 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (899 bytes, patch)
2011-07-14 13:07 UTC, Jean Bréfort
none Details | Review
Fixed patch (765 bytes, patch)
2011-07-14 18:30 UTC, Jean Bréfort
committed Details | Review
Proposed patch (3.46 KB, patch)
2012-04-28 06:33 UTC, Jean Bréfort
none Details | Review
Commited patch (4.65 KB, patch)
2012-06-05 14:03 UTC, Jean Bréfort
committed Details | Review

Description Andreas J. Guelzow 2011-04-26 16:10:14 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.)
Comment 1 Andreas J. Guelzow 2011-04-26 16:41:02 UTC
Strange, I can't replicate anymore....
Comment 2 Jean Bréfort 2011-04-26 18:11:30 UTC
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?
Comment 3 Morten Welinder 2011-04-26 20:00:16 UTC
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.
Comment 4 Andreas J. Guelzow 2011-04-26 20:57:14 UTC
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.
Comment 5 Jean Bréfort 2011-04-26 20:58:41 UTC
Anyway, there is no equivalent for theme->light in gtk+-3.0.
Comment 6 Andreas J. Guelzow 2011-06-06 17:49:54 UTC
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!
Comment 7 Jean Bréfort 2011-06-06 19:58:26 UTC
I'm seeing that too. Seems I missed something when I implemented the new canvas.
Comment 8 Andreas J. Guelzow 2011-06-06 21:49:14 UTC
It might just be the order in which things are drawn. Perhaps there is a shaded area behind the background :-)
Comment 9 Jean Bréfort 2011-06-07 06:49:57 UTC
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).
Comment 10 Jean Bréfort 2011-06-07 12:51:23 UTC
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.
Comment 11 Jean Bréfort 2011-07-14 13:07:44 UTC
Created attachment 191957 [details] [review]
Proposed patch

This will not work with gtk+3 (there is no GtkTheme::light equivalent).
Comment 12 Morten Welinder 2011-07-14 18:12:46 UTC
Patch is incomplete.  Cut-and-paste problem?
Comment 13 Jean Bréfort 2011-07-14 18:30:35 UTC
Created attachment 191995 [details] [review]
Fixed patch

Don't know what happened.
Comment 14 Andreas J. Guelzow 2011-07-29 21:04:22 UTC
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.
Comment 15 Andreas J. Guelzow 2011-08-01 00:57:22 UTC
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.
Comment 16 Jean Bréfort 2011-08-01 07:04:24 UTC
We'll have to reopen after branching
Comment 17 Jean Bréfort 2012-04-28 05:42:17 UTC
I should have reopen it much earlier. The issue here is how to decide which color to use.
Comment 18 Jean Bréfort 2012-04-28 06:33:52 UTC
Created attachment 213015 [details] [review]
Proposed patch
Comment 19 Andreas J. Guelzow 2012-04-30 00:12:09 UTC
*** Bug 675090 has been marked as a duplicate of this bug. ***
Comment 20 Jean Bréfort 2012-05-16 15:47:25 UTC
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.
Comment 21 Jean Bréfort 2012-06-05 14:03:06 UTC
Created attachment 215642 [details] [review]
Commited patch
Comment 22 Jean Bréfort 2012-06-05 14:03:18 UTC
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.