[Rd] FR: Customize background colour of row and column headers for the View output
Iago Giné Vázquez
|@go@g|ne @end|ng |rom @jd@e@
Wed May 15 08:20:38 CEST 2024
About the decisions:
Actually, the same way dataedittext modifies the text colour not only
of data, but also of row and column names, and dataedituser modifies
the colour of all the borders, I think dataeditbg should modify the
background of all the window, at least that "inside" those
borders. Otherwise, any other option for the background colour on row
and column headers would allow the same set of colours and with the
same names, which are those commented in Rconsole:
## Colours for console and pager(s)
# (see rwxxxx/etc/rgb.txt for the known colours).
Regarding the code, looking to the Windows data editor [1], and taking
into account what you and lastly Ivan told previously
This is entirely correct: the dialog uses the colour returned by
dialog_bg(), which is GetSysColor(COLOR_BTNFACE).
(maybe a naive question from who does not know the code), could not be
used `guiColors[dataeditbg]` instead of `dialog_bg()` in the unique
place this is present?. So, instead of
bbg = dialog_bg()
it would appear
bbg = guiColors[dataeditbg];
Thanks!
Iago
[1] https://svn.r-project.org/R/trunk/src/library/utils/src/windows/dataentry.c
________________________________
De: Duncan Murdoch <murdoch.duncan using gmail.com>
Enviat el: dimarts, 14 de maig de 2024 14:22
Per a: Iago Gin�� V��zquez <iago.gine using sjd.es>; r-devel using R-project.org <r-devel using r-project.org>
A/c: Ivan Krylov <ikrylov using disroot.org>
Tema: Re: FR: Customize background colour of row and column headers for the View output
This seems like something that should be fairly easily doable. Why
don't you work out a patch?
Some decisions to make:
- What colours are we talking about? Would you want the labels to have
their colour set independent of the dialog colours? If so, would you
also want to configure the dialog colours?
- What names should be used for the colours?
- Where should all of these definitions be documented?
If you don't feel comfortable with the coding, perhaps you could answer
these questions, and someone else may code it for you. I won't (I no
longer have easy access to Windows), but I could help with the design.
Duncan Murdoch
On 2024-05-14 5:25 a.m., Iago Gin�� V��zquez wrote:
> Thanks again Duncan and Ivan,
>
> I forward then the email to R-devel.
>
> Summarizing, the dataedit options (in RGui preferences or RConsole) to
> colouring the View output do not have effect on the background of the row
> and column names (see https://ibb.co/Dkn2pVs <https://ibb.co/Dkn2pVs>).
>
> Could this be implemented?
>
> Thank you!
>
> Best regards,
> Iago
> ------------------------------------------------------------------------
> *De:* Ivan Krylov <ikrylov using disroot.org>
> *Enviat el:* dilluns, 13 de maig de 2024 14:34
> *Per a:* Duncan Murdoch <murdoch.duncan using gmail.com>
> *A/c:* Iago Gin�� V��zquez <iago.gine using sjd.es>; r-help using r-project.org
> <r-help using r-project.org>
> *Tema:* Re: [R] Is there some way to customize colours for the View output?
> �� Mon, 13 May 2024 06:08:22 -0400
> Duncan Murdoch <murdoch.duncan using gmail.com> ��ڧ�֧�:
>
>> The row and column names don't appear to be controllable from that
>> menu, they seem (on my machine) to be displayed in the same colour as
>> the background of a dialog box, i.e. some kind of gray. I don't
>> think R tries to control that colour, but perhaps some Windows
>> setting would change it.
>
> This is entirely correct: the dialog uses the colour returned by
> dialog_bg(), which is GetSysColor(COLOR_BTNFACE).
>
> I think it could be a reasonable feature request to use an adjustable
> colour for the row and column headers.
>
> --
> Best regards,
> Ivan
[[alternative HTML version deleted]]
More information about the R-devel
mailing list