Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of small fixes: add a link to the buffer view documents, change the buffer viewer error style for dark mode #3131

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

Zorro666
Copy link
Collaborator

@Zorro666 Zorro666 commented Nov 13, 2023

Description

  • Added a link to "below section" to the buffer viewer struct docs

    • verified by making a documentation build and checking the new link works locally
  • In dark mode invert the lightness for the buffer format error style

    • Welcome advice on a different or better way to change the style for Dark Mode
  • Before Buffer Format Error
    Dark Mode
    image

  • After Buffer Format Error
    Dark Mode
    image
    Light Mode
    image

QColor col = QColor::fromHslF(0.0f, 1.0f, qBound(0.1, base.lightnessF(), 0.9));
QColor col = IsDarkTheme()
? QColor::fromHslF(0.0f, 1.0f, qBound(0.1, 1.0f - base.lightnessF(), 0.9))
: QColor::fromHslF(0.0f, 1.0f, qBound(0.1, base.lightnessF(), 0.9));
Copy link
Owner

Choose a reason for hiding this comment

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

Dark themes are all about light-text-on-dark-background. The bug here is that we customise the background colour without also customising the foreground colour. A better fix here would be to keep the base colour as-is but then use the contrastingColor helper to pick the appropriate text colour to best contrast with it (which on a dark theme will produce light text).

See e.g. D3D11PipelineStateViewer::highlightIABind for how it's used.

@Zorro666 Zorro666 merged commit 6ea7710 into baldurk:v1.x Nov 16, 2023
16 checks passed
@Zorro666 Zorro666 deleted the small-fixes branch November 16, 2023 09:00
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