[Rd] FR: Customize background colour of row and column headers for the View output
Tomas Kalibera
tom@@@k@||ber@ @end|ng |rom gm@||@com
Tue May 28 16:56:13 CEST 2024
I think we should do more than this trivial change. The two real dialogs
used by the data editor would then also get the new background color
(setting the cell width, the "variable" editor). Then, the code clearly
distinguishes between cells for names (row, column) and cells for data,
so choosing a different color for the two types, but setting these two
colors in the code to the same one would make the code confusing.
This could be fixed, but I also think there is a value in
back-compatibility, people may have saved preferences with customized
background color and have been used to how it looked like, after all the
current behavior has been around for about 16 years and from the code,
it was intentional. Yes, it meant that one would have to choose a
foreground color for the data editor that would be visible on any chosen
background color as well as on lighgray (the names), so, e.g., not
yellow. But, maybe that was good enough as there had been no reports
about this earlier.
So, instead of changing the behavior I've created a new setting for the
background for the names in the data editor (dataeditnbg). Now in
R-devel. Please let me know if you see any problems with this,
Thanks
Tomas
On 5/16/24 17:48, Ivan Krylov via R-devel wrote:
> The change suggested by Iago Giné Vázquez is indeed very simple. It
> sets the background colour of the row and column headers to the
> background of the rest of the dataentry window. With this patch, R
> passes 'make check'. As Duncan Murdoch mentions, the X11 editor already
> behaves this way.
>
> If it's not acceptable to make the row and column headers the same
> colour as the rest of the text, let's make it into a separate setting.
>
> --- src/library/utils/src/windows/dataentry.c (revision 86557)
> +++ src/library/utils/src/windows/dataentry.c (working copy)
> @@ -1474,7 +1474,7 @@
> resize(DE->de, r);
>
> DE->CellModified = DE->CellEditable = FALSE;
> - bbg = dialog_bg();
> + bbg = guiColors[dataeditbg];
> /* set the active cell to be the upper left one */
> DE->crow = 1;
> DE->ccol = 1;
>
More information about the R-devel
mailing list