#18988: Greyed-out tab captions in wxAuiNotebook make no sense

22 views
Skip to first unread message

wxTrac

unread,
Nov 25, 2020, 10:43:22 AM11/25/20
to wx-...@googlegroups.com
#18988: Greyed-out tab captions in wxAuiNotebook make no sense
-----------------------------------+--------------------
Reporter: juliansmart | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.0.5
Keywords: aui,tab,wxAuiNotebook | Blocked By:
Blocking: | Patch: 0
-----------------------------------+--------------------
On Mac, captions of unselected wxAuiNotebook tabs are now greyed out and
pretty hard to read. This doesn't make any sense to me, especially as the
unselected captions on a wxNotebook are the same colour as selected
captions. A greyed-out label would surely indicate that the tab can't be
clicked - it's truly 'inactive' - not that it's not the selection. The
selection is already indicated by a bold font.

So I suggest for the sake of consistency and accessibility that we use the
same colour for selected and unselected tabs. Failing that, that we make
it a lot easier to change this aspect without hacking the source or having
to reproduce 99% of the tab art class to change it.

The relevant code is in src/aui/tabart.cpp:

// draw tab text
wxColor sys_color = wxSystemSettings::GetColour(
page.active ? wxSYS_COLOUR_CAPTIONTEXT :
wxSYS_COLOUR_INACTIVECAPTIONTEXT);

which could just be:

// draw tab text
wxColor sys_color =
wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT);

Thanks,

Julian

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18988>

wxTrac

unread,
Nov 25, 2020, 12:26:57 PM11/25/20
to wx-...@googlegroups.com
#18988: Greyed-out tab captions in wxAuiNotebook make no sense
--------------------------+-----------------------------------
Reporter: juliansmart | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.0.5
Resolution: | Keywords: aui,tab,wxAuiNotebook
Blocked By: | Blocking:
Patch: 0 |
--------------------------+-----------------------------------

Old description:

> On Mac, captions of unselected wxAuiNotebook tabs are now greyed out and
> pretty hard to read. This doesn't make any sense to me, especially as the
> unselected captions on a wxNotebook are the same colour as selected
> captions. A greyed-out label would surely indicate that the tab can't be
> clicked - it's truly 'inactive' - not that it's not the selection. The
> selection is already indicated by a bold font.
>
> So I suggest for the sake of consistency and accessibility that we use
> the same colour for selected and unselected tabs. Failing that, that we
> make it a lot easier to change this aspect without hacking the source or
> having to reproduce 99% of the tab art class to change it.
>
> The relevant code is in src/aui/tabart.cpp:
>
> // draw tab text
> wxColor sys_color = wxSystemSettings::GetColour(
> page.active ? wxSYS_COLOUR_CAPTIONTEXT :
> wxSYS_COLOUR_INACTIVECAPTIONTEXT);
>
> which could just be:
>
> // draw tab text
> wxColor sys_color =
> wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT);
>
> Thanks,
>
> Julian

New description:

On Mac, captions of unselected wxAuiNotebook tabs are now greyed out and
pretty hard to read. This doesn't make any sense to me, especially as the
unselected captions on a wxNotebook are the same colour as selected
captions. A greyed-out label would surely indicate that the tab can't be
clicked - it's truly 'inactive' - not that it's not the selection. The
selection is already indicated by a bold font.

So I suggest for the sake of consistency and accessibility that we use the
same colour for selected and unselected tabs. Failing that, that we make
it a lot easier to change this aspect without hacking the source or having
to reproduce 99% of the tab art class to change it.

The relevant code is in src/aui/tabart.cpp:
{{{
#!cpp
// draw tab text
wxColor sys_color = wxSystemSettings::GetColour(
page.active ? wxSYS_COLOUR_CAPTIONTEXT :
wxSYS_COLOUR_INACTIVECAPTIONTEXT);
}}}

which could just be:
{{{
#!cpp
// draw tab text
wxColor sys_color =
wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT);
}}}

Thanks,

Julian

--

Comment (by vadz):

I think we need to find a better colour to use for inactive pages or
change the mapping of `wxSYS_COLOUR_INACTIVECAPTIONTEXT` in
`src/osx/cocoa/settings.mm` to something else, but it doesn't look like a
good idea to not distinguish active from inactive pages at all.

BTW, for the reference, this was changed in e8b917e7a4 (Use system colours
if the contrast is sufficient in AUI tabs, 2019-12-05) which tried to fix
the problem with the text being unreadable with some themes, see #18601,
so we do want to keep this change in at least some form.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18988#comment:1>

wxTrac

unread,
Nov 26, 2020, 6:20:00 AM11/26/20
to wx-...@googlegroups.com
#18988: Greyed-out tab captions in wxAuiNotebook make no sense
--------------------------+-----------------------------------
Reporter: juliansmart | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.0.5
Resolution: | Keywords: aui,tab,wxAuiNotebook
Blocked By: | Blocking:
Patch: 1 |
--------------------------+-----------------------------------
Changes (by juliansmart):

* cc: julian@… (added)
* patch: 0 => 1


Comment:

I think you're right, the OSX mapping is the place to change it. Since
wxSYS_COLOUR_INACTIVECAPTION is the same as wxSYS_COLOUR_ACTIVECAPTION on
OSX - i.e. windowFrameColor, it makes sense for the inactive and active
caption text to also be the same to ensure proper contrast, as per
attached patch.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18988#comment:2>

wxTrac

unread,
Nov 26, 2020, 6:21:52 AM11/26/20
to wx-...@googlegroups.com
#18988: Greyed-out tab captions in wxAuiNotebook make no sense
--------------------------+-----------------------------------
Reporter: juliansmart | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.0.5
Resolution: | Keywords: aui,tab,wxAuiNotebook
Blocked By: | Blocking:
Patch: 1 |
--------------------------+-----------------------------------
Changes (by juliansmart):

* Attachment "patch.txt" added.

Patch to improve contrast of AUI-themed tabs on OSX

wxTrac

unread,
Dec 5, 2020, 10:31:54 PM12/5/20
to wx-...@googlegroups.com
#18988: Greyed-out tab captions in wxAuiNotebook make no sense
--------------------------+-----------------------------------
Reporter: juliansmart | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxAui | Version: 3.0.5
Resolution: | Keywords: aui,tab,wxAuiNotebook
Blocked By: | Blocking:
Patch: 1 |
--------------------------+-----------------------------------

Comment (by vadz):

Sorry, I've forgotten to include this one in
https://github.com/wxWidgets/wxWidgets/pull/2136 but I'll merge it too,
together with it, thanks!

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18988#comment:3>

wxTrac

unread,
Dec 8, 2020, 12:44:29 PM12/8/20
to wx-...@googlegroups.com
#18988: Greyed-out tab captions in wxAuiNotebook make no sense
--------------------------+-------------------------------------
Reporter: juliansmart | Owner: Vadim Zeitlin <vadim@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxAui | Version: 3.0.5
Resolution: fixed | Keywords: aui,tab,wxAuiNotebook
Blocked By: | Blocking:
Patch: 1 |
--------------------------+-------------------------------------
Changes (by Vadim Zeitlin <vadim@…>):

* status: new => closed
* owner: => Vadim Zeitlin <vadim@…>
* resolution: => fixed


Comment:

In [changeset:"27d6dce48da5fd165e66846def97b1555fa6b27d/git-wxWidgets"
27d6dce48/git-wxWidgets]:
{{{
#!CommitTicketReference repository="git-wxWidgets"
revision="27d6dce48da5fd165e66846def97b1555fa6b27d"
Fix appearance of inactive wxAuiNotebook tabs under macOS

As we don't use any special value for the inactive caption background,
use the same value as for normal caption text for inactive caption text
too.

This is almost certainly not ideal, but at least allows the tab labels
to be readable.

Closes #18988.
}}}

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18988#comment:4>
Reply all
Reply to author
Forward
0 new messages