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

vkconfig3: Text hard to read #2187

Closed
richard-lunarg opened this issue Nov 22, 2024 · 5 comments
Closed

vkconfig3: Text hard to read #2187

richard-lunarg opened this issue Nov 22, 2024 · 5 comments
Assignees
Labels
enhancement OS - Apple Mac, iOS, etc. issue P2 Has a workaround / Minor feature Project - vkconfig3

Comments

@richard-lunarg
Copy link
Contributor

The bright blue is very hard to read when the Mac is in dark mode.

image
@christophe-lunarg
Copy link
Contributor

A difficulty is that dark mode support is pretty new in Qt.

Here is a code example that could be useful in the future:

#include <QGuiApplication>
#include <QPalette>
#include <QStyleHints>

inline bool isDarkMode() {
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
  const auto scheme = QGuiApplication::styleHints()->colorScheme();
  return scheme == Qt::ColorScheme::Dark;
#else
  const QPalette defaultPalette;
  const auto text = defaultPalette.color(QPalette::WindowText);
  const auto window = defaultPalette.color(QPalette::Window);
  return text.lightness() > window.lightness();
#endif // QT_VERSION
}

@richard-lunarg
Copy link
Contributor Author

Have you considered bumping up to Qt6 for version 3?

@christophe-lunarg
Copy link
Contributor

Have you considered bumping up to Qt6 for version 3?

Would this be reasonnable? Specifically regarding the Ubuntu linux distro we support?

@richard-lunarg
Copy link
Contributor Author

Yes, we are up to Qt 6.6 now, and it is available on Linux as well. Ubuntu, Raspbian, etc.

@christophe-lunarg
Copy link
Contributor

I resolved this issue by copying dynamically to the text color to the html tag:
image

It turns out that themes would have not resolved this. Not sure how this is typically handled...

This is resolved here: #2205 but it's a pretty tedious solution. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement OS - Apple Mac, iOS, etc. issue P2 Has a workaround / Minor feature Project - vkconfig3
Projects
Status: No status
Development

No branches or pull requests

2 participants