Skip to content

ui: Adopted deemphasize flag in Sliders and Configuration menus#15283

Merged
cuavas merged 2 commits into
mamedev:masterfrom
holub:deemphasize
May 3, 2026
Merged

ui: Adopted deemphasize flag in Sliders and Configuration menus#15283
cuavas merged 2 commits into
mamedev:masterfrom
holub:deemphasize

Conversation

@holub
Copy link
Copy Markdown
Contributor

@holub holub commented Apr 29, 2026

No description provided.

Comment thread src/frontend/mame/ui/menu.cpp Outdated
Comment on lines +891 to +892
if (subitem_deemphasize)
fgcolor3 = fgcolor2.scale8(0.7F * 256); // 70%
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m going to back this part out, because it assumes a light-on-dark colour scheme, and makes an assumption about the relative brightness of the foreground and background colours. This assumption isn’t safe as the user can reconfigure the colour scheme.

(Yes, there are a couple of pre-existing issues in that the red/orange/green “traffic light” background colours can’t be changed, which limits the usable text colours, and the magically applied colours for the words “On”, “Off” and “Auto” limit the usable background colours. To be honest, I’m not a fan of the magically applied colours for those words. It came when MEWUI was integrated.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly to serve that red/green cases. The alternative is for On/Off define fg2 and fg3 simultaneously.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but it can’t safely do that without considering whether the background is light or dark, and the actual intensity. Simply scaling the brightness like this assumes that the background is dark and is substantially darker than 179 in 8-bit RGB. That isn’t a safe assumption, given the user can change the colours. On a light background, you'd probably have to desaturate the colours as well as dimming them to prevent the green from looking muddy, and dimming yellow is perilous at the best of times due to human perception of browns being rather quirky.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, we know background. I'll do "towards" background later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be it: #15305

@cuavas cuavas merged commit 815f33c into mamedev:master May 3, 2026
0 of 6 checks passed
@holub holub deleted the deemphasize branch May 3, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants