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

default config's color scheme should respect dark/light mode OS settings #604

Closed
christianparpart opened this issue Feb 10, 2022 · 4 comments · Fixed by #1233
Closed

default config's color scheme should respect dark/light mode OS settings #604

christianparpart opened this issue Feb 10, 2022 · 4 comments · Fixed by #1233
Labels
enhancement New feature or request feature-request User requested features frontend Contour Terminal Emulator (GUI frontend)

Comments

@christianparpart
Copy link
Member

Windows and OSX have it. And at least KDE version 5.24 has it too .

The default color scheme from there default config should respect that setting and pick some appropriate colors.

@christianparpart christianparpart added enhancement New feature or request frontend Contour Terminal Emulator (GUI frontend) feature-request User requested features labels Feb 10, 2022
@christianparpart christianparpart added this to the 0.3.0 milestone Feb 10, 2022
@christianparpart christianparpart modified the milestones: 0.3.0, 0.4.0 Feb 22, 2022
@christianparpart christianparpart removed this from the 2023-1 milestone Dec 28, 2022
@christianparpart
Copy link
Member Author

I actually wonder. How can we find out if KDE is currently in dark color mode or in light color mode?

Also, we currently only support specifying one color scheme, regardless of the OS dark/light mode settings.
We should probably tag colorschemes as dark or light (could be inferred by default background color maybe?) and allow the user either explicitly set one color scheme or explicitly one for each mode (dark/light OS color mode).

-> We could then adjust the color theme live as soon as the OS decided to go dark/light mode.

@uspasojevic96
Copy link
Member

uspasojevic96 commented Oct 6, 2023

@christianparpart
Copy link
Member Author

christianparpart commented Oct 6, 2023

I also googled around a bit and found this:

dbus-send \
    --session --print-reply=literal --reply-timeout=1000 \
    --dest=org.freedesktop.portal.Desktop \
    /org/freedesktop/portal/desktop \
    org.freedesktop.portal.Settings.Read \
    string:'org.freedesktop.appearance' \
    string:'color-scheme'

We could initially read and then watch on change events on that setting and act accordingly (Not sure how to do that in C++, but most likely QtDbus would probably do the most work for us on that one already.

EDIT: result value 1 = dark mode, 2 = light mode

@christianparpart
Copy link
Member Author

https://doc.qt.io/qt-5.15/qtquickcontrols2-universal.html

I really like that one, the accent color could be used for selection.

So we could extend color schemes to make use of accent colors by specifying the string "accent" rather than a hex code. That could be used for things like selection colors etc. We'd need a way to say something like mix(accent, ...) to allow variations. But making use of accent colors should be its own ticket I think :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request User requested features frontend Contour Terminal Emulator (GUI frontend)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants